summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRepository mirror & CI <repomirrorci@gentoo.org>2023-09-12 08:02:07 +0000
committerRepository mirror & CI <repomirrorci@gentoo.org>2023-09-12 08:02:07 +0000
commitbd5b9a67a6cbb11738fa3b62683eff930d9ea01a (patch)
treec407deb4f5b7cceb99c8a9e5e8e1dbc47b2ef6c6
parent2023-09-12 07:31:39 UTC (diff)
parentpython-utils-r1.eclass: Redo cross-prefix support using sysconfig (diff)
downloadgentoo-bd5b9a67a6cbb11738fa3b62683eff930d9ea01a.tar.gz
gentoo-bd5b9a67a6cbb11738fa3b62683eff930d9ea01a.tar.bz2
gentoo-bd5b9a67a6cbb11738fa3b62683eff930d9ea01a.zip
Merge updates from master
-rw-r--r--eclass/python-utils-r1.eclass14
1 files changed, 6 insertions, 8 deletions
diff --git a/eclass/python-utils-r1.eclass b/eclass/python-utils-r1.eclass
index f9c6d161d3f3..bd30c1203180 100644
--- a/eclass/python-utils-r1.eclass
+++ b/eclass/python-utils-r1.eclass
@@ -346,24 +346,22 @@ _python_export() {
PYTHON_SITEDIR)
[[ -n ${PYTHON} ]] || die "PYTHON needs to be set for ${var} to be exported, or requested before it"
PYTHON_SITEDIR=$(
- "${PYTHON}" - <<-EOF || die
- import sysconfig
- print(sysconfig.get_path("purelib"))
+ "${PYTHON}" - "${EPREFIX}/usr" <<-EOF || die
+ import sys, sysconfig
+ print(sysconfig.get_path("purelib", vars={"base": sys.argv[1]}))
EOF
)
- PYTHON_SITEDIR=${EPREFIX}${PYTHON_SITEDIR#"${BROOT-${EPREFIX}}"}
export PYTHON_SITEDIR
debug-print "${FUNCNAME}: PYTHON_SITEDIR = ${PYTHON_SITEDIR}"
;;
PYTHON_INCLUDEDIR)
[[ -n ${PYTHON} ]] || die "PYTHON needs to be set for ${var} to be exported, or requested before it"
PYTHON_INCLUDEDIR=$(
- "${PYTHON}" - <<-EOF || die
- import sysconfig
- print(sysconfig.get_path("platinclude"))
+ "${PYTHON}" - "${ESYSROOT}/usr" <<-EOF || die
+ import sys, sysconfig
+ print(sysconfig.get_path("platinclude", vars={"installed_platbase": sys.argv[1]}))
EOF
)
- PYTHON_INCLUDEDIR=${ESYSROOT}${PYTHON_INCLUDEDIR#"${BROOT-${EPREFIX}}"}
export PYTHON_INCLUDEDIR
debug-print "${FUNCNAME}: PYTHON_INCLUDEDIR = ${PYTHON_INCLUDEDIR}"