1 |
Python 3.8+ provides two pkg-config files: python-3.8 for building |
2 |
Python extensions and python-3.8-embed for embedding Python in other |
3 |
programs. The former no longer lists -lpython*, resulting in empty |
4 |
PYTHON_LIBS. Since our consumers are more likely to want it non-empty |
5 |
if they already query it, switch to the latter file. |
6 |
|
7 |
Signed-off-by: Michał Górny <mgorny@g.o> |
8 |
--- |
9 |
eclass/python-utils-r1.eclass | 8 ++++++-- |
10 |
1 file changed, 6 insertions(+), 2 deletions(-) |
11 |
|
12 |
diff --git a/eclass/python-utils-r1.eclass b/eclass/python-utils-r1.eclass |
13 |
index 91a32434dfaa..afa641fbb7ea 100644 |
14 |
--- a/eclass/python-utils-r1.eclass |
15 |
+++ b/eclass/python-utils-r1.eclass |
16 |
@@ -433,10 +433,14 @@ python_export() { |
17 |
local val |
18 |
|
19 |
case "${impl}" in |
20 |
- python*) |
21 |
- # python-2.7, python-3.2, etc. |
22 |
+ python2*|python3.6|python3.7*) |
23 |
+ # python* up to 3.7 |
24 |
val=$($(tc-getPKG_CONFIG) --libs ${impl/n/n-}) || die |
25 |
;; |
26 |
+ python*) |
27 |
+ # python3.8+ |
28 |
+ val=$($(tc-getPKG_CONFIG) --libs ${impl/n/n-}-embed) || die |
29 |
+ ;; |
30 |
*) |
31 |
die "${impl}: obtaining ${var} not supported" |
32 |
;; |
33 |
-- |
34 |
2.25.1 |