dev-lang/python: Ensure python-config & .pc ABI symlinks, idle wrapping
authorMichał Górny <mgorny@gentoo.org>
Fri, 18 Dec 2015 21:52:51 +0000 (22:52 +0100)
committerMichał Górny <mgorny@gentoo.org>
Fri, 18 Dec 2015 22:01:15 +0000 (23:01 +0100)
Fix the pythonX.Y-config symlink creation to be only applied when
ABIFLAGS are not empty, and add additional python-X.Ym.pc symlink for
pkg-config. Make both official as they are created as part of regular
upstream 'make install' (but not 'make altinstall' used by Gentoo).

Install python-exec wrapping symlink for the idle executable when USE=tk
is enabled.

dev-lang/python/python-2.7.10-r5.ebuild [moved from dev-lang/python/python-2.7.10-r4.ebuild with 99% similarity]
dev-lang/python/python-2.7.11-r1.ebuild [moved from dev-lang/python/python-2.7.11.ebuild with 99% similarity]
dev-lang/python/python-3.3.5-r6.ebuild [moved from dev-lang/python/python-3.3.5-r5.ebuild with 96% similarity]
dev-lang/python/python-3.4.3-r6.ebuild [moved from dev-lang/python/python-3.4.3-r5.ebuild with 96% similarity]
dev-lang/python/python-3.5.0-r5.ebuild [moved from dev-lang/python/python-3.5.0-r4.ebuild with 96% similarity]
dev-lang/python/python-3.5.1-r1.ebuild [moved from dev-lang/python/python-3.5.1.ebuild with 96% similarity]

