commit: b6387d3230123eda5c2751a6eb991087a5df84e5
Author: Michał Górny <mgorny <AT> gentoo <DOT> org>
AuthorDate: Sun Nov 8 09:56:11 2015 +0000
Commit: Michał Górny <mgorny <AT> gentoo <DOT> org>
CommitDate: Wed Nov 11 10:22:43 2015 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=b6387d32
dev-lang/python: Replace python3.x executables with symlinks
Replace python3.X executables (duplicate to python3.Xm) installed by
the build system with symlinks to the ABIFLAGS-enabled variants.
dev-lang/python/python-3.3.5-r3.ebuild | 8 ++++++++
dev-lang/python/python-3.4.3-r3.ebuild | 8 ++++++++
dev-lang/python/python-3.5.0-r2.ebuild | 8 ++++++++
3 files changed, 24 insertions(+)
diff --git a/dev-lang/python/python-3.3.5-r3.ebuild
b/dev-lang/python/python-3.3.5-r3.ebuild
index d4b6b03..7164d5a 100644
--- a/dev-lang/python/python-3.3.5-r3.ebuild
+++ b/dev-lang/python/python-3.3.5-r3.ebuild
@@ -252,6 +252,14 @@ src_install() {
# Fix collisions between different slots of Python.
rm -f "${ED}usr/$(get_libdir)/libpython3.so"
+ # Cheap hack to get version with ABIFLAGS
+ local abiver=$(cd "${ED}usr/include"; echo python*)
+ # Replace python3.X with a symlink if appropriate
+ if [[ ${abiver} != python${SLOT} ]]; then
+ rm "${ED}usr/bin/python${SLOT}" || die
+ dosym "${abiver}" "/usr/bin/python${SLOT}"
+ fi
+
if use build; then
rm -fr "${ED}usr/bin/idle${SLOT}"
"${libdir}/"{idlelib,sqlite3,test,tkinter}
else
diff --git a/dev-lang/python/python-3.4.3-r3.ebuild
b/dev-lang/python/python-3.4.3-r3.ebuild
index b2b09ce..53c39a0 100644
--- a/dev-lang/python/python-3.4.3-r3.ebuild
+++ b/dev-lang/python/python-3.4.3-r3.ebuild
@@ -237,6 +237,14 @@ src_install() {
# Fix collisions between different slots of Python.
rm -f "${ED}usr/$(get_libdir)/libpython3.so"
+ # Cheap hack to get version with ABIFLAGS
+ local abiver=$(cd "${ED}usr/include"; echo python*)
+ # Replace python3.X with a symlink if appropriate
+ if [[ ${abiver} != python${SLOT} ]]; then
+ rm "${ED}usr/bin/python${SLOT}" || die
+ dosym "${abiver}" "/usr/bin/python${SLOT}"
+ fi
+
use elibc_uclibc && rm -fr "${libdir}/test"
use sqlite || rm -fr "${libdir}/"{sqlite3,test/test_sqlite*}
use tk || rm -fr "${ED}usr/bin/idle${SLOT}"
"${libdir}/"{idlelib,tkinter,test/test_tk*}
diff --git a/dev-lang/python/python-3.5.0-r2.ebuild
b/dev-lang/python/python-3.5.0-r2.ebuild
index 4029ec3..34ac46e 100644
--- a/dev-lang/python/python-3.5.0-r2.ebuild
+++ b/dev-lang/python/python-3.5.0-r2.ebuild
@@ -243,6 +243,14 @@ src_install() {
# Fix collisions between different slots of Python.
rm -f "${ED}usr/$(get_libdir)/libpython3.so"
+ # Cheap hack to get version with ABIFLAGS
+ local abiver=$(cd "${ED}usr/include"; echo python*)
+ # Replace python3.X with a symlink if appropriate
+ if [[ ${abiver} != python${SLOT} ]]; then
+ rm "${ED}usr/bin/python${SLOT}" || die
+ dosym "${abiver}" "/usr/bin/python${SLOT}"
+ fi
+
use elibc_uclibc && rm -fr "${libdir}/test"
use sqlite || rm -fr "${libdir}/"{sqlite3,test/test_sqlite*}
use tk || rm -fr "${ED}usr/bin/idle${SLOT}"
"${libdir}/"{idlelib,tkinter,test/test_tk*}