mirror of
https://git.yoctoproject.org/poky
synced 2026-09-14 21:49:33 +02:00
python3: split common assignments into a dedicated python3.inc
Instead of including the Py2 python.inc and having to undo some of the assignments, create a new python3.inc to hold the common configuration. Over time we can move more from the recipes into this file to unify the target and native recipes. (From OE-Core rev: fc4767113adbdfbf4aeaaf6dd8605e7fd4bbaa46) Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
committed by
Richard Purdie
parent
3c32b1525a
commit
53535f67ae
@@ -1,7 +1,5 @@
|
|||||||
require recipes-devtools/python/python.inc
|
require recipes-devtools/python/python3.inc
|
||||||
|
|
||||||
PR = "${INC_PR}.0"
|
|
||||||
PYTHON_MAJMIN = "3.5"
|
|
||||||
DISTRO_SRC_URI ?= "file://sitecustomize.py"
|
DISTRO_SRC_URI ?= "file://sitecustomize.py"
|
||||||
DISTRO_SRC_URI_linuxstdbase = ""
|
DISTRO_SRC_URI_linuxstdbase = ""
|
||||||
SRC_URI = "http://www.python.org/ftp/python/${PV}/Python-${PV}.tar.xz \
|
SRC_URI = "http://www.python.org/ftp/python/${PV}/Python-${PV}.tar.xz \
|
||||||
@@ -31,16 +29,6 @@ file://0004-bpo-33570-TLS-1.3-ciphers-for-OpenSSL-1.1.1-GH-6976.patch \
|
|||||||
file://0005-bpo-30714-ALPN-changes-for-OpenSSL-1.1.0f-2305.patch \
|
file://0005-bpo-30714-ALPN-changes-for-OpenSSL-1.1.0f-2305.patch \
|
||||||
"
|
"
|
||||||
|
|
||||||
SRC_URI[md5sum] = "f5a99f765e765336a3ebbb2a24ca2be3"
|
|
||||||
SRC_URI[sha256sum] = "f55cde04f521f273c7cba08912921cc5642cfc15ca7b22d5829f0aff4371155f"
|
|
||||||
|
|
||||||
LIC_FILES_CHKSUM = "file://LICENSE;md5=b6ec515b22618f55fa07276b897bacea"
|
|
||||||
|
|
||||||
# exclude pre-releases for both python 2.x and 3.x
|
|
||||||
UPSTREAM_CHECK_REGEX = "[Pp]ython-(?P<pver>\d+(\.\d+)+).tar"
|
|
||||||
|
|
||||||
S = "${WORKDIR}/Python-${PV}"
|
|
||||||
|
|
||||||
EXTRANATIVEPATH += "bzip2-native"
|
EXTRANATIVEPATH += "bzip2-native"
|
||||||
DEPENDS = "openssl-native bzip2-replacement-native zlib-native readline-native sqlite3-native gdbm-native"
|
DEPENDS = "openssl-native bzip2-replacement-native zlib-native readline-native sqlite3-native gdbm-native"
|
||||||
|
|
||||||
@@ -56,9 +44,6 @@ EXTRA_OEMAKE = '\
|
|||||||
ARCH=${TARGET_ARCH} \
|
ARCH=${TARGET_ARCH} \
|
||||||
'
|
'
|
||||||
|
|
||||||
# No ctypes option for python 3
|
|
||||||
PYTHONLSBOPTS = ""
|
|
||||||
|
|
||||||
do_configure_append() {
|
do_configure_append() {
|
||||||
autoreconf --verbose --install --force --exclude=autopoint ../Python-${PV}/Modules/_ctypes/libffi
|
autoreconf --verbose --install --force --exclude=autopoint ../Python-${PV}/Modules/_ctypes/libffi
|
||||||
sed -i -e 's,#define HAVE_GETRANDOM 1,/\* #undef HAVE_GETRANDOM \*/,' ${B}/pyconfig.h
|
sed -i -e 's,#define HAVE_GETRANDOM 1,/\* #undef HAVE_GETRANDOM \*/,' ${B}/pyconfig.h
|
||||||
|
|||||||
42
meta/recipes-devtools/python/python3.inc
Normal file
42
meta/recipes-devtools/python/python3.inc
Normal file
@@ -0,0 +1,42 @@
|
|||||||
|
SUMMARY = "The Python Programming Language"
|
||||||
|
HOMEPAGE = "http://www.python.org"
|
||||||
|
LICENSE = "PSFv2"
|
||||||
|
SECTION = "devel/python"
|
||||||
|
|
||||||
|
# TODO Remove this when we upgrade
|
||||||
|
INC_PR = "r1"
|
||||||
|
PR = "${INC_PR}.0"
|
||||||
|
|
||||||
|
LIC_FILES_CHKSUM = "file://LICENSE;md5=b6ec515b22618f55fa07276b897bacea"
|
||||||
|
|
||||||
|
# TODO consolidate patch set
|
||||||
|
SRC_URI[md5sum] = "f5a99f765e765336a3ebbb2a24ca2be3"
|
||||||
|
SRC_URI[sha256sum] = "f55cde04f521f273c7cba08912921cc5642cfc15ca7b22d5829f0aff4371155f"
|
||||||
|
|
||||||
|
# exclude pre-releases for both python 2.x and 3.x
|
||||||
|
UPSTREAM_CHECK_REGEX = "[Pp]ython-(?P<pver>\d+(\.\d+)+).tar"
|
||||||
|
|
||||||
|
CVE_PRODUCT = "python"
|
||||||
|
|
||||||
|
PYTHON_MAJMIN = "3.5"
|
||||||
|
PYTHON_BINABI = "${PYTHON_MAJMIN}m"
|
||||||
|
|
||||||
|
S = "${WORKDIR}/Python-${PV}"
|
||||||
|
|
||||||
|
inherit autotools pkgconfig
|
||||||
|
|
||||||
|
EXTRA_OECONF = "\
|
||||||
|
--with-threads \
|
||||||
|
--with-pymalloc \
|
||||||
|
--without-cxx-main \
|
||||||
|
--with-signal-module \
|
||||||
|
--enable-shared \
|
||||||
|
--enable-ipv6=${@bb.utils.contains('DISTRO_FEATURES', 'ipv6', 'yes', 'no', d)} \
|
||||||
|
ac_cv_header_bluetooth_bluetooth_h=no ac_cv_header_bluetooth_h=no \
|
||||||
|
"
|
||||||
|
|
||||||
|
do_install_append () {
|
||||||
|
sed -i -e 's:${HOSTTOOLS_DIR}/install:install:g' \
|
||||||
|
-e 's:${HOSTTOOLS_DIR}/mkdir:mkdir:g' \
|
||||||
|
${D}/${libdir}/python${PYTHON_MAJMIN}/_sysconfigdata.py
|
||||||
|
}
|
||||||
@@ -1,12 +1,9 @@
|
|||||||
require recipes-devtools/python/python.inc
|
require recipes-devtools/python/python3.inc
|
||||||
|
|
||||||
DEPENDS = "python3-native libffi bzip2 gdbm openssl \
|
DEPENDS = "python3-native libffi bzip2 gdbm openssl \
|
||||||
sqlite3 zlib virtual/libintl xz qemu-native \
|
sqlite3 zlib virtual/libintl xz qemu-native \
|
||||||
qemu-helper-native virtual/crypt"
|
qemu-helper-native virtual/crypt"
|
||||||
|
|
||||||
PR = "${INC_PR}.0"
|
|
||||||
PYTHON_MAJMIN = "3.5"
|
|
||||||
PYTHON_BINABI = "${PYTHON_MAJMIN}m"
|
|
||||||
DISTRO_SRC_URI ?= "file://sitecustomize.py"
|
DISTRO_SRC_URI ?= "file://sitecustomize.py"
|
||||||
DISTRO_SRC_URI_linuxstdbase = ""
|
DISTRO_SRC_URI_linuxstdbase = ""
|
||||||
SRC_URI = "http://www.python.org/ftp/python/${PV}/Python-${PV}.tar.xz \
|
SRC_URI = "http://www.python.org/ftp/python/${PV}/Python-${PV}.tar.xz \
|
||||||
@@ -48,17 +45,8 @@ SRC_URI += "\
|
|||||||
file://0004-bpo-33570-TLS-1.3-ciphers-for-OpenSSL-1.1.1-GH-6976.patch \
|
file://0004-bpo-33570-TLS-1.3-ciphers-for-OpenSSL-1.1.1-GH-6976.patch \
|
||||||
file://0005-bpo-30714-ALPN-changes-for-OpenSSL-1.1.0f-2305.patch \
|
file://0005-bpo-30714-ALPN-changes-for-OpenSSL-1.1.0f-2305.patch \
|
||||||
"
|
"
|
||||||
SRC_URI[md5sum] = "f5a99f765e765336a3ebbb2a24ca2be3"
|
|
||||||
SRC_URI[sha256sum] = "f55cde04f521f273c7cba08912921cc5642cfc15ca7b22d5829f0aff4371155f"
|
|
||||||
|
|
||||||
LIC_FILES_CHKSUM = "file://LICENSE;md5=b6ec515b22618f55fa07276b897bacea"
|
inherit multilib_header python3native update-alternatives qemu
|
||||||
|
|
||||||
# exclude pre-releases for both python 2.x and 3.x
|
|
||||||
UPSTREAM_CHECK_REGEX = "[Pp]ython-(?P<pver>\d+(\.\d+)+).tar"
|
|
||||||
|
|
||||||
S = "${WORKDIR}/Python-${PV}"
|
|
||||||
|
|
||||||
inherit autotools multilib_header python3native pkgconfig update-alternatives qemu
|
|
||||||
|
|
||||||
MULTILIB_SUFFIX = "${@d.getVar('base_libdir',1).split('/')[-1]}"
|
MULTILIB_SUFFIX = "${@d.getVar('base_libdir',1).split('/')[-1]}"
|
||||||
|
|
||||||
@@ -91,9 +79,6 @@ export CCSHARED = "-fPIC"
|
|||||||
# Fix cross compilation of different modules
|
# Fix cross compilation of different modules
|
||||||
export CROSSPYTHONPATH = "${STAGING_LIBDIR_NATIVE}/python${PYTHON_MAJMIN}/lib-dynload/:${B}/build/lib.linux-${TARGET_ARCH}-${PYTHON_MAJMIN}:${S}/Lib:${S}/Lib/plat-linux"
|
export CROSSPYTHONPATH = "${STAGING_LIBDIR_NATIVE}/python${PYTHON_MAJMIN}/lib-dynload/:${B}/build/lib.linux-${TARGET_ARCH}-${PYTHON_MAJMIN}:${S}/Lib:${S}/Lib/plat-linux"
|
||||||
|
|
||||||
# No ctypes option for python 3
|
|
||||||
PYTHONLSBOPTS = ""
|
|
||||||
|
|
||||||
PACKAGECONFIG ??= "readline ${@bb.utils.contains('MACHINE_FEATURES', 'qemu-usermode', 'pgo', '', d)}"
|
PACKAGECONFIG ??= "readline ${@bb.utils.contains('MACHINE_FEATURES', 'qemu-usermode', 'pgo', '', d)}"
|
||||||
PACKAGECONFIG[readline] = ",,readline"
|
PACKAGECONFIG[readline] = ",,readline"
|
||||||
# Use profile guided optimisation by running PyBench inside qemu-user
|
# Use profile guided optimisation by running PyBench inside qemu-user
|
||||||
|
|||||||
Reference in New Issue
Block a user