poky/meta/classes/python3native.bbclass
Tim Orling 26da78a7f5 python3native.bbclass: distutils -> sysconfig
In the comment it says we patch distutils modules, but we now are
patching sysconfig and not using distutils.

[YOCTO #14610]

(From OE-Core rev: 4f196b26d80305366d06ad51f44dd26ce81bea16)

Signed-off-by: Tim Orling <tim.orling@konsulko.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2022-01-12 21:09:02 +00:00

25 lines
787 B
Plaintext

inherit python3-dir
PYTHON="${STAGING_BINDIR_NATIVE}/python3-native/python3"
EXTRANATIVEPATH += "python3-native"
DEPENDS:append = " python3-native "
# python-config and other scripts are using sysconfig modules
# which we patch to access these variables
export STAGING_INCDIR
export STAGING_LIBDIR
# Packages can use
# find_package(PythonInterp REQUIRED)
# find_package(PythonLibs REQUIRED)
# which ends up using libs/includes from build host
# Therefore pre-empt that effort
export PYTHON_LIBRARY="${STAGING_LIBDIR}/lib${PYTHON_DIR}${PYTHON_ABI}.so"
export PYTHON_INCLUDE_DIR="${STAGING_INCDIR}/${PYTHON_DIR}${PYTHON_ABI}"
# suppress host user's site-packages dirs.
export PYTHONNOUSERSITE = "1"
# autoconf macros will use their internal default preference otherwise
export PYTHON