blob: 8d0e90862c86c4788fc3f2ebcc96efe8320f37bd [file] [log] [blame]
Patrick Williamsc124f4f2015-09-15 14:41:29 -05001SUMMARY = "The Python Programming Language"
2HOMEPAGE = "http://www.python.org"
3LICENSE = "PSFv2"
4SECTION = "devel/python"
5# bump this on every change in contrib/python/generate-manifest-2.7.py
6INC_PR = "r1"
7
Brad Bishopc342db32019-05-15 21:57:59 -04008LIC_FILES_CHKSUM = "file://LICENSE;md5=e466242989bd33c1bd2b6a526a742498"
Patrick Williamsc124f4f2015-09-15 14:41:29 -05009
Brad Bishop1a4b7ee2018-12-16 17:11:34 -080010SRC_URI = "http://www.python.org/ftp/python/${PV}/Python-${PV}.tar.xz \
Brad Bishop96ff1982019-08-19 13:50:42 -040011 file://bpo-35907-cve-2019-9948.patch \
12 file://bpo-35907-cve-2019-9948-fix.patch \
13 file://bpo-36216-cve-2019-9636.patch \
14 file://bpo-36216-cve-2019-9636-fix.patch \
15 file://CVE-2019-9740.patch \
Brad Bishop1a4b7ee2018-12-16 17:11:34 -080016 "
Patrick Williamsc124f4f2015-09-15 14:41:29 -050017
Brad Bishopc342db32019-05-15 21:57:59 -040018SRC_URI[md5sum] = "30157d85a2c0479c09ea2cbe61f2aaf5"
19SRC_URI[sha256sum] = "f222ef602647eecb6853681156d32de4450a2c39f4de93bd5b20235f2e660ed7"
Patrick Williamsd8c66bc2016-06-20 12:57:21 -050020
21# python recipe is actually python 2.x
22# also, exclude pre-releases for both python 2.x and 3.x
23UPSTREAM_CHECK_REGEX = "[Pp]ython-(?P<pver>2(\.\d+)+).tar"
Patrick Williamsc124f4f2015-09-15 14:41:29 -050024
Brad Bishop6e60e8b2018-02-01 10:27:11 -050025CVE_PRODUCT = "python"
26
Patrick Williamsc124f4f2015-09-15 14:41:29 -050027PYTHON_MAJMIN = "2.7"
28
Brad Bishop6e60e8b2018-02-01 10:27:11 -050029inherit autotools pkgconfig
Patrick Williamsc124f4f2015-09-15 14:41:29 -050030
Patrick Williamsc124f4f2015-09-15 14:41:29 -050031EXTRA_OECONF = "\
32 --with-threads \
33 --with-pymalloc \
34 --without-cxx-main \
35 --with-signal-module \
36 --enable-shared \
37 --enable-ipv6=${@bb.utils.contains('DISTRO_FEATURES', 'ipv6', 'yes', 'no', d)} \
38 ac_cv_header_bluetooth_bluetooth_h=no ac_cv_header_bluetooth_h=no \
39 ${PYTHONLSBOPTS} \
40"
Brad Bishop6e60e8b2018-02-01 10:27:11 -050041
Brad Bishop1a4b7ee2018-12-16 17:11:34 -080042do_configure_prepend() {
43 libdirleaf="$(echo ${libdir} | sed -e 's:${prefix}/::')"
44 sed -i -e "s:SEDMELIBLEAF:${libdirleaf}:g" \
45 ${S}/configure.ac
46}
47
Brad Bishop6e60e8b2018-02-01 10:27:11 -050048do_install_append () {
49 sed -i -e 's:${HOSTTOOLS_DIR}/install:install:g' \
50 -e 's:${HOSTTOOLS_DIR}/mkdir:mkdir:g' \
51 ${D}/${libdir}/python${PYTHON_MAJMIN}/_sysconfigdata.py
52}