summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichał Górny <mgorny@gentoo.org>2015-11-12 17:26:15 +0100
committerMichał Górny <mgorny@gentoo.org>2015-11-17 21:39:09 +0100
commit6c2f9e9f117072625ea850d2c8f6f79b6b6a2401 (patch)
treeda798934a7975cea19c267476e57656f34cf1064 /dev-lang
parentmedia-gfx/simple-scan: Drop old (diff)
downloadgentoo-6c2f9e9f117072625ea850d2c8f6f79b6b6a2401.tar.gz
gentoo-6c2f9e9f117072625ea850d2c8f6f79b6b6a2401.tar.bz2
gentoo-6c2f9e9f117072625ea850d2c8f6f79b6b6a2401.zip
dev-lang/python: Add symlinks for python-exec wrapping of execs
Add symlinks to make it possible to wrap Python executable aliases (python, python-config, pydoc...) via python-exec.
Diffstat (limited to 'dev-lang')
-rw-r--r--dev-lang/python/python-2.7.10-r4.ebuild (renamed from dev-lang/python/python-2.7.10-r3.ebuild)21
-rw-r--r--dev-lang/python/python-3.3.5-r4.ebuild (renamed from dev-lang/python/python-3.3.5-r3.ebuild)23
-rw-r--r--dev-lang/python/python-3.4.3-r4.ebuild (renamed from dev-lang/python/python-3.4.3-r3.ebuild)23
-rw-r--r--dev-lang/python/python-3.5.0-r3.ebuild (renamed from dev-lang/python/python-3.5.0-r2.ebuild)23
4 files changed, 86 insertions, 4 deletions
diff --git a/dev-lang/python/python-2.7.10-r3.ebuild b/dev-lang/python/python-2.7.10-r4.ebuild
index 4fae1b589991..2158a5471c81 100644
--- a/dev-lang/python/python-2.7.10-r3.ebuild
+++ b/dev-lang/python/python-2.7.10-r4.ebuild
@@ -304,7 +304,7 @@ src_install() {
-i "${ED}etc/conf.d/pydoc-${SLOT}" "${ED}etc/init.d/pydoc-${SLOT}" || die "sed failed"
# for python-exec
- local vars=( EPYTHON PYTHON_SITEDIR )
+ local vars=( EPYTHON PYTHON_SITEDIR PYTHON_SCRIPTDIR )
# if not using a cross-compiler, use the fresh binary
if ! tc-is-cross-compiler; then
@@ -317,6 +317,25 @@ src_install() {
python_export "python${SLOT}" "${vars[@]}"
echo "EPYTHON='${EPYTHON}'" > epython.py || die
python_domodule epython.py
+
+ # python-exec wrapping support
+ local pymajor=${SLOT%.*}
+ mkdir -p "${D}${PYTHON_SCRIPTDIR}" || die
+ # python and pythonX
+ ln -s "../../../bin/python${SLOT}" \
+ "${D}${PYTHON_SCRIPTDIR}/python${pymajor}" || die
+ ln -s "python${pymajor}" \
+ "${D}${PYTHON_SCRIPTDIR}/python" || die
+ # python-config and pythonX-config
+ ln -s "../../../bin/python${SLOT}-config" \
+ "${D}${PYTHON_SCRIPTDIR}/python${pymajor}-config" || die
+ ln -s "python${pymajor}-config" \
+ "${D}${PYTHON_SCRIPTDIR}/python-config" || die
+ # 2to3, pydoc, pyvenv
+ ln -s "../../../bin/2to3-${SLOT}" \
+ "${D}${PYTHON_SCRIPTDIR}/2to3" || die
+ ln -s "../../../bin/pydoc${SLOT}" \
+ "${D}${PYTHON_SCRIPTDIR}/pydoc" || die
}
pkg_preinst() {
diff --git a/dev-lang/python/python-3.3.5-r3.ebuild b/dev-lang/python/python-3.3.5-r4.ebuild
index 3049ce1f71bc..9b0e26111a7f 100644
--- a/dev-lang/python/python-3.3.5-r3.ebuild
+++ b/dev-lang/python/python-3.3.5-r4.ebuild
@@ -291,7 +291,7 @@ src_install() {
-i "${ED}etc/conf.d/pydoc-${PYVER}" "${ED}etc/init.d/pydoc-${PYVER}" || die "sed failed"
# for python-exec
- local vars=( EPYTHON PYTHON_SITEDIR )
+ local vars=( EPYTHON PYTHON_SITEDIR PYTHON_SCRIPTDIR )
# if not using a cross-compiler, use the fresh binary
if ! tc-is-cross-compiler; then
@@ -304,6 +304,27 @@ src_install() {
python_export "python${PYVER}" "${vars[@]}"
echo "EPYTHON='${EPYTHON}'" > epython.py || die
python_domodule epython.py
+
+ # python-exec wrapping support
+ local pymajor=${PYVER%.*}
+ mkdir -p "${D}${PYTHON_SCRIPTDIR}" || die
+ # python and pythonX
+ ln -s "../../../bin/${abiver}" \
+ "${D}${PYTHON_SCRIPTDIR}/python${pymajor}" || die
+ ln -s "python${pymajor}" \
+ "${D}${PYTHON_SCRIPTDIR}/python" || die
+ # python-config and pythonX-config
+ ln -s "../../../bin/${abiver}-config" \
+ "${D}${PYTHON_SCRIPTDIR}/python${pymajor}-config" || die
+ ln -s "python${pymajor}-config" \
+ "${D}${PYTHON_SCRIPTDIR}/python-config" || die
+ # 2to3, pydoc, pyvenv
+ ln -s "../../../bin/2to3-${PYVER}" \
+ "${D}${PYTHON_SCRIPTDIR}/2to3" || die
+ ln -s "../../../bin/pydoc${PYVER}" \
+ "${D}${PYTHON_SCRIPTDIR}/pydoc" || die
+ ln -s "../../../bin/pyvenv-${PYVER}" \
+ "${D}${PYTHON_SCRIPTDIR}/pyvenv" || die
}
pkg_preinst() {
diff --git a/dev-lang/python/python-3.4.3-r3.ebuild b/dev-lang/python/python-3.4.3-r4.ebuild
index aaaa72aca152..526233a9621a 100644
--- a/dev-lang/python/python-3.4.3-r3.ebuild
+++ b/dev-lang/python/python-3.4.3-r4.ebuild
@@ -274,7 +274,7 @@ src_install() {
-i "${ED}etc/conf.d/pydoc-${PYVER}" "${ED}etc/init.d/pydoc-${PYVER}" || die "sed failed"
# for python-exec
- local vars=( EPYTHON PYTHON_SITEDIR )
+ local vars=( EPYTHON PYTHON_SITEDIR PYTHON_SCRIPTDIR )
# if not using a cross-compiler, use the fresh binary
if ! tc-is-cross-compiler; then
@@ -287,6 +287,27 @@ src_install() {
python_export "python${PYVER}" "${vars[@]}"
echo "EPYTHON='${EPYTHON}'" > epython.py || die
python_domodule epython.py
+
+ # python-exec wrapping support
+ local pymajor=${PYVER%.*}
+ mkdir -p "${D}${PYTHON_SCRIPTDIR}" || die
+ # python and pythonX
+ ln -s "../../../bin/${abiver}" \
+ "${D}${PYTHON_SCRIPTDIR}/python${pymajor}" || die
+ ln -s "python${pymajor}" \
+ "${D}${PYTHON_SCRIPTDIR}/python" || die
+ # python-config and pythonX-config
+ ln -s "../../../bin/${abiver}-config" \
+ "${D}${PYTHON_SCRIPTDIR}/python${pymajor}-config" || die
+ ln -s "python${pymajor}-config" \
+ "${D}${PYTHON_SCRIPTDIR}/python-config" || die
+ # 2to3, pydoc, pyvenv
+ ln -s "../../../bin/2to3-${PYVER}" \
+ "${D}${PYTHON_SCRIPTDIR}/2to3" || die
+ ln -s "../../../bin/pydoc${PYVER}" \
+ "${D}${PYTHON_SCRIPTDIR}/pydoc" || die
+ ln -s "../../../bin/pyvenv-${PYVER}" \
+ "${D}${PYTHON_SCRIPTDIR}/pyvenv" || die
}
pkg_preinst() {
diff --git a/dev-lang/python/python-3.5.0-r2.ebuild b/dev-lang/python/python-3.5.0-r3.ebuild
index caa9e3531aeb..b2b50a17f0c2 100644
--- a/dev-lang/python/python-3.5.0-r2.ebuild
+++ b/dev-lang/python/python-3.5.0-r3.ebuild
@@ -277,7 +277,7 @@ src_install() {
-i "${ED}etc/conf.d/pydoc-${PYVER}" "${ED}etc/init.d/pydoc-${PYVER}" || die "sed failed"
# for python-exec
- local vars=( EPYTHON PYTHON_SITEDIR )
+ local vars=( EPYTHON PYTHON_SITEDIR PYTHON_SCRIPTDIR )
# if not using a cross-compiler, use the fresh binary
if ! tc-is-cross-compiler; then
@@ -290,6 +290,27 @@ src_install() {
python_export "python${PYVER}" "${vars[@]}"
echo "EPYTHON='${EPYTHON}'" > epython.py || die
python_domodule epython.py
+
+ # python-exec wrapping support
+ local pymajor=${PYVER%.*}
+ mkdir -p "${D}${PYTHON_SCRIPTDIR}" || die
+ # python and pythonX
+ ln -s "../../../bin/${abiver}" \
+ "${D}${PYTHON_SCRIPTDIR}/python${pymajor}" || die
+ ln -s "python${pymajor}" \
+ "${D}${PYTHON_SCRIPTDIR}/python" || die
+ # python-config and pythonX-config
+ ln -s "../../../bin/${abiver}-config" \
+ "${D}${PYTHON_SCRIPTDIR}/python${pymajor}-config" || die
+ ln -s "python${pymajor}-config" \
+ "${D}${PYTHON_SCRIPTDIR}/python-config" || die
+ # 2to3, pydoc, pyvenv
+ ln -s "../../../bin/2to3-${PYVER}" \
+ "${D}${PYTHON_SCRIPTDIR}/2to3" || die
+ ln -s "../../../bin/pydoc${PYVER}" \
+ "${D}${PYTHON_SCRIPTDIR}/pydoc" || die
+ ln -s "../../../bin/pyvenv-${PYVER}" \
+ "${D}${PYTHON_SCRIPTDIR}/pyvenv" || die
}
pkg_preinst() {