Re-apply python-exec:0 removal, now with typos fixed.
authorMichał Górny <mgorny@gentoo.org>
Fri, 20 Feb 2015 17:57:22 +0000 (17:57 +0000)
committerMichał Górny <mgorny@gentoo.org>
Fri, 20 Feb 2015 17:57:22 +0000 (17:57 +0000)
eclass/ChangeLog
eclass/distutils-r1.eclass
eclass/python-r1.eclass
eclass/python-single-r1.eclass
eclass/python-utils-r1.eclass

index 06b11fc224faccf16ab569bc3fc21b889e2e4a50..da1ec79cd4b8aadf97dcb17dbcdc1a645d88bc0e 100644 (file)
@@ -1,6 +1,10 @@
 # ChangeLog for eclass directory
 # Copyright 1999-2015 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/eclass/ChangeLog,v 1.1544 2015/02/20 17:02:56 mgorny Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/ChangeLog,v 1.1545 2015/02/20 17:57:22 mgorny Exp $
+
+  20 Feb 2015; Michał Górny <mgorny@gentoo.org> distutils-r1.eclass,
+  python-r1.eclass, python-single-r1.eclass, python-utils-r1.eclass:
+  Re-apply python-exec:0 removal, now with typos fixed.
 
   20 Feb 2015; Michał Górny <mgorny@gentoo.org> python-r1.eclass,
   python-single-r1.eclass, python-utils-r1.eclass:
index 373add33fa27fe3fd7cfc58de106175ea47d3fd8..22afd1e60aa304d133cb0d471205d92bb84ee58f 100644 (file)
@@ -1,6 +1,6 @@
 # Copyright 1999-2015 Gentoo Foundation
 # Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/eclass/distutils-r1.eclass,v 1.112 2015/02/20 08:18:05 patrick Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/distutils-r1.eclass,v 1.113 2015/02/20 17:57:22 mgorny Exp $
 
 # @ECLASS: distutils-r1
 # @MAINTAINER:
