1 |
We assumed Python to be located at /usr/$(get_libdir) in recent |
2 |
changes to this eclass but this has changed from Python 3.7. We now |
3 |
follow upstream, installing most files to /usr/lib, with only certain |
4 |
files, such as the pkg-config files, going into /usr/$(get_libdir). |
5 |
|
6 |
Signed-off-by: James Le Cuirot <chewi@g.o> |
7 |
--- |
8 |
eclass/python-utils-r1.eclass | 11 +++++++++-- |
9 |
1 file changed, 9 insertions(+), 2 deletions(-) |
10 |
|
11 |
diff --git a/eclass/python-utils-r1.eclass b/eclass/python-utils-r1.eclass |
12 |
index 17de9ca9c44f..5e54cc618212 100644 |
13 |
--- a/eclass/python-utils-r1.eclass |
14 |
+++ b/eclass/python-utils-r1.eclass |
15 |
@@ -1063,7 +1063,14 @@ python_wrapper_setup() { |
16 |
|
17 |
# CPython-specific |
18 |
if [[ ${EPYTHON} == python* ]]; then |
19 |
- local pysysrootlib=${pysysroot}/usr/$(get_libdir) |
20 |
+ local pysysrootlib=${pysysroot}/usr/ |
21 |
+ |
22 |
+ case "${EPYTHON}" in |
23 |
+ python2.*|python3.[0-6]) |
24 |
+ pysysrootlib+=$(get_libdir) ;; |
25 |
+ *) |
26 |
+ pysysrootlib+=lib ;; |
27 |
+ esac |
28 |
|
29 |
cat > "${workdir}/bin/python-config" <<-_EOF_ || die |
30 |
#!/bin/sh |
31 |
@@ -1093,7 +1100,7 @@ python_wrapper_setup() { |
32 |
ln -s "${EPYTHON/python/2to3-}" "${workdir}"/bin/2to3 || die |
33 |
|
34 |
# Python 2.7+. |
35 |
- ln -s "${pysysrootlib}"/pkgconfig/${EPYTHON/n/n-}.pc \ |
36 |
+ ln -s "${pysysroot}"/usr/$(get_libdir)/pkgconfig/${EPYTHON/n/n-}.pc \ |
37 |
"${workdir}"/pkgconfig/python.pc || die |
38 |
ln -s python.pc "${workdir}"/pkgconfig/python${pyver}.pc || die |
39 |
else |
40 |
-- |
41 |
2.19.2 |