diff options
author | Michał Górny <mgorny@gentoo.org> | 2015-02-20 17:57:22 +0000 |
---|---|---|
committer | Michał Górny <mgorny@gentoo.org> | 2015-02-20 17:57:22 +0000 |
commit | a74ee5972a6ba99da0142b90584920cc633a0489 (patch) | |
tree | c4d6b893d21ee9ba28e1fa66d8d5d6949abeb4f6 /eclass/python-utils-r1.eclass | |
parent | version bump (diff) | |
download | gentoo-2-a74ee5972a6ba99da0142b90584920cc633a0489.tar.gz gentoo-2-a74ee5972a6ba99da0142b90584920cc633a0489.tar.bz2 gentoo-2-a74ee5972a6ba99da0142b90584920cc633a0489.zip |
Re-apply python-exec:0 removal, now with typos fixed.
Diffstat (limited to 'eclass/python-utils-r1.eclass')
-rw-r--r-- | eclass/python-utils-r1.eclass | 59 |
1 files changed, 9 insertions, 50 deletions
diff --git a/eclass/python-utils-r1.eclass b/eclass/python-utils-r1.eclass index 4fb3d749eb8a..59e745e3166a 100644 --- a/eclass/python-utils-r1.eclass +++ b/eclass/python-utils-r1.eclass @@ -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: |