blob: 0e9019d1e24dfbb18ddcbbca9ccbd2dbfa3744df [file] [log] [blame]
Patrick Williamsc124f4f2015-09-15 14:41:29 -05001
2inherit python-dir
3
Brad Bishop1a4b7ee2018-12-16 17:11:34 -08004PYTHON="${STAGING_BINDIR_NATIVE}/python-native/python"
Patrick Williamsc124f4f2015-09-15 14:41:29 -05005# PYTHON_EXECUTABLE is used by cmake
6PYTHON_EXECUTABLE="${PYTHON}"
Brad Bishop1a4b7ee2018-12-16 17:11:34 -08007EXTRANATIVEPATH += "python-native"
8DEPENDS_append = " python-native "
Patrick Williamsc0f7c042017-02-23 20:41:17 -06009
10# python-config and other scripts are using distutils modules
11# which we patch to access these variables
12export STAGING_INCDIR
13export STAGING_LIBDIR
14
Brad Bishop79641f22019-09-10 07:20:22 -040015# Packages can use
16# find_package(PythonInterp REQUIRED)
17# find_package(PythonLibs REQUIRED)
18# which ends up using libs/includes from build host
19# Therefore pre-empt that effort
20export PYTHON_LIBRARY="${STAGING_LIBDIR}/lib${PYTHON_DIR}${PYTHON_ABI}.so"
21export PYTHON_INCLUDE_DIR="${STAGING_INCDIR}/${PYTHON_DIR}${PYTHON_ABI}"
22
Brad Bishopd7bf8c12018-02-25 22:55:05 -050023# suppress host user's site-packages dirs.
24export PYTHONNOUSERSITE = "1"
25
Patrick Williamsc0f7c042017-02-23 20:41:17 -060026# autoconf macros will use their internal default preference otherwise
27export PYTHON