summaryrefslogtreecommitdiff
path: root/meta/classes/pythonnative.bbclass
diff options
context:
space:
mode:
authorAlexander Kanavin <alexander.kanavin@linux.intel.com>2016-06-22 15:06:35 +0300
committerRichard Purdie <richard.purdie@linuxfoundation.org>2016-07-01 16:08:44 +0100
commitc1e0eb62f2d89b10b187016200018830b1c77945 (patch)
treec42bcb9e32f8f0aebf6470036111d6837f134766 /meta/classes/pythonnative.bbclass
parent2ec8db434c6da54333cbdc54763bb5561b6e4d10 (diff)
downloadopenembedded-core-c1e0eb62f2d89b10b187016200018830b1c77945.tar.gz
openembedded-core-c1e0eb62f2d89b10b187016200018830b1c77945.tar.bz2
openembedded-core-c1e0eb62f2d89b10b187016200018830b1c77945.zip
pythonnative.bbclass, python3native.bbclass: export STAGING_INCDIR, STAGING_LIBDIR, PYTHON variables
We patch Python's distutils modules to access STAGING_INCDIR/LIBDIR, so when they are not set, scripts that utilize distutils (e.g. python-config) fail. Several recipes need to export those manually to prevent such failures, so let's do that in the class instead. PYTHON variable is exported because otherwise autotools' python.m4 macro will pick up its own internal default, which may not be the version that we want. glib recipe in particular was previously using Python 2.x during build due to python.m4 defaulting to it - now it's using Python 3.x, and so needs a small fix in deletion of *.pyc files. Signed-off-by: Alexander Kanavin <alexander.kanavin@linux.intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
Diffstat (limited to 'meta/classes/pythonnative.bbclass')
-rw-r--r--meta/classes/pythonnative.bbclass8
1 files changed, 8 insertions, 0 deletions
diff --git a/meta/classes/pythonnative.bbclass b/meta/classes/pythonnative.bbclass
index 97029dc525..bd239fa792 100644
--- a/meta/classes/pythonnative.bbclass
+++ b/meta/classes/pythonnative.bbclass
@@ -6,3 +6,11 @@ PYTHON="${STAGING_BINDIR_NATIVE}/${PYTHON_PN}-native/${PYTHON_PN}"
PYTHON_EXECUTABLE="${PYTHON}"
EXTRANATIVEPATH += "${PYTHON_PN}-native"
DEPENDS += " ${PYTHON_PN}-native "
+
+# python-config and other scripts are using distutils modules
+# which we patch to access these variables
+export STAGING_INCDIR
+export STAGING_LIBDIR
+
+# autoconf macros will use their internal default preference otherwise
+export PYTHON