diff options
author | Alexander Kanavin <alexander.kanavin@linux.intel.com> | 2016-04-25 15:57:59 +0300 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2016-06-01 12:38:41 +0100 |
commit | 03da683a55582a05154104abf986678f3d578a6c (patch) | |
tree | e8563eb32796420bd67fde792bd3e33990c6235f | |
parent | 78502a801050b00d303d44d91d9726638ad2d0b3 (diff) | |
download | poky-03da683a55582a05154104abf986678f3d578a6c.tar.gz |
python3-dir.bbclass: add a separate class for Python 3
This is much cleaner than sharing python-dir.bbclass between python 2
and 3 classes, and doing confusing overrides in them.
(From OE-Core rev: 3891fcec863602a0ae6d0f3d305ea50a79a205d9)
Signed-off-by: Alexander Kanavin <alexander.kanavin@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-rw-r--r-- | meta/classes/distutils-common-base.bbclass | 2 | ||||
-rw-r--r-- | meta/classes/distutils3-base.bbclass | 3 | ||||
-rw-r--r-- | meta/classes/python-dir.bbclass | 6 | ||||
-rw-r--r-- | meta/classes/python3-dir.bbclass | 5 | ||||
-rw-r--r-- | meta/classes/python3native.bbclass | 4 |
5 files changed, 9 insertions, 11 deletions
diff --git a/meta/classes/distutils-common-base.bbclass b/meta/classes/distutils-common-base.bbclass index 08511f59cc..dee06b4173 100644 --- a/meta/classes/distutils-common-base.bbclass +++ b/meta/classes/distutils-common-base.bbclass | |||
@@ -1,5 +1,3 @@ | |||
1 | inherit python-dir | ||
2 | |||
3 | EXTRA_OEMAKE = "" | 1 | EXTRA_OEMAKE = "" |
4 | 2 | ||
5 | export STAGING_INCDIR | 3 | export STAGING_INCDIR |
diff --git a/meta/classes/distutils3-base.bbclass b/meta/classes/distutils3-base.bbclass index 2a093d3a8c..82ab6a3d1c 100644 --- a/meta/classes/distutils3-base.bbclass +++ b/meta/classes/distutils3-base.bbclass | |||
@@ -1,8 +1,5 @@ | |||
1 | DEPENDS += "${@["${PYTHON_PN}-native ${PYTHON_PN}", ""][(d.getVar('PACKAGES', True) == '')]}" | 1 | DEPENDS += "${@["${PYTHON_PN}-native ${PYTHON_PN}", ""][(d.getVar('PACKAGES', True) == '')]}" |
2 | RDEPENDS_${PN} += "${@['', '${PYTHON_PN}-core']['${CLASSOVERRIDE}' == 'class-target']}" | 2 | RDEPENDS_${PN} += "${@['', '${PYTHON_PN}-core']['${CLASSOVERRIDE}' == 'class-target']}" |
3 | 3 | ||
4 | PYTHON_BASEVERSION = "3.5" | ||
5 | PYTHON_ABI = "m" | ||
6 | |||
7 | inherit distutils-common-base python3native | 4 | inherit distutils-common-base python3native |
8 | 5 | ||
diff --git a/meta/classes/python-dir.bbclass b/meta/classes/python-dir.bbclass index ebfa4b30f6..a11dc350be 100644 --- a/meta/classes/python-dir.bbclass +++ b/meta/classes/python-dir.bbclass | |||
@@ -1,5 +1,5 @@ | |||
1 | PYTHON_BASEVERSION ?= "2.7" | 1 | PYTHON_BASEVERSION = "2.7" |
2 | PYTHON_ABI ?= "" | 2 | PYTHON_ABI = "" |
3 | PYTHON_DIR = "python${PYTHON_BASEVERSION}" | 3 | PYTHON_DIR = "python${PYTHON_BASEVERSION}" |
4 | PYTHON_PN = "python${@'' if '${PYTHON_BASEVERSION}'.startswith('2') else '3'}" | 4 | PYTHON_PN = "python" |
5 | PYTHON_SITEPACKAGES_DIR = "${libdir}/${PYTHON_DIR}/site-packages" | 5 | PYTHON_SITEPACKAGES_DIR = "${libdir}/${PYTHON_DIR}/site-packages" |
diff --git a/meta/classes/python3-dir.bbclass b/meta/classes/python3-dir.bbclass new file mode 100644 index 0000000000..06bb046d9c --- /dev/null +++ b/meta/classes/python3-dir.bbclass | |||
@@ -0,0 +1,5 @@ | |||
1 | PYTHON_BASEVERSION = "3.5" | ||
2 | PYTHON_ABI = "m" | ||
3 | PYTHON_DIR = "python${PYTHON_BASEVERSION}" | ||
4 | PYTHON_PN = "python3" | ||
5 | PYTHON_SITEPACKAGES_DIR = "${libdir}/${PYTHON_DIR}/site-packages" | ||
diff --git a/meta/classes/python3native.bbclass b/meta/classes/python3native.bbclass index 8ec6b769da..18998636b4 100644 --- a/meta/classes/python3native.bbclass +++ b/meta/classes/python3native.bbclass | |||
@@ -1,6 +1,4 @@ | |||
1 | PYTHON_BASEVERSION = "3.5" | 1 | inherit python3-dir |
2 | |||
3 | inherit python-dir | ||
4 | 2 | ||
5 | PYTHON="${STAGING_BINDIR_NATIVE}/${PYTHON_PN}-native/${PYTHON_PN}" | 3 | PYTHON="${STAGING_BINDIR_NATIVE}/${PYTHON_PN}-native/${PYTHON_PN}" |
6 | EXTRANATIVEPATH += "${PYTHON_PN}-native" | 4 | EXTRANATIVEPATH += "${PYTHON_PN}-native" |