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>
This commit is contained in:
parent
78502a8010
commit
03da683a55
|
@ -1,5 +1,3 @@
|
||||||
inherit python-dir
|
|
||||||
|
|
||||||
EXTRA_OEMAKE = ""
|
EXTRA_OEMAKE = ""
|
||||||
|
|
||||||
export STAGING_INCDIR
|
export STAGING_INCDIR
|
||||||
|
|
|
@ -1,8 +1,5 @@
|
||||||
DEPENDS += "${@["${PYTHON_PN}-native ${PYTHON_PN}", ""][(d.getVar('PACKAGES', True) == '')]}"
|
DEPENDS += "${@["${PYTHON_PN}-native ${PYTHON_PN}", ""][(d.getVar('PACKAGES', True) == '')]}"
|
||||||
RDEPENDS_${PN} += "${@['', '${PYTHON_PN}-core']['${CLASSOVERRIDE}' == 'class-target']}"
|
RDEPENDS_${PN} += "${@['', '${PYTHON_PN}-core']['${CLASSOVERRIDE}' == 'class-target']}"
|
||||||
|
|
||||||
PYTHON_BASEVERSION = "3.5"
|
|
||||||
PYTHON_ABI = "m"
|
|
||||||
|
|
||||||
inherit distutils-common-base python3native
|
inherit distutils-common-base python3native
|
||||||
|
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
PYTHON_BASEVERSION ?= "2.7"
|
PYTHON_BASEVERSION = "2.7"
|
||||||
PYTHON_ABI ?= ""
|
PYTHON_ABI = ""
|
||||||
PYTHON_DIR = "python${PYTHON_BASEVERSION}"
|
PYTHON_DIR = "python${PYTHON_BASEVERSION}"
|
||||||
PYTHON_PN = "python${@'' if '${PYTHON_BASEVERSION}'.startswith('2') else '3'}"
|
PYTHON_PN = "python"
|
||||||
PYTHON_SITEPACKAGES_DIR = "${libdir}/${PYTHON_DIR}/site-packages"
|
PYTHON_SITEPACKAGES_DIR = "${libdir}/${PYTHON_DIR}/site-packages"
|
||||||
|
|
|
@ -0,0 +1,5 @@
|
||||||
|
PYTHON_BASEVERSION = "3.5"
|
||||||
|
PYTHON_ABI = "m"
|
||||||
|
PYTHON_DIR = "python${PYTHON_BASEVERSION}"
|
||||||
|
PYTHON_PN = "python3"
|
||||||
|
PYTHON_SITEPACKAGES_DIR = "${libdir}/${PYTHON_DIR}/site-packages"
|
|
@ -1,6 +1,4 @@
|
||||||
PYTHON_BASEVERSION = "3.5"
|
inherit python3-dir
|
||||||
|
|
||||||
inherit python-dir
|
|
||||||
|
|
||||||
PYTHON="${STAGING_BINDIR_NATIVE}/${PYTHON_PN}-native/${PYTHON_PN}"
|
PYTHON="${STAGING_BINDIR_NATIVE}/${PYTHON_PN}-native/${PYTHON_PN}"
|
||||||
EXTRANATIVEPATH += "${PYTHON_PN}-native"
|
EXTRANATIVEPATH += "${PYTHON_PN}-native"
|
||||||
|
|
Loading…
Reference in New Issue