@@ -393,7 +393,7 @@ _distutils-r1_create_setup_cfg() {
                        root = ${D}
                _EOF_
 
-               if [[ ! ${DISTUTILS_SINGLE_IMPL} ]] && _python_want_python_exec2; then
+               if [[ ! ${DISTUTILS_SINGLE_IMPL} ]]; then
                        cat >> "${HOME}"/.pydistutils.cfg <<-_EOF_ || die
                                install-scripts = $(python_get_scriptdir)
                        _EOF_
@@ -444,11 +444,7 @@ _distutils-r1_wrap_scripts() {
        local bindir=${2}
 
        local PYTHON_SCRIPTDIR
-       if _python_want_python_exec2; then
-               python_export PYTHON_SCRIPTDIR
-       else
-               PYTHON_SCRIPTDIR=${bindir}
-       fi
+       python_export PYTHON_SCRIPTDIR
 
        local f python_files=() non_python_files=()
 
@@ -462,7 +458,7 @@ _distutils-r1_wrap_scripts() {
                        if [[ ${shebang} == '#!'*${EPYTHON}* ]]; then
                                debug-print "${FUNCNAME}: matching shebang: ${shebang}"
                                python_files+=( "${f}" )
-                       elif _python_want_python_exec2; then
+                       else
                                debug-print "${FUNCNAME}: non-matching shebang: ${shebang}"
                                non_python_files+=( "${f}" )
                        fi
@@ -473,18 +469,11 @@ _distutils-r1_wrap_scripts() {
                for f in "${python_files[@]}"; do
                        local basename=${f##*/}
 
-                       if ! _python_want_python_exec2; then
-                               local newf=${f%/*}/${basename}-${EPYTHON}
-                               debug-print "${FUNCNAME}: renaming ${f#${path}/} to ${newf#${path}/}"
-                               mv "${f}" "${newf}" || die
-                       fi
-
                        debug-print "${FUNCNAME}: installing wrapper at ${bindir}/${basename}"
-                       _python_ln_rel "${path}${EPREFIX}"$(_python_get_wrapper_path) \
+                       _python_ln_rel "${path}${EPREFIX}"/usr/lib/python-exec/python-exec2 \
                                "${path}${bindir}/${basename}" || die
                done
 
-               # (non-empty only with python-exec:2)
                for f in "${non_python_files[@]}"; do
                        local basename=${f##*/}
 
@@ -544,15 +533,11 @@ distutils-r1_python_install() {
                        case "${a}" in
                                --install-scripts=*)
                                        scriptdir=${a#--install-scripts=}
-                                       if _python_want_python_exec2; then
-                                               unset "${arg_var}"
-                                       fi
+                                       unset "${arg_var}"
                                        ;;
                                --install-scripts)
                                        scriptdir=${!1}
-                                       if _python_want_python_exec2; then
-                                               unset "${arg_var}" "${1}"
-                                       fi
+                                       unset "${arg_var}" "${1}"
                                        shift
                                        ;;
                        esac
index 813e7c1306a7f31d4e7a48fc2cae48beb2dd72a2..b40d928492008892c544b0bc28a47636ca2fdd48 100644 (file)
@@ -1,6 +1,6 @@
 # Copyright 1999-2015 Gentoo Foundation
 # Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/eclass/python-r1.eclass,v 1.88 2015/02/20 17:02:56 mgorny Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/python-r1.eclass,v 1.89 2015/02/20 17:57:22 mgorny Exp $
 
 # @ECLASS: python-r1
 # @MAINTAINER:
index 2ce469f71d8f8e6db19518707df0aa055029b300..964cd4a0b681de97c27623a12c7b74cd96e2f6ac 100644 (file)
@@ -1,6 +1,6 @@
 # Copyright 1999-2015 Gentoo Foundation
 # Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/eclass/python-single-r1.eclass,v 1.35 2015/02/20 17:02:56 mgorny Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/python-single-r1.eclass,v 1.36 2015/02/20 17:57:22 mgorny Exp $
 
 # @ECLASS: python-single-r1
 # @MAINTAINER:
index 4fb3d749eb8a5533fa0c4b64da74728a36511532..59e745e3166a51e9b5bce6ba4cffcd5644aa35d6 100644 (file)
@@ -1,6 +1,6 @@
 # Copyright 1999-2015 Gentoo Foundation
 # Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/eclass/python-utils-r1.eclass,v 1.79 2015/02/20 17:02:56 mgorny Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/python-utils-r1.eclass,v 1.80 2015/02/20 17:57:22 mgorny Exp $
 
 # @ECLASS: python-utils-r1
 # @MAINTAINER:
@@ -635,21 +635,14 @@ python_newexe() {
        [[ ${EPYTHON} ]] || die 'No Python implementation set (EPYTHON is null).'
        [[ ${#} -eq 2 ]] || die "Usage: ${FUNCNAME} <path> <new-name>"
 
-       local d=${python_scriptroot:-${DESTTREE}/bin}
-       local wrapd=${d}
+       local wrapd=${python_scriptroot:-${DESTTREE}/bin}
 
        local f=${1}
-       local barefn=${2}
-       local newfn
-
-       if _python_want_python_exec2; then
-               local PYTHON_SCRIPTDIR
-               python_export PYTHON_SCRIPTDIR
-               d=${PYTHON_SCRIPTDIR#${EPREFIX}}
-               newfn=${barefn}
-       else
-               newfn=${barefn}-${EPYTHON}
-       fi
+       local newfn=${2}
+
+       local PYTHON_SCRIPTDIR d
+       python_export PYTHON_SCRIPTDIR
+       d=${PYTHON_SCRIPTDIR#${EPREFIX}}
 
        (
                dodir "${wrapd}"
@@ -658,8 +651,8 @@ python_newexe() {
        )
 
        # install the wrapper
-       _python_ln_rel "${ED%/}"$(_python_get_wrapper_path) \
-               "${ED%/}/${wrapd}/${barefn}" || die
+       _python_ln_rel "${ED%/}"/usr/lib/python-exec/python-exec2 \
+               "${ED%/}/${wrapd}/${newfn}" || die
 
        # don't use this at home, just call python_doscript() instead
        if [[ ${_PYTHON_REWRITE_SHEBANG} ]]; then
@@ -1099,40 +1092,6 @@ python_fix_shebang() {
        done
 }
 
-# @FUNCTION: _python_want_python_exec2
-# @INTERNAL
-# @DESCRIPTION:
-# Check whether we should be using python-exec:2.
-_python_want_python_exec2() {
-       debug-print-function ${FUNCNAME} "${@}"
-
-       # EAPI 4 lacks slot operators, so just fix it on python-exec:2.
-       [[ ${EAPI} == 4 ]] && return 0
-
-       # Check if we cached the result, or someone put an override.
-       if [[ ! ${_PYTHON_WANT_PYTHON_EXEC2+1} ]]; then
-               has_version 'dev-lang/python-exec:2'
-               _PYTHON_WANT_PYTHON_EXEC2=$(( ! ${?} ))
-       fi
-
-       # Non-zero means 'yes', zero means 'no'.
-       [[ ${_PYTHON_WANT_PYTHON_EXEC2} != 0 ]]
-}
-
-# @FUNCTION: _python_get_wrapper_path
-# @INTERNAL
-# @DESCRIPTION:
-# Output path to proper python-exec slot.
-_python_get_wrapper_path() {
-       debug-print-function ${FUNCNAME} "${@}"
-
-       if _python_want_python_exec2; then
-               echo /usr/lib/python-exec/python-exec2
-       else
-               echo /usr/bin/python-exec
-       fi
-}
-
 # @FUNCTION: python_export_utf8_locale
 # @RETURN: 0 on success, 1 on failure.
 # @DESCRIPTION: