diff options
author | Michał Górny <mgorny@gentoo.org> | 2020-02-27 18:56:55 +0100 |
---|---|---|
committer | Michał Górny <mgorny@gentoo.org> | 2020-04-19 18:46:59 +0200 |
commit | f78a7b2722aee8e229ae0de6a775e110cd0bb80b (patch) | |
tree | 7c5efe2d040fc831438bb564bfc34dc2b6f67eab /eclass | |
parent | dev-python/whichcraft: Bump to 0.6.1 (diff) | |
download | gentoo-f78a7b2722aee8e229ae0de6a775e110cd0bb80b.tar.gz gentoo-f78a7b2722aee8e229ae0de6a775e110cd0bb80b.tar.bz2 gentoo-f78a7b2722aee8e229ae0de6a775e110cd0bb80b.zip |
python-utils-r1.eclass: Fix PYTHON_LIBS for py3.8+
Python 3.8+ provides two pkg-config files: python-3.8 for building
Python extensions and python-3.8-embed for embedding Python in other
programs. The former no longer lists -lpython*, resulting in empty
PYTHON_LIBS. Since our consumers are more likely to want it non-empty
if they already query it, switch to the latter file.
Closes: https://bugs.gentoo.org/718344
Signed-off-by: Michał Górny <mgorny@gentoo.org>
Diffstat (limited to 'eclass')
-rw-r--r-- | eclass/python-utils-r1.eclass | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/eclass/python-utils-r1.eclass b/eclass/python-utils-r1.eclass index c72dad7ae361..e85aefda792a 100644 --- a/eclass/python-utils-r1.eclass +++ b/eclass/python-utils-r1.eclass @@ -341,10 +341,14 @@ _python_export() { local val case "${impl}" in - python*) - # python-2.7, python-3.2, etc. + python2*|python3.6|python3.7*) + # python* up to 3.7 val=$($(tc-getPKG_CONFIG) --libs ${impl/n/n-}) || die ;; + python*) + # python3.8+ + val=$($(tc-getPKG_CONFIG) --libs ${impl/n/n-}-embed) || die + ;; *) die "${impl}: obtaining ${var} not supported" ;; |