]> code.ossystems Code Review - openembedded-core.git/commitdiff
python[3]native: allow use of both native Python 2 and 3
authorRoss Burton <ross.burton@intel.com>
Tue, 31 Jul 2018 17:05:41 +0000 (18:05 +0100)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Thu, 2 Aug 2018 08:30:06 +0000 (09:30 +0100)
Instead of both classes using ${PYTHON_PN} (which is set by python-dir and
python3-dir), hardcode the right values so that it is possible to inherit both
pythonnative and python3native at the same time.

If both are inherited then both native Pythons are available, but the last to be
inherited will be the one to set PYTHON.

Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
meta/classes/python3native.bbclass
meta/classes/pythonnative.bbclass

index 89665efee8b86d60ed571522c3bcfd72062bad46..da12a7147039ae6afaffabaee7b3f25204289a62 100644 (file)
@@ -1,8 +1,8 @@
 inherit python3-dir
 
-PYTHON="${STAGING_BINDIR_NATIVE}/${PYTHON_PN}-native/${PYTHON_PN}"
-EXTRANATIVEPATH += "${PYTHON_PN}-native"
-DEPENDS_append = " ${PYTHON_PN}-native "
+PYTHON="${STAGING_BINDIR_NATIVE}/python3-native/python3"
+EXTRANATIVEPATH += "python3-native"
+DEPENDS_append = " python3-native "
 
 # python-config and other scripts are using distutils modules
 # which we patch to access these variables
index 4cc8b2769c27914f5e681f4f70bbd2ba82ac38fd..ae6600cd155631a28204744edda44182e44fc727 100644 (file)
@@ -1,11 +1,11 @@
 
 inherit python-dir
 
-PYTHON="${STAGING_BINDIR_NATIVE}/${PYTHON_PN}-native/${PYTHON_PN}"
+PYTHON="${STAGING_BINDIR_NATIVE}/python-native/python"
 # PYTHON_EXECUTABLE is used by cmake
 PYTHON_EXECUTABLE="${PYTHON}"
-EXTRANATIVEPATH += "${PYTHON_PN}-native"
-DEPENDS_append = " ${PYTHON_PN}-native "
+EXTRANATIVEPATH += "python-native"
+DEPENDS_append = " python-native "
 
 # python-config and other scripts are using distutils modules
 # which we patch to access these variables