dev-lang/python: Install a wrapper to fix python-config paths, #569506

This commit is contained in:
Michał Górny
2015-12-23 19:07:40 +01:00
parent 3f03bc2363
commit 9483c233c4
3 changed files with 21 additions and 6 deletions
@@ -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
@@ -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
@@ -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