From b6387d3230123eda5c2751a6eb991087a5df84e5 Mon Sep 17 00:00:00 2001 From: Michał Górny Date: Sun, 8 Nov 2015 10:56:11 +0100 Subject: 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(+) (limited to 'dev-lang/python') diff --git a/dev-lang/python/python-3.3.5-r3.ebuild b/dev-lang/python/python-3.3.5-r3.ebuild index d4b6b034e09c..7164d5a178ee 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 b2b09ced1a33..53c39a05aadf 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 4029ec363128..34ac46e14394 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*} -- cgit v1.2.3-65-gdbad