From: Michał Górny Date: Wed, 23 Dec 2015 17:42:51 +0000 (+0100) Subject: dev-lang/python: Install a wrapper to fix python-config paths, #569506 X-Git-Url: http://git.tremily.us/gitweb.cgi?a=commitdiff_plain;h=9483c233c49989f12e192847b5248055f896a0a2;p=gentoo.git dev-lang/python: Install a wrapper to fix python-config paths, #569506 --- diff --git a/dev-lang/python/python-3.3.5-r6.ebuild b/dev-lang/python/python-3.3.5-r7.ebuild 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 a85ba3c29109..877112f5541c 100644 --- a/dev-lang/python/python-3.3.5-r6.ebuild +++ b/dev-lang/python/python-3.3.5-r7.ebuild @@ -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 diff --git a/dev-lang/python/python-3.4.3-r6.ebuild b/dev-lang/python/python-3.4.3-r7.ebuild 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 98549fa3b728..f599fd900e5a 100644 --- a/dev-lang/python/python-3.4.3-r6.ebuild +++ b/dev-lang/python/python-3.4.3-r7.ebuild @@ -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 diff --git a/dev-lang/python/python-3.5.1-r1.ebuild b/dev-lang/python/python-3.5.1-r2.ebuild 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 ef7c58e30a94..bf753fab3174 100644 --- a/dev-lang/python/python-3.5.1-r1.ebuild +++ b/dev-lang/python/python-3.5.1-r2.ebuild @@ -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