mirror of
https://github.com/flatcar/scripts.git
synced 2025-08-10 06:26:57 +02:00
eclass/python-utils-r1: Sync with Gentoo
It's from Gentoo commit 93a87f4f59eb62356f2d2cc45c6cb252cf865e11.
This commit is contained in:
parent
6cc8b6c297
commit
218d629e4a
@ -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}"
|
||||
|
||||
@ -1244,10 +1242,6 @@ _python_check_EPYTHON() {
|
||||
_python_check_occluded_packages() {
|
||||
debug-print-function ${FUNCNAME} "${@}"
|
||||
|
||||
# DO NOT ENABLE THIS unless you're going to check for false
|
||||
# positives before filing bugs.
|
||||
[[ ! ${PYTHON_EXPERIMENTAL_QA} ]] && return
|
||||
|
||||
[[ -z ${BUILD_DIR} || ! -d ${BUILD_DIR}/install ]] && return
|
||||
|
||||
local sitedir="${BUILD_DIR}/install$(python_get_sitedir)"
|
||||
|
Loading…
Reference in New Issue
Block a user