summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichał Górny <mgorny@gentoo.org>2017-04-21 16:03:23 +0200
committerMichał Górny <mgorny@gentoo.org>2017-04-25 19:57:56 +0200
commit6a5909861804d1c32cf5b850c4b143c02009f661 (patch)
tree06e6066159b508fd0c968a9eeb8a4d8fa68c7135 /eclass/python-utils-r1.eclass
parenteclass/ELT-patches: remove the remaining (nocxx) patches (diff)
downloadgentoo-6a5909861804d1c32cf5b850c4b143c02009f661.tar.gz
gentoo-6a5909861804d1c32cf5b850c4b143c02009f661.tar.bz2
gentoo-6a5909861804d1c32cf5b850c4b143c02009f661.zip
python-utils-r1.eclass: python_wrapper_setup, do not query PYTHON_CONFIG
Use plain 'pythonX.Y-config' executable name in the python-config wrapper instead of querying the complete PYTHON_CONFIG path from python_export. Constructing full PYTHON_CONFIG path requires querying ABIFLAGS which requires the Python interpreter to be installed, which in turn unnecessarily forces every ebuild using the eclass to carry a build-time dependency on the Python interpreter. All current versions of Python correctly install 'pythonX.Y-config' symlink that points to the correct ABI-suffixed binary. It is therefore unnecessary to use the full path.
Diffstat (limited to 'eclass/python-utils-r1.eclass')
-rw-r--r--eclass/python-utils-r1.eclass6
1 files changed, 2 insertions, 4 deletions
diff --git a/eclass/python-utils-r1.eclass b/eclass/python-utils-r1.eclass
index a67e378d3997..49a605b9e159 100644
--- a/eclass/python-utils-r1.eclass
+++ b/eclass/python-utils-r1.eclass
@@ -943,7 +943,7 @@ python_wrapper_setup() {
rm -f "${workdir}"/bin/2to3 || die
rm -f "${workdir}"/pkgconfig/python{,2,3}.pc || die
- local EPYTHON PYTHON PYTHON_CONFIG
+ local EPYTHON PYTHON
python_export "${impl}" EPYTHON PYTHON
local pyver pyother
@@ -970,11 +970,9 @@ python_wrapper_setup() {
# CPython-specific
if [[ ${EPYTHON} == python* ]]; then
- python_export "${impl}" PYTHON_CONFIG
-
cat > "${workdir}/bin/python-config" <<-_EOF_ || die
#!/bin/sh
- exec "${PYTHON_CONFIG}" "\${@}"
+ exec "${PYTHON}-config" "\${@}"
_EOF_
cp "${workdir}/bin/python-config" \
"${workdir}/bin/python${pyver}-config" || die