summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichał Górny <mgorny@gentoo.org>2015-02-20 17:57:22 +0000
committerMichał Górny <mgorny@gentoo.org>2015-02-20 17:57:22 +0000
commit6a8673c0e2180b42490dd96d3dfc9115da99ccca (patch)
treea150e13c66e718f7246cdc2fe280d750efc4a92f /eclass/distutils-r1.eclass
parentremove old (diff)
downloadhistorical-6a8673c0e2180b42490dd96d3dfc9115da99ccca.tar.gz
historical-6a8673c0e2180b42490dd96d3dfc9115da99ccca.tar.bz2
historical-6a8673c0e2180b42490dd96d3dfc9115da99ccca.zip
Re-apply python-exec:0 removal, now with typos fixed.
Diffstat (limited to 'eclass/distutils-r1.eclass')
-rw-r--r--eclass/distutils-r1.eclass29
1 files changed, 7 insertions, 22 deletions
diff --git a/eclass/distutils-r1.eclass b/eclass/distutils-r1.eclass
index 373add33fa27..22afd1e60aa3 100644
--- a/eclass/distutils-r1.eclass
+++ b/eclass/distutils-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/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