* [gentoo-dev] [PATCH] python-utils-r1.eclass: python_wrapper_setup, do not query PYTHON_CONFIG
@ 2017-04-21 14:11 Michał Górny
2017-04-25 18:45 ` Michał Górny
0 siblings, 1 reply; 2+ messages in thread
From: Michał Górny @ 2017-04-21 14:11 UTC (permalink / raw
To: gentoo-dev; +Cc: python, Michał Górny
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.
---
eclass/python-utils-r1.eclass | 6 ++----
1 file 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
--
2.12.2
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [gentoo-dev] [PATCH] python-utils-r1.eclass: python_wrapper_setup, do not query PYTHON_CONFIG
2017-04-21 14:11 [gentoo-dev] [PATCH] python-utils-r1.eclass: python_wrapper_setup, do not query PYTHON_CONFIG Michał Górny
@ 2017-04-25 18:45 ` Michał Górny
0 siblings, 0 replies; 2+ messages in thread
From: Michał Górny @ 2017-04-25 18:45 UTC (permalink / raw
To: gentoo-dev; +Cc: python
[-- Attachment #1: Type: text/plain, Size: 818 bytes --]
On pią, 2017-04-21 at 16:11 +0200, Michał Górny wrote:
> 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.
> ---
> eclass/python-utils-r1.eclass | 6 ++----
> 1 file changed, 2 insertions(+), 4 deletions(-)
>
Merged.
--
Best regards,
Michał Górny
[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 963 bytes --]
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2017-04-25 18:48 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-04-21 14:11 [gentoo-dev] [PATCH] python-utils-r1.eclass: python_wrapper_setup, do not query PYTHON_CONFIG Michał Górny
2017-04-25 18:45 ` Michał Górny
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox