/[gentoo-x86]/eclass/distutils.eclass
Gentoo

Diff of /eclass/distutils.eclass

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

Revision 1.57 Revision 1.58
1# Copyright 1999-2009 Gentoo Foundation 1# Copyright 1999-2009 Gentoo Foundation
2# Distributed under the terms of the GNU General Public License v2 2# Distributed under the terms of the GNU General Public License v2
3# $Header: /var/cvsroot/gentoo-x86/eclass/distutils.eclass,v 1.57 2009/08/02 00:30:29 arfrever Exp $ 3# $Header: /var/cvsroot/gentoo-x86/eclass/distutils.eclass,v 1.58 2009/08/05 18:34:56 arfrever Exp $
4 4
5# @ECLASS: distutils.eclass 5# @ECLASS: distutils.eclass
6# @MAINTAINER: 6# @MAINTAINER:
7# <python@gentoo.org> 7# <python@gentoo.org>
8# 8#
69# @DESCRIPTION: 69# @DESCRIPTION:
70# The distutils src_compile function, this function is exported 70# The distutils src_compile function, this function is exported
71distutils_src_compile() { 71distutils_src_compile() {
72 if ! has "${EAPI:-0}" 0 1 2 || [[ -n "${SUPPORT_PYTHON_ABIS}" ]]; then 72 if ! has "${EAPI:-0}" 0 1 2 || [[ -n "${SUPPORT_PYTHON_ABIS}" ]]; then
73 build_modules() { 73 build_modules() {
74 echo "$(get_python)" setup.py build -b "build-${PYTHON_ABI}" "$@" 74 echo "$(PYTHON)" setup.py build -b "build-${PYTHON_ABI}" "$@"
75 "$(get_python)" setup.py build -b "build-${PYTHON_ABI}" "$@" 75 "$(PYTHON)" setup.py build -b "build-${PYTHON_ABI}" "$@"
76 } 76 }
77 python_execute_function build_modules "$@" 77 python_execute_function build_modules "$@"
78 else 78 else
79 ${python} setup.py build "$@" || die "compilation failed" 79 ${python} setup.py build "$@" || die "compilation failed"
80 fi 80 fi
84# @DESCRIPTION: 84# @DESCRIPTION:
85# The distutils src_install function, this function is exported. 85# The distutils src_install function, this function is exported.
86# It also installs the "standard docs" (CHANGELOG, Change*, KNOWN_BUGS, MAINTAINERS, 86# It also installs the "standard docs" (CHANGELOG, Change*, KNOWN_BUGS, MAINTAINERS,
87# PKG-INFO, CONTRIBUTORS, TODO, NEWS, MANIFEST*, README*, and AUTHORS) 87# PKG-INFO, CONTRIBUTORS, TODO, NEWS, MANIFEST*, README*, and AUTHORS)
88distutils_src_install() { 88distutils_src_install() {
89 local pylibdir
89 90
90 # Mark the package to be rebuilt after a python upgrade. 91 # Mark the package to be rebuilt after a python upgrade.
91 python_need_rebuild 92 python_need_rebuild
92 93
93 if ! has "${EAPI:-0}" 0 1 2 || [[ -n "${SUPPORT_PYTHON_ABIS}" ]]; then 94 if ! has "${EAPI:-0}" 0 1 2 || [[ -n "${SUPPORT_PYTHON_ABIS}" ]]; then
94 install_modules() { 95 install_modules() {
95 # need this for python-2.5 + setuptools in cases where 96 # need this for python-2.5 + setuptools in cases where
96 # a package uses distutils but does not install anything 97 # a package uses distutils but does not install anything
97 # in site-packages. (eg. dev-java/java-config-2.x) 98 # in site-packages. (eg. dev-java/java-config-2.x)
98 # - liquidx (14/08/2006) 99 # - liquidx (14/08/2006)
99 pylibdir="$("$(get_python)" -c 'from distutils.sysconfig import get_python_lib; print(get_python_lib())')" 100 pylibdir="$("$(PYTHON)" -c 'from distutils.sysconfig import get_python_lib; print(get_python_lib())')"
100 [[ -n "${pylibdir}" ]] && dodir "${pylibdir}" 101 [[ -n "${pylibdir}" ]] && dodir "${pylibdir}"
101 102
102 echo "$(get_python)" setup.py build -b "build-${PYTHON_ABI}" install --root="${D}" --no-compile "$@" 103 echo "$(PYTHON)" setup.py build -b "build-${PYTHON_ABI}" install --root="${D}" --no-compile "$@"
103 "$(get_python)" setup.py build -b "build-${PYTHON_ABI}" install --root="${D}" --no-compile "$@" 104 "$(PYTHON)" setup.py build -b "build-${PYTHON_ABI}" install --root="${D}" --no-compile "$@"
104 } 105 }
105 python_execute_function install_modules "$@" 106 python_execute_function install_modules "$@"
106 else 107 else
107 # need this for python-2.5 + setuptools in cases where 108 # need this for python-2.5 + setuptools in cases where
108 # a package uses distutils but does not install anything 109 # a package uses distutils but does not install anything

Legend:
Removed from v.1.57  
changed lines
  Added in v.1.58

  ViewVC Help
Powered by ViewVC 1.1.20