similarity index 99%
rename from dev-lang/python/python-2.7.10-r4.ebuild
rename to dev-lang/python/python-2.7.10-r5.ebuild
index ee529588deec5f58fd9ed7f360a7215e37c21a62..e4d9824406d662f76173b4e3dd322a4e2134cc33 100644 (file)
@@ -337,6 +337,11 @@ src_install() {
                "${D}${PYTHON_SCRIPTDIR}/2to3" || die
        ln -s "../../../bin/pydoc${SLOT}" \
                "${D}${PYTHON_SCRIPTDIR}/pydoc" || die
+       # idle
+       if use tk; then
+               ln -s "../../../bin/idle${PYVER}" \
+                       "${D}${PYTHON_SCRIPTDIR}/idle" || die
+       fi
 }
 
 pkg_preinst() {
similarity index 99%
rename from dev-lang/python/python-2.7.11.ebuild
rename to dev-lang/python/python-2.7.11-r1.ebuild
index f3113c660a293938aa7b96c6891eb87b5583ecd0..3cf1079074b2cd3be5f9961c4416778d98a62c45 100644 (file)
@@ -338,6 +338,11 @@ src_install() {
                "${D}${PYTHON_SCRIPTDIR}/2to3" || die
        ln -s "../../../bin/pydoc${SLOT}" \
                "${D}${PYTHON_SCRIPTDIR}/pydoc" || die
+       # idle
+       if use tk; then
+               ln -s "../../../bin/idle${PYVER}" \
+                       "${D}${PYTHON_SCRIPTDIR}/idle" || die
+       fi
 }
 
 pkg_preinst() {
similarity index 96%
rename from dev-lang/python/python-3.3.5-r5.ebuild
rename to dev-lang/python/python-3.3.5-r6.ebuild
index eac97eec48d9685506d2047f6f20422786312913..a85ba3c291098ddb20b5a2e3d61721335ab18f50 100644 (file)
@@ -254,10 +254,14 @@ src_install() {
 
        # 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${PYVER} ]]; then
+               # Replace python3.X with a symlink to python3.Xm
                rm "${ED}usr/bin/python${PYVER}" || die
                dosym "${abiver}" "/usr/bin/python${PYVER}"
+               # Create python3.X-config symlink
+               dosym "${abiver}-config" "/usr/bin/python${PYVER}-config"
+               # Create python-3.5m.pc symlink
+               dosym "python-${PYVER}.pc" "/usr/$(get_libdir)/pkgconfig/${abiver/${PYVER}/-${PYVER}}.pc"
        fi
 
        if use build; then
@@ -325,10 +329,11 @@ src_install() {
                "${D}${PYTHON_SCRIPTDIR}/pydoc" || die
        ln -s "../../../bin/pyvenv-${PYVER}" \
                "${D}${PYTHON_SCRIPTDIR}/pyvenv" || die
-
-       # Compatibility link for stuff that calls ${PYTHON}-config
-       # Remove this when all revdeps have been fixed to not do that.
-       dosym "${abiver}-config" "/usr/bin/python${PYVER}-config"
+       # idle
+       if use tk; then
+               ln -s "../../../bin/idle${PYVER}" \
+                       "${D}${PYTHON_SCRIPTDIR}/idle" || die
+       fi
 }
 
 pkg_preinst() {
similarity index 96%
rename from dev-lang/python/python-3.4.3-r5.ebuild
rename to dev-lang/python/python-3.4.3-r6.ebuild
index ecdb23d62f790dc09642529fec7f83cf35d747b0..98549fa3b7284a190f4ab68bf3f05e0adb8e7d98 100644 (file)
@@ -241,10 +241,14 @@ src_install() {
 
        # 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${PYVER} ]]; then
+               # Replace python3.X with a symlink to python3.Xm
                rm "${ED}usr/bin/python${PYVER}" || die
                dosym "${abiver}" "/usr/bin/python${PYVER}"
+               # Create python3.X-config symlink
+               dosym "${abiver}-config" "/usr/bin/python${PYVER}-config"
+               # Create python-3.5m.pc symlink
+               dosym "python-${PYVER}.pc" "/usr/$(get_libdir)/pkgconfig/${abiver/${PYVER}/-${PYVER}}.pc"
        fi
 
        use elibc_uclibc && rm -fr "${libdir}/test"
@@ -308,10 +312,11 @@ src_install() {
                "${D}${PYTHON_SCRIPTDIR}/pydoc" || die
        ln -s "../../../bin/pyvenv-${PYVER}" \
                "${D}${PYTHON_SCRIPTDIR}/pyvenv" || die
-
-       # Compatibility link for stuff that calls ${PYTHON}-config
-       # Remove this when all revdeps have been fixed to not do that.
-       dosym "${abiver}-config" "/usr/bin/python${PYVER}-config"
+       # idle
+       if use tk; then
+               ln -s "../../../bin/idle${PYVER}" \
+                       "${D}${PYTHON_SCRIPTDIR}/idle" || die
+       fi
 }
 
 pkg_preinst() {
similarity index 96%
rename from dev-lang/python/python-3.5.0-r4.ebuild
rename to dev-lang/python/python-3.5.0-r5.ebuild
index df51c6009fdab4ec73ce8de8c57f5899694c8ab8..2ed98982edbefde91db55fcfeceb12e4634b8e5c 100644 (file)
@@ -244,10 +244,14 @@ src_install() {
 
        # 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${PYVER} ]]; then
+               # Replace python3.X with a symlink to python3.Xm
                rm "${ED}usr/bin/python${PYVER}" || die
                dosym "${abiver}" "/usr/bin/python${PYVER}"
+               # Create python3.X-config symlink
+               dosym "${abiver}-config" "/usr/bin/python${PYVER}-config"
+               # Create python-3.5m.pc symlink
+               dosym "python-${PYVER}.pc" "/usr/$(get_libdir)/pkgconfig/${abiver/${PYVER}/-${PYVER}}.pc"
        fi
 
        use elibc_uclibc && rm -fr "${libdir}/test"
@@ -311,10 +315,11 @@ src_install() {
                "${D}${PYTHON_SCRIPTDIR}/pydoc" || die
        ln -s "../../../bin/pyvenv-${PYVER}" \
                "${D}${PYTHON_SCRIPTDIR}/pyvenv" || die
-
-       # Compatibility link for stuff that calls ${PYTHON}-config
-       # Remove this when all revdeps have been fixed to not do that.
-       dosym "${abiver}-config" "/usr/bin/python${PYVER}-config"
+       # idle
+       if use tk; then
+               ln -s "../../../bin/idle${PYVER}" \
+                       "${D}${PYTHON_SCRIPTDIR}/idle" || die
+       fi
 }
 
 pkg_preinst() {
similarity index 96%
rename from dev-lang/python/python-3.5.1.ebuild
rename to dev-lang/python/python-3.5.1-r1.ebuild
index cce4c7da66707ad152d9c18b6d028657784e52f3..ef7c58e30a94557869848fe846c337652ec797ac 100644 (file)
@@ -244,10 +244,14 @@ src_install() {
 
        # 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${PYVER} ]]; then
+               # Replace python3.X with a symlink to python3.Xm
                rm "${ED}usr/bin/python${PYVER}" || die
                dosym "${abiver}" "/usr/bin/python${PYVER}"
+               # Create python3.X-config symlink
+               dosym "${abiver}-config" "/usr/bin/python${PYVER}-config"
+               # Create python-3.5m.pc symlink
+               dosym "python-${PYVER}.pc" "/usr/$(get_libdir)/pkgconfig/${abiver/${PYVER}/-${PYVER}}.pc"
        fi
 
        use elibc_uclibc && rm -fr "${libdir}/test"
@@ -311,10 +315,11 @@ src_install() {
                "${D}${PYTHON_SCRIPTDIR}/pydoc" || die
        ln -s "../../../bin/pyvenv-${PYVER}" \
                "${D}${PYTHON_SCRIPTDIR}/pyvenv" || die
-
-       # Compatibility link for stuff that calls ${PYTHON}-config
-       # Remove this when all revdeps have been fixed to not do that.
-       dosym "${abiver}-config" "/usr/bin/python${PYVER}-config"
+       # idle
+       if use tk; then
+               ln -s "../../../bin/idle${PYVER}" \
+                       "${D}${PYTHON_SCRIPTDIR}/idle" || die
+       fi
 }
 
 pkg_preinst() {