xref: /OK3568_Linux_fs/yocto/poky/meta/classes/python3native.bbclass (revision 4882a59341e53eb6f0b4789bf948001014eff981)
1*4882a593Smuzhiyuninherit python3-dir
2*4882a593Smuzhiyun
3*4882a593SmuzhiyunPYTHON="${STAGING_BINDIR_NATIVE}/python3-native/python3"
4*4882a593SmuzhiyunEXTRANATIVEPATH += "python3-native"
5*4882a593SmuzhiyunDEPENDS:append = " python3-native "
6*4882a593Smuzhiyun
7*4882a593Smuzhiyun# python-config and other scripts are using sysconfig modules
8*4882a593Smuzhiyun# which we patch to access these variables
9*4882a593Smuzhiyunexport STAGING_INCDIR
10*4882a593Smuzhiyunexport STAGING_LIBDIR
11*4882a593Smuzhiyun
12*4882a593Smuzhiyun# Packages can use
13*4882a593Smuzhiyun# find_package(PythonInterp REQUIRED)
14*4882a593Smuzhiyun# find_package(PythonLibs REQUIRED)
15*4882a593Smuzhiyun# which ends up using libs/includes from build host
16*4882a593Smuzhiyun# Therefore pre-empt that effort
17*4882a593Smuzhiyunexport PYTHON_LIBRARY="${STAGING_LIBDIR}/lib${PYTHON_DIR}${PYTHON_ABI}.so"
18*4882a593Smuzhiyunexport PYTHON_INCLUDE_DIR="${STAGING_INCDIR}/${PYTHON_DIR}${PYTHON_ABI}"
19*4882a593Smuzhiyun
20*4882a593Smuzhiyun# suppress host user's site-packages dirs.
21*4882a593Smuzhiyunexport PYTHONNOUSERSITE = "1"
22*4882a593Smuzhiyun
23*4882a593Smuzhiyun# autoconf macros will use their internal default preference otherwise
24*4882a593Smuzhiyunexport PYTHON
25