summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRoss Burton <ross.burton@intel.com>2018-07-31 18:05:41 +0100
committerRichard Purdie <richard.purdie@linuxfoundation.org>2018-08-02 09:30:11 +0100
commit1dccb37d89f54d7284b6a81957ab228906f24e1c (patch)
tree0c0a0dd7c5755722790fa7e50bba441bfcb0366c
parent1b52a28de81b8639375137395a3b162d84e92af5 (diff)
downloadpoky-1dccb37d89f54d7284b6a81957ab228906f24e1c.tar.gz
python[3]native: allow use of both native Python 2 and 3
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. (From OE-Core rev: 96ccdadb8473daa3c9c2e1cb42fbdff1edd270d6) Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-rw-r--r--meta/classes/python3native.bbclass6
-rw-r--r--meta/classes/pythonnative.bbclass6
2 files changed, 6 insertions, 6 deletions
diff --git a/meta/classes/python3native.bbclass b/meta/classes/python3native.bbclass
index 89665efee8..da12a71470 100644
--- a/meta/classes/python3native.bbclass
+++ b/meta/classes/python3native.bbclass
@@ -1,8 +1,8 @@
1inherit python3-dir 1inherit python3-dir
2 2
3PYTHON="${STAGING_BINDIR_NATIVE}/${PYTHON_PN}-native/${PYTHON_PN}" 3PYTHON="${STAGING_BINDIR_NATIVE}/python3-native/python3"
4EXTRANATIVEPATH += "${PYTHON_PN}-native" 4EXTRANATIVEPATH += "python3-native"
5DEPENDS_append = " ${PYTHON_PN}-native " 5DEPENDS_append = " python3-native "
6 6
7# python-config and other scripts are using distutils modules 7# python-config and other scripts are using distutils modules
8# which we patch to access these variables 8# which we patch to access these variables
diff --git a/meta/classes/pythonnative.bbclass b/meta/classes/pythonnative.bbclass
index 4cc8b2769c..ae6600cd15 100644
--- a/meta/classes/pythonnative.bbclass
+++ b/meta/classes/pythonnative.bbclass
@@ -1,11 +1,11 @@
1 1
2inherit python-dir 2inherit python-dir
3 3
4PYTHON="${STAGING_BINDIR_NATIVE}/${PYTHON_PN}-native/${PYTHON_PN}" 4PYTHON="${STAGING_BINDIR_NATIVE}/python-native/python"
5# PYTHON_EXECUTABLE is used by cmake 5# PYTHON_EXECUTABLE is used by cmake
6PYTHON_EXECUTABLE="${PYTHON}" 6PYTHON_EXECUTABLE="${PYTHON}"
7EXTRANATIVEPATH += "${PYTHON_PN}-native" 7EXTRANATIVEPATH += "python-native"
8DEPENDS_append = " ${PYTHON_PN}-native " 8DEPENDS_append = " python-native "
9 9
10# python-config and other scripts are using distutils modules 10# python-config and other scripts are using distutils modules
11# which we patch to access these variables 11# which we patch to access these variables