diff options
author | Ross Burton <ross.burton@intel.com> | 2018-09-11 12:52:38 +0100 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2018-09-13 07:42:28 +0100 |
commit | 53535f67aef011f0fe8365ef99ca01b8b00e4b9e (patch) | |
tree | 50bb225f08d286e4122839a14394dd4eef3e0dc4 /meta | |
parent | 3c32b1525ad5ce3ec82542846369547efc62f25a (diff) | |
download | poky-53535f67aef011f0fe8365ef99ca01b8b00e4b9e.tar.gz |
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>
Diffstat (limited to 'meta')
-rw-r--r-- | meta/recipes-devtools/python/python3-native_3.5.6.bb | 17 | ||||
-rw-r--r-- | meta/recipes-devtools/python/python3.inc | 42 | ||||
-rw-r--r-- | meta/recipes-devtools/python/python3_3.5.6.bb | 19 |
3 files changed, 45 insertions, 33 deletions
diff --git a/meta/recipes-devtools/python/python3-native_3.5.6.bb b/meta/recipes-devtools/python/python3-native_3.5.6.bb index 847d001fce..d5953cf4bb 100644 --- a/meta/recipes-devtools/python/python3-native_3.5.6.bb +++ b/meta/recipes-devtools/python/python3-native_3.5.6.bb | |||
@@ -1,7 +1,5 @@ | |||
1 | require recipes-devtools/python/python.inc | 1 | require recipes-devtools/python/python3.inc |
2 | 2 | ||
3 | PR = "${INC_PR}.0" | ||
4 | PYTHON_MAJMIN = "3.5" | ||
5 | DISTRO_SRC_URI ?= "file://sitecustomize.py" | 3 | DISTRO_SRC_URI ?= "file://sitecustomize.py" |
6 | DISTRO_SRC_URI_linuxstdbase = "" | 4 | DISTRO_SRC_URI_linuxstdbase = "" |
7 | SRC_URI = "http://www.python.org/ftp/python/${PV}/Python-${PV}.tar.xz \ | 5 | 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 \ | |||
31 | file://0005-bpo-30714-ALPN-changes-for-OpenSSL-1.1.0f-2305.patch \ | 29 | file://0005-bpo-30714-ALPN-changes-for-OpenSSL-1.1.0f-2305.patch \ |
32 | " | 30 | " |
33 | 31 | ||
34 | SRC_URI[md5sum] = "f5a99f765e765336a3ebbb2a24ca2be3" | ||
35 | SRC_URI[sha256sum] = "f55cde04f521f273c7cba08912921cc5642cfc15ca7b22d5829f0aff4371155f" | ||
36 | |||
37 | LIC_FILES_CHKSUM = "file://LICENSE;md5=b6ec515b22618f55fa07276b897bacea" | ||
38 | |||
39 | # exclude pre-releases for both python 2.x and 3.x | ||
40 | UPSTREAM_CHECK_REGEX = "[Pp]ython-(?P<pver>\d+(\.\d+)+).tar" | ||
41 | |||
42 | S = "${WORKDIR}/Python-${PV}" | ||
43 | |||
44 | EXTRANATIVEPATH += "bzip2-native" | 32 | EXTRANATIVEPATH += "bzip2-native" |
45 | DEPENDS = "openssl-native bzip2-replacement-native zlib-native readline-native sqlite3-native gdbm-native" | 33 | DEPENDS = "openssl-native bzip2-replacement-native zlib-native readline-native sqlite3-native gdbm-native" |
46 | 34 | ||
@@ -56,9 +44,6 @@ EXTRA_OEMAKE = '\ | |||
56 | ARCH=${TARGET_ARCH} \ | 44 | ARCH=${TARGET_ARCH} \ |
57 | ' | 45 | ' |
58 | 46 | ||
59 | # No ctypes option for python 3 | ||
60 | PYTHONLSBOPTS = "" | ||
61 | |||
62 | do_configure_append() { | 47 | do_configure_append() { |
63 | autoreconf --verbose --install --force --exclude=autopoint ../Python-${PV}/Modules/_ctypes/libffi | 48 | autoreconf --verbose --install --force --exclude=autopoint ../Python-${PV}/Modules/_ctypes/libffi |
64 | sed -i -e 's,#define HAVE_GETRANDOM 1,/\* #undef HAVE_GETRANDOM \*/,' ${B}/pyconfig.h | 49 | sed -i -e 's,#define HAVE_GETRANDOM 1,/\* #undef HAVE_GETRANDOM \*/,' ${B}/pyconfig.h |
diff --git a/meta/recipes-devtools/python/python3.inc b/meta/recipes-devtools/python/python3.inc new file mode 100644 index 0000000000..3207f91ab8 --- /dev/null +++ b/meta/recipes-devtools/python/python3.inc | |||
@@ -0,0 +1,42 @@ | |||
1 | SUMMARY = "The Python Programming Language" | ||
2 | HOMEPAGE = "http://www.python.org" | ||
3 | LICENSE = "PSFv2" | ||
4 | SECTION = "devel/python" | ||
5 | |||
6 | # TODO Remove this when we upgrade | ||
7 | INC_PR = "r1" | ||
8 | PR = "${INC_PR}.0" | ||
9 | |||
10 | LIC_FILES_CHKSUM = "file://LICENSE;md5=b6ec515b22618f55fa07276b897bacea" | ||
11 | |||
12 | # TODO consolidate patch set | ||
13 | SRC_URI[md5sum] = "f5a99f765e765336a3ebbb2a24ca2be3" | ||
14 | SRC_URI[sha256sum] = "f55cde04f521f273c7cba08912921cc5642cfc15ca7b22d5829f0aff4371155f" | ||
15 | |||
16 | # exclude pre-releases for both python 2.x and 3.x | ||
17 | UPSTREAM_CHECK_REGEX = "[Pp]ython-(?P<pver>\d+(\.\d+)+).tar" | ||
18 | |||
19 | CVE_PRODUCT = "python" | ||
20 | |||
21 | PYTHON_MAJMIN = "3.5" | ||
22 | PYTHON_BINABI = "${PYTHON_MAJMIN}m" | ||
23 | |||
24 | S = "${WORKDIR}/Python-${PV}" | ||
25 | |||
26 | inherit autotools pkgconfig | ||
27 | |||
28 | EXTRA_OECONF = "\ | ||
29 | --with-threads \ | ||
30 | --with-pymalloc \ | ||
31 | --without-cxx-main \ | ||
32 | --with-signal-module \ | ||
33 | --enable-shared \ | ||
34 | --enable-ipv6=${@bb.utils.contains('DISTRO_FEATURES', 'ipv6', 'yes', 'no', d)} \ | ||
35 | ac_cv_header_bluetooth_bluetooth_h=no ac_cv_header_bluetooth_h=no \ | ||
36 | " | ||
37 | |||
38 | do_install_append () { | ||
39 | sed -i -e 's:${HOSTTOOLS_DIR}/install:install:g' \ | ||
40 | -e 's:${HOSTTOOLS_DIR}/mkdir:mkdir:g' \ | ||
41 | ${D}/${libdir}/python${PYTHON_MAJMIN}/_sysconfigdata.py | ||
42 | } | ||
diff --git a/meta/recipes-devtools/python/python3_3.5.6.bb b/meta/recipes-devtools/python/python3_3.5.6.bb index 17f379441e..c2af5e9b48 100644 --- a/meta/recipes-devtools/python/python3_3.5.6.bb +++ b/meta/recipes-devtools/python/python3_3.5.6.bb | |||
@@ -1,12 +1,9 @@ | |||
1 | require recipes-devtools/python/python.inc | 1 | require recipes-devtools/python/python3.inc |
2 | 2 | ||
3 | DEPENDS = "python3-native libffi bzip2 gdbm openssl \ | 3 | DEPENDS = "python3-native libffi bzip2 gdbm openssl \ |
4 | sqlite3 zlib virtual/libintl xz qemu-native \ | 4 | sqlite3 zlib virtual/libintl xz qemu-native \ |
5 | qemu-helper-native virtual/crypt" | 5 | qemu-helper-native virtual/crypt" |
6 | 6 | ||
7 | PR = "${INC_PR}.0" | ||
8 | PYTHON_MAJMIN = "3.5" | ||
9 | PYTHON_BINABI = "${PYTHON_MAJMIN}m" | ||
10 | DISTRO_SRC_URI ?= "file://sitecustomize.py" | 7 | DISTRO_SRC_URI ?= "file://sitecustomize.py" |
11 | DISTRO_SRC_URI_linuxstdbase = "" | 8 | DISTRO_SRC_URI_linuxstdbase = "" |
12 | SRC_URI = "http://www.python.org/ftp/python/${PV}/Python-${PV}.tar.xz \ | 9 | SRC_URI = "http://www.python.org/ftp/python/${PV}/Python-${PV}.tar.xz \ |
@@ -48,17 +45,8 @@ SRC_URI += "\ | |||
48 | file://0004-bpo-33570-TLS-1.3-ciphers-for-OpenSSL-1.1.1-GH-6976.patch \ | 45 | file://0004-bpo-33570-TLS-1.3-ciphers-for-OpenSSL-1.1.1-GH-6976.patch \ |
49 | file://0005-bpo-30714-ALPN-changes-for-OpenSSL-1.1.0f-2305.patch \ | 46 | file://0005-bpo-30714-ALPN-changes-for-OpenSSL-1.1.0f-2305.patch \ |
50 | " | 47 | " |
51 | SRC_URI[md5sum] = "f5a99f765e765336a3ebbb2a24ca2be3" | ||
52 | SRC_URI[sha256sum] = "f55cde04f521f273c7cba08912921cc5642cfc15ca7b22d5829f0aff4371155f" | ||
53 | 48 | ||
54 | LIC_FILES_CHKSUM = "file://LICENSE;md5=b6ec515b22618f55fa07276b897bacea" | 49 | inherit multilib_header python3native update-alternatives qemu |
55 | |||
56 | # exclude pre-releases for both python 2.x and 3.x | ||
57 | UPSTREAM_CHECK_REGEX = "[Pp]ython-(?P<pver>\d+(\.\d+)+).tar" | ||
58 | |||
59 | S = "${WORKDIR}/Python-${PV}" | ||
60 | |||
61 | inherit autotools multilib_header python3native pkgconfig update-alternatives qemu | ||
62 | 50 | ||
63 | MULTILIB_SUFFIX = "${@d.getVar('base_libdir',1).split('/')[-1]}" | 51 | MULTILIB_SUFFIX = "${@d.getVar('base_libdir',1).split('/')[-1]}" |
64 | 52 | ||
@@ -91,9 +79,6 @@ export CCSHARED = "-fPIC" | |||
91 | # Fix cross compilation of different modules | 79 | # Fix cross compilation of different modules |
92 | export CROSSPYTHONPATH = "${STAGING_LIBDIR_NATIVE}/python${PYTHON_MAJMIN}/lib-dynload/:${B}/build/lib.linux-${TARGET_ARCH}-${PYTHON_MAJMIN}:${S}/Lib:${S}/Lib/plat-linux" | 80 | export CROSSPYTHONPATH = "${STAGING_LIBDIR_NATIVE}/python${PYTHON_MAJMIN}/lib-dynload/:${B}/build/lib.linux-${TARGET_ARCH}-${PYTHON_MAJMIN}:${S}/Lib:${S}/Lib/plat-linux" |
93 | 81 | ||
94 | # No ctypes option for python 3 | ||
95 | PYTHONLSBOPTS = "" | ||
96 | |||
97 | PACKAGECONFIG ??= "readline ${@bb.utils.contains('MACHINE_FEATURES', 'qemu-usermode', 'pgo', '', d)}" | 82 | PACKAGECONFIG ??= "readline ${@bb.utils.contains('MACHINE_FEATURES', 'qemu-usermode', 'pgo', '', d)}" |
98 | PACKAGECONFIG[readline] = ",,readline" | 83 | PACKAGECONFIG[readline] = ",,readline" |
99 | # Use profile guided optimisation by running PyBench inside qemu-user | 84 | # Use profile guided optimisation by running PyBench inside qemu-user |