summaryrefslogtreecommitdiff
path: root/eclass
diff options
context:
space:
mode:
authorMichał Górny <mgorny@gentoo.org>2015-07-27 16:32:46 +0000
committerMichał Górny <mgorny@gentoo.org>2015-07-27 16:32:46 +0000
commite7ca0c34b260272931bbd49730ccaa58a6c6c3db (patch)
treede7fde5bb539f2a7f9f663671dfa24c54180900c /eclass
parentDrop the USE_PYTHON warning. (diff)
downloadhistorical-e7ca0c34b260272931bbd49730ccaa58a6c6c3db.tar.gz
historical-e7ca0c34b260272931bbd49730ccaa58a6c6c3db.tar.bz2
historical-e7ca0c34b260272931bbd49730ccaa58a6c6c3db.zip
python_wrapper_setup(): replace symlinks with shell wrappers to avoid triggering Python 3.4+ magical prefix support.
Diffstat (limited to 'eclass')
-rw-r--r--eclass/ChangeLog6
-rw-r--r--eclass/python-utils-r1.eclass19
2 files changed, 20 insertions, 5 deletions
diff --git a/eclass/ChangeLog b/eclass/ChangeLog
index ca5959b020de..02586cd3c335 100644
--- a/eclass/ChangeLog
+++ b/eclass/ChangeLog
@@ -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.1728 2015/07/27 16:31:01 floppym Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/ChangeLog,v 1.1729 2015/07/27 16:32:46 mgorny Exp $
+
+ 27 Jul 2015; Michał Górny <mgorny@gentoo.org> python-utils-r1.eclass:
+ python_wrapper_setup(): replace symlinks with shell wrappers to avoid
+ triggering Python 3.4+ magical prefix support.
27 Jul 2015; Mike Gilbert <floppym@gentoo.org> python-r1.eclass:
Drop the USE_PYTHON warning.
diff --git a/eclass/python-utils-r1.eclass b/eclass/python-utils-r1.eclass
index a29217946f89..e3bed87d50bc 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.84 2015/07/25 10:07:36 mgorny Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/python-utils-r1.eclass,v 1.85 2015/07/27 16:32:46 mgorny Exp $
# @ECLASS: python-utils-r1
# @MAINTAINER:
@@ -855,14 +855,25 @@ python_wrapper_setup() {
fi
# Python interpreter
- ln -s "${PYTHON}" "${workdir}"/bin/python || die
- ln -s python "${workdir}"/bin/python${pyver} || die
+ # note: we don't use symlinks because python likes to do some
+ # symlink reading magic that breaks stuff
+ # https://bugs.gentoo.org/show_bug.cgi?id=555752
+ cat > "${workdir}/bin/python" <<-_EOF_
+ #!/bin/sh
+ exec "${PYTHON}" "\${@}"
+ _EOF_
+ cp "${workdir}/bin/python" "${workdir}/bin/python${pyver}" || die
+ chmod +x "${workdir}/bin/python" "${workdir}/bin/python${pyver}" || die
local nonsupp=()
# CPython-specific
if [[ ${EPYTHON} == python* ]]; then
- ln -s "${PYTHON}-config" "${workdir}"/bin/python-config || die
+ cat > "${workdir}/bin/python-config" <<-_EOF_
+ #!/bin/sh
+ exec "${PYTHON}-config" "\${@}"
+ _EOF_
+ chmod +x "${workdir}/bin/python-config" || die
# Python 2.6+.
ln -s "${PYTHON/python/2to3-}" "${workdir}"/bin/2to3 || die