diff options
author | Arfrever Frehtes Taifersar Arahesis <arfrever@gentoo.org> | 2010-10-10 19:23:20 +0000 |
---|---|---|
committer | Arfrever Frehtes Taifersar Arahesis <arfrever@gentoo.org> | 2010-10-10 19:23:20 +0000 |
commit | a22480de73e7c0d15c13189c1efbe78ce0566a4e (patch) | |
tree | 2ac006485661d711debe4fb0ad408c961aab6d4d /eclass/distutils.eclass | |
parent | Fix openmotif dependency. (diff) | |
download | gentoo-2-a22480de73e7c0d15c13189c1efbe78ce0566a4e.tar.gz gentoo-2-a22480de73e7c0d15c13189c1efbe78ce0566a4e.tar.bz2 gentoo-2-a22480de73e7c0d15c13189c1efbe78ce0566a4e.zip |
Use _python_package_supporting_installation_for_multiple_python_abis() instead of checking SUPPORT_PYTHON_ABIS variable.
Fix a typo in distutils_src_install().
Diffstat (limited to 'eclass/distutils.eclass')
-rw-r--r-- | eclass/distutils.eclass | 24 |
1 files changed, 12 insertions, 12 deletions
diff --git a/eclass/distutils.eclass b/eclass/distutils.eclass index 55d152fe0df4..b82b4db26bad 100644 --- a/eclass/distutils.eclass +++ b/eclass/distutils.eclass @@ -1,6 +1,6 @@ # Copyright 1999-2010 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/eclass/distutils.eclass,v 1.76 2010/07/17 23:03:29 arfrever Exp $ +# $Header: /var/cvsroot/gentoo-x86/eclass/distutils.eclass,v 1.77 2010/10/10 19:23:20 arfrever Exp $ # @ECLASS: distutils.eclass # @MAINTAINER: @@ -97,7 +97,7 @@ fi # Additional documentation files installed by distutils_src_install(). _distutils_get_build_dir() { - if [[ -n "${SUPPORT_PYTHON_ABIS}" && -z "${DISTUTILS_USE_SEPARATE_SOURCE_DIRECTORIES}" ]]; then + if _python_package_supporting_installation_for_multiple_python_abis && [[ -z "${DISTUTILS_USE_SEPARATE_SOURCE_DIRECTORIES}" ]]; then echo "build-${PYTHON_ABI}" else echo "build" @@ -105,7 +105,7 @@ _distutils_get_build_dir() { } _distutils_get_PYTHONPATH() { - if [[ -n "${SUPPORT_PYTHON_ABIS}" && -z "${DISTUTILS_USE_SEPARATE_SOURCE_DIRECTORIES}" ]]; then + if _python_package_supporting_installation_for_multiple_python_abis && [[ -z "${DISTUTILS_USE_SEPARATE_SOURCE_DIRECTORIES}" ]]; then ls -d build-${PYTHON_ABI}/lib* 2> /dev/null else ls -d build/lib* 2> /dev/null @@ -180,7 +180,7 @@ distutils_src_compile() { _python_set_color_variables - if [[ -n "${SUPPORT_PYTHON_ABIS}" ]]; then + if _python_package_supporting_installation_for_multiple_python_abis; then distutils_building() { _distutils_hook pre @@ -207,7 +207,7 @@ _distutils_src_test_hook() { die "${FUNCNAME}() requires 1 arguments" fi - if [[ -z "${SUPPORT_PYTHON_ABIS}" ]]; then + if ! _python_package_supporting_installation_for_multiple_python_abis; then return fi @@ -237,7 +237,7 @@ distutils_src_test() { _python_set_color_variables if [[ "${DISTUTILS_SRC_TEST}" == "setup.py" ]]; then - if [[ -n "${SUPPORT_PYTHON_ABIS}" ]]; then + if _python_package_supporting_installation_for_multiple_python_abis; then distutils_testing() { _distutils_hook pre @@ -297,7 +297,7 @@ distutils_src_install() { _python_initialize_prefix_variables _python_set_color_variables - if [[ -n "${SUPPORT_PYTHON_ABIS}" ]]; then + if _python_package_supporting_installation_for_multiple_python_abis; then if [[ -z "${DISTUTILS_DISABLE_VERSIONING_OF_PYTHON_SCRIPTS}" && "${BASH_VERSINFO[0]}" -ge 4 ]]; then declare -A wrapper_scripts=() @@ -307,7 +307,7 @@ distutils_src_install() { local nonversioned_file file for file in *; do - if [[ -f "${file}" && ! "${file}" =~ [[:digit:]]+\.[[:digit:]](-jython)?+$ && "$(head -n1 "${file}")" =~ ^'#!'.*(python|jython-)[[:digit:]]+\.[[:digit:]]+ ]]; then + if [[ -f "${file}" && ! "${file}" =~ [[:digit:]]+\.[[:digit:]]+(-jython)?$ && "$(head -n1 "${file}")" =~ ^'#!'.*(python|jython-)[[:digit:]]+\.[[:digit:]]+ ]]; then for nonversioned_file in "${DISTUTILS_NONVERSIONED_PYTHON_SCRIPTS[@]}"; do [[ "${nonversioned_file}" == "/usr/bin/${file}" ]] && continue 2 done @@ -383,7 +383,7 @@ distutils_pkg_postinst() { local pylibdir pymod if [[ -z "$(declare -p PYTHON_MODNAME 2> /dev/null)" ]]; then - for pylibdir in "${EROOT}"usr/$(get_libdir)/python* "${EROOT}"/usr/share/jython-*/Lib; do + for pylibdir in "${EROOT}"usr/$(get_libdir)/python* "${EROOT}"usr/share/jython-*/Lib; do if [[ -d "${pylibdir}/site-packages/${PN}" ]]; then PYTHON_MODNAME="${PN}" fi @@ -391,7 +391,7 @@ distutils_pkg_postinst() { fi if [[ -n "${PYTHON_MODNAME}" ]]; then - if ! has "${EAPI:-0}" 0 1 2 || [[ -n "${SUPPORT_PYTHON_ABIS}" ]]; then + if ! has "${EAPI:-0}" 0 1 2 || _python_package_supporting_installation_for_multiple_python_abis; then python_mod_optimize ${PYTHON_MODNAME} else for pymod in ${PYTHON_MODNAME}; do @@ -416,7 +416,7 @@ distutils_pkg_postrm() { local pylibdir pymod if [[ -z "$(declare -p PYTHON_MODNAME 2> /dev/null)" ]]; then - for pylibdir in "${EROOT}"usr/$(get_libdir)/python* "${EROOT}"/usr/share/jython-*/Lib; do + for pylibdir in "${EROOT}"usr/$(get_libdir)/python* "${EROOT}"usr/share/jython-*/Lib; do if [[ -d "${pylibdir}/site-packages/${PN}" ]]; then PYTHON_MODNAME="${PN}" fi @@ -424,7 +424,7 @@ distutils_pkg_postrm() { fi if [[ -n "${PYTHON_MODNAME}" ]]; then - if ! has "${EAPI:-0}" 0 1 2 || [[ -n "${SUPPORT_PYTHON_ABIS}" ]]; then + if ! has "${EAPI:-0}" 0 1 2 || _python_package_supporting_installation_for_multiple_python_abis; then python_mod_cleanup ${PYTHON_MODNAME} else for pymod in ${PYTHON_MODNAME}; do |