aboutsummaryrefslogtreecommitdiffstats
path: root/recipes-devtools/python/python.inc
diff options
context:
space:
mode:
authorRoss Burton <ross.burton@intel.com>2020-01-20 17:14:33 +0000
committerTim Orling <ticotimo@gmail.com>2020-01-20 09:33:23 -0800
commit39ddef6a83eb43857f3d46296a30f68ac27e89d5 (patch)
tree5fc63f954a35455338705b061d74c834c21dc200 /recipes-devtools/python/python.inc
parent909fd91182e55a6e5147ab8bf3e6d56e77b9fef0 (diff)
downloadmeta-python2-39ddef6a83eb43857f3d46296a30f68ac27e89d5.tar.gz
python: add 2.7.17 from oe-core
Python 2 ceased being maintained on the 1st January 2020. All users of Python 2 in oe-core have already been ported to Python 3, so in oe-core 390f3eda Python 2 was finally removed from oe-core itself. The following are added to meta-python2 in this commit: - python and python-native 2.7.17 - python-setuptools - The classes pythonnative, pythondir, distutils, setuptools Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Tim Orling <ticotimo@gmail.com>
Diffstat (limited to 'recipes-devtools/python/python.inc')
-rw-r--r--recipes-devtools/python/python.inc59
1 files changed, 59 insertions, 0 deletions
diff --git a/recipes-devtools/python/python.inc b/recipes-devtools/python/python.inc
new file mode 100644
index 0000000..19a2f3e
--- /dev/null
+++ b/recipes-devtools/python/python.inc
@@ -0,0 +1,59 @@
+SUMMARY = "The Python Programming Language"
+HOMEPAGE = "http://www.python.org"
+LICENSE = "PSFv2"
+SECTION = "devel/python"
+# bump this on every change in contrib/python/generate-manifest-2.7.py
+INC_PR = "r1"
+
+LIC_FILES_CHKSUM = "file://LICENSE;md5=e466242989bd33c1bd2b6a526a742498"
+
+SRC_URI = "http://www.python.org/ftp/python/${PV}/Python-${PV}.tar.xz \
+ "
+
+SRC_URI[md5sum] = "b3b6d2c92f42a60667814358ab9f0cfd"
+SRC_URI[sha256sum] = "4d43f033cdbd0aa7b7023c81b0e986fd11e653b5248dac9144d508f11812ba41"
+
+# python recipe is actually python 2.x
+# also, exclude pre-releases for both python 2.x and 3.x
+UPSTREAM_CHECK_REGEX = "[Pp]ython-(?P<pver>2(\.\d+)+).tar"
+
+CVE_PRODUCT = "python"
+
+# Upstream agreement is that these are not security issues:
+# https://bugs.python.org/issue32367
+CVE_CHECK_WHITELIST += "CVE-2017-17522"
+# https://bugs.python.org/issue32056
+CVE_CHECK_WHITELIST += "CVE-2017-18207"
+
+# Windows-only, "It was determined that this is a longtime behavior
+# of Python that cannot really be altered at this point."
+CVE_CHECK_WHITELIST += "CVE-2015-5652"
+
+# This is not exploitable when glibc has CVE-2016-10739 fixed.
+CVE_CHECK_WHITELIST += "CVE-2019-18348"
+
+PYTHON_MAJMIN = "2.7"
+
+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_configure_prepend() {
+ libdirleaf="$(echo ${libdir} | sed -e 's:${prefix}/::')"
+ sed -i -e "s:SEDMELIBLEAF:${libdirleaf}:g" \
+ ${S}/configure.ac
+}
+
+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
+}