dev-lang/python: Install a wrapper to fix python-config paths, #569506
authorMichał Górny <mgorny@gentoo.org>
Wed, 23 Dec 2015 17:42:51 +0000 (18:42 +0100)
committerMichał Górny <mgorny@gentoo.org>
Wed, 23 Dec 2015 18:07:40 +0000 (19:07 +0100)
dev-lang/python/python-3.3.5-r7.ebuild [moved from dev-lang/python/python-3.3.5-r6.ebuild with 97% similarity]
dev-lang/python/python-3.4.3-r7.ebuild [moved from dev-lang/python/python-3.4.3-r6.ebuild with 96% similarity]
dev-lang/python/python-3.5.1-r2.ebuild [moved from dev-lang/python/python-3.5.1-r1.ebuild with 96% similarity]

similarity index 97%
rename from dev-lang/python/python-3.3.5-r6.ebuild
rename to dev-lang/python/python-3.3.5-r7.ebuild
index a85ba3c291098ddb20b5a2e3d61721335ab18f50..877112f5541cd06b5524aa309ae22cd004ba2c82 100644 (file)
@@ -318,8 +318,13 @@ src_install() {
        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
+       # note: we need to create a wrapper rather than symlinking it due
+       # to some random dirname(argv[0]) magic performed by python-config
+       cat > "${D}${PYTHON_SCRIPTDIR}/python${pymajor}-config" <<-EOF || die
+               #!/bin/sh
+               exec "${abiver}-config" "\${@}"
+       EOF
+       chmod +x "${D}${PYTHON_SCRIPTDIR}/python${pymajor}-config" || die
        ln -s "python${pymajor}-config" \
                "${D}${PYTHON_SCRIPTDIR}/python-config" || die
        # 2to3, pydoc, pyvenv
similarity index 96%
rename from dev-lang/python/python-3.4.3-r6.ebuild
rename to dev-lang/python/python-3.4.3-r7.ebuild
index 98549fa3b7284a190f4ab68bf3f05e0adb8e7d98..f599fd900e5aa9b2222e634c9375b26a78387dec 100644 (file)
@@ -301,8 +301,13 @@ src_install() {
        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
+       # note: we need to create a wrapper rather than symlinking it due
+       # to some random dirname(argv[0]) magic performed by python-config
+       cat > "${D}${PYTHON_SCRIPTDIR}/python${pymajor}-config" <<-EOF || die
+               #!/bin/sh
+               exec "${abiver}-config" "\${@}"
+       EOF
+       chmod +x "${D}${PYTHON_SCRIPTDIR}/python${pymajor}-config" || die
        ln -s "python${pymajor}-config" \
                "${D}${PYTHON_SCRIPTDIR}/python-config" || die
        # 2to3, pydoc, pyvenv
similarity index 96%
rename from dev-lang/python/python-3.5.1-r1.ebuild
rename to dev-lang/python/python-3.5.1-r2.ebuild
index ef7c58e30a94557869848fe846c337652ec797ac..bf753fab3174bb0cd35de251132042c5eba48232 100644 (file)
@@ -304,8 +304,13 @@ src_install() {
        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
+       # note: we need to create a wrapper rather than symlinking it due
+       # to some random dirname(argv[0]) magic performed by python-config
+       cat > "${D}${PYTHON_SCRIPTDIR}/python${pymajor}-config" <<-EOF || die
+               #!/bin/sh
+               exec "${abiver}-config" "\${@}"
+       EOF
+       chmod +x "${D}${PYTHON_SCRIPTDIR}/python${pymajor}-config" || die
        ln -s "python${pymajor}-config" \
                "${D}${PYTHON_SCRIPTDIR}/python-config" || die
        # 2to3, pydoc, pyvenv