summaryrefslogtreecommitdiff
path: root/poky/meta/recipes-devtools/python
diff options
context:
space:
mode:
Diffstat (limited to 'poky/meta/recipes-devtools/python')
-rw-r--r--poky/meta/recipes-devtools/python/python-extras.inc2
-rw-r--r--poky/meta/recipes-devtools/python/python-pbr.inc2
-rw-r--r--poky/meta/recipes-devtools/python/python-setuptools.inc6
-rw-r--r--poky/meta/recipes-devtools/python/python-six.inc2
-rw-r--r--poky/meta/recipes-devtools/python/python-subunit.inc2
-rw-r--r--poky/meta/recipes-devtools/python/python-testtools.inc2
-rw-r--r--poky/meta/recipes-devtools/python/python3-dbusmock_0.19.bb1
-rw-r--r--poky/meta/recipes-devtools/python/python3-iniparse_0.4.bb2
-rw-r--r--poky/meta/recipes-devtools/python/python3-pip_20.0.2.bb2
-rw-r--r--poky/meta/recipes-devtools/python/python3-setuptools/0001-ScriptWriter-create-more-efficient-usr-bin-wrappers-signoff-included.patch62
-rw-r--r--poky/meta/recipes-devtools/python/python3_3.8.3.bb23
11 files changed, 90 insertions, 16 deletions
diff --git a/poky/meta/recipes-devtools/python/python-extras.inc b/poky/meta/recipes-devtools/python/python-extras.inc
index b5e11b711..335bde272 100644
--- a/poky/meta/recipes-devtools/python/python-extras.inc
+++ b/poky/meta/recipes-devtools/python/python-extras.inc
@@ -1,5 +1,5 @@
SUMMARY = "Useful extra bits for Python - things that should be in the standard library"
-HOMEPAGE = "https://pypi.python.org/pypi/extras/"
+HOMEPAGE = "https://pypi.org/project/extras/"
SECTION = "devel/python"
LICENSE = "Apache-2.0"
LIC_FILES_CHKSUM = "file://LICENSE;md5=6d108f338b2f68fe48ac366c4650bd8b"
diff --git a/poky/meta/recipes-devtools/python/python-pbr.inc b/poky/meta/recipes-devtools/python/python-pbr.inc
index ce3c224d5..bc470e727 100644
--- a/poky/meta/recipes-devtools/python/python-pbr.inc
+++ b/poky/meta/recipes-devtools/python/python-pbr.inc
@@ -1,6 +1,6 @@
SUMMARY = "Python Build Reasonableness"
DESCRIPTION = "PBR is a library that injects some useful and sensible default behaviors into your setuptools run"
-HOMEPAGE = "https://pypi.python.org/pypi/pbr"
+HOMEPAGE = "https://pypi.org/project/pbr"
SECTION = "devel/python"
LICENSE = "Apache-2.0"
LIC_FILES_CHKSUM = "file://LICENSE;md5=1dece7821bf3fd70fe1309eaa37d52a2"
diff --git a/poky/meta/recipes-devtools/python/python-setuptools.inc b/poky/meta/recipes-devtools/python/python-setuptools.inc
index 032d33742..3222de707 100644
--- a/poky/meta/recipes-devtools/python/python-setuptools.inc
+++ b/poky/meta/recipes-devtools/python/python-setuptools.inc
@@ -1,5 +1,5 @@
SUMMARY = "Download, build, install, upgrade, and uninstall Python packages"
-HOMEPAGE = "https://pypi.python.org/pypi/setuptools"
+HOMEPAGE = "https://pypi.org/project/setuptools"
SECTION = "devel/python"
LICENSE = "MIT"
LIC_FILES_CHKSUM = "file://LICENSE;beginline=1;endline=19;md5=9a33897f1bca1160d7aad3835152e158"
@@ -10,7 +10,9 @@ inherit pypi
SRC_URI_append_class-native = " file://0001-conditionally-do-not-fetch-code-by-easy_install.patch"
-SRC_URI += "file://0001-change-shebang-to-python3.patch"
+SRC_URI += "file://0001-change-shebang-to-python3.patch \
+ file://0001-ScriptWriter-create-more-efficient-usr-bin-wrappers-signoff-included.patch \
+ "
SRC_URI[md5sum] = "6e9de90b242fdd60ef59f497424ce13a"
SRC_URI[sha256sum] = "145fa62b9d7bb544fce16e9b5a9bf4ab2032d2f758b7cd674af09a92736aff74"
diff --git a/poky/meta/recipes-devtools/python/python-six.inc b/poky/meta/recipes-devtools/python/python-six.inc
index 05b32810b..df97f845b 100644
--- a/poky/meta/recipes-devtools/python/python-six.inc
+++ b/poky/meta/recipes-devtools/python/python-six.inc
@@ -1,5 +1,5 @@
SUMMARY = "Python 2 and 3 compatibility library"
-HOMEPAGE = "https://pypi.python.org/pypi/six/"
+HOMEPAGE = "https://pypi.org/project/six/"
SECTION = "devel/python"
LICENSE = "MIT"
LIC_FILES_CHKSUM = "file://LICENSE;md5=43cfc9e4ac0e377acfb9b76f56b8415d"
diff --git a/poky/meta/recipes-devtools/python/python-subunit.inc b/poky/meta/recipes-devtools/python/python-subunit.inc
index fc63b38aa..a2f9c5c3f 100644
--- a/poky/meta/recipes-devtools/python/python-subunit.inc
+++ b/poky/meta/recipes-devtools/python/python-subunit.inc
@@ -1,5 +1,5 @@
SUMMARY = "Python implementation of subunit test streaming protocol"
-HOMEPAGE = "https://pypi.python.org/pypi/python-subunit/"
+HOMEPAGE = "https://pypi.org/project/python-subunit/"
SECTION = "devel/python"
LICENSE = "Apache-2.0"
LIC_FILES_CHKSUM = "file://README.rst;beginline=1;endline=20;md5=909c08e291647fd985fbe5d9836d51b6"
diff --git a/poky/meta/recipes-devtools/python/python-testtools.inc b/poky/meta/recipes-devtools/python/python-testtools.inc
index f1f1e2646..e8d308b71 100644
--- a/poky/meta/recipes-devtools/python/python-testtools.inc
+++ b/poky/meta/recipes-devtools/python/python-testtools.inc
@@ -1,5 +1,5 @@
SUMMARY = "Extensions to the Python standard library unit testing framework"
-HOMEPAGE = "https://pypi.python.org/pypi/testtools/"
+HOMEPAGE = "https://pypi.org/project/testtools/"
SECTION = "devel/python"
LICENSE = "Apache-2.0"
LIC_FILES_CHKSUM = "file://LICENSE;md5=e2c9d3e8ba7141c83bfef190e0b9379a"
diff --git a/poky/meta/recipes-devtools/python/python3-dbusmock_0.19.bb b/poky/meta/recipes-devtools/python/python3-dbusmock_0.19.bb
index 5389e4897..d297dbc1d 100644
--- a/poky/meta/recipes-devtools/python/python3-dbusmock_0.19.bb
+++ b/poky/meta/recipes-devtools/python/python3-dbusmock_0.19.bb
@@ -12,5 +12,6 @@ inherit pypi setuptools3
RDEPENDS_${PN} += "\
${PYTHON_PN}-dbus \
${PYTHON_PN}-pygobject \
+ ${PYTHON_PN}-unittest \
${PYTHON_PN}-xml \
"
diff --git a/poky/meta/recipes-devtools/python/python3-iniparse_0.4.bb b/poky/meta/recipes-devtools/python/python3-iniparse_0.4.bb
index 4eba9ecd3..47cd6598c 100644
--- a/poky/meta/recipes-devtools/python/python3-iniparse_0.4.bb
+++ b/poky/meta/recipes-devtools/python/python3-iniparse_0.4.bb
@@ -1,5 +1,5 @@
SUMMARY = "Accessing and Modifying INI files"
-HOMEPAGE = "https://pypi.python.org/pypi/iniparse/"
+HOMEPAGE = "https://pypi.org/project/iniparse/"
LICENSE = "MIT & PSF"
LIC_FILES_CHKSUM = "file://LICENSE-PSF;md5=1c78a5bb3584b353496d5f6f34edb4b2 \
file://LICENSE;md5=52f28065af11d69382693b45b5a8eb54"
diff --git a/poky/meta/recipes-devtools/python/python3-pip_20.0.2.bb b/poky/meta/recipes-devtools/python/python3-pip_20.0.2.bb
index 96973db77..99eeea2ed 100644
--- a/poky/meta/recipes-devtools/python/python3-pip_20.0.2.bb
+++ b/poky/meta/recipes-devtools/python/python3-pip_20.0.2.bb
@@ -1,5 +1,5 @@
SUMMARY = "The PyPA recommended tool for installing Python packages"
-HOMEPAGE = "https://pypi.python.org/pypi/pip"
+HOMEPAGE = "https://pypi.org/project/pip"
SECTION = "devel/python"
LICENSE = "MIT"
LIC_FILES_CHKSUM = "file://LICENSE.txt;md5=8ba06d529c955048e5ddd7c45459eb2e"
diff --git a/poky/meta/recipes-devtools/python/python3-setuptools/0001-ScriptWriter-create-more-efficient-usr-bin-wrappers-signoff-included.patch b/poky/meta/recipes-devtools/python/python3-setuptools/0001-ScriptWriter-create-more-efficient-usr-bin-wrappers-signoff-included.patch
new file mode 100644
index 000000000..7e931c845
--- /dev/null
+++ b/poky/meta/recipes-devtools/python/python3-setuptools/0001-ScriptWriter-create-more-efficient-usr-bin-wrappers-signoff-included.patch
@@ -0,0 +1,62 @@
+From aae8cd3de3f289cea3db01212579913c925191e8 Mon Sep 17 00:00:00 2001
+From: Lauri Tirkkonen <lauri.tirkkonen.ext@nokia.com>
+Date: Thu, 26 Mar 2020 14:24:25 +0000
+Subject: [PATCH] ScriptWriter: create more efficient /usr/bin wrappers
+
+Upstream setuptools writes scripts to /usr/bin that do insanely much
+stuff at runtime. https://github.com/pypa/setuptools/issues/510
+
+Since the script entry points are already known at build time, we can
+just write those directly into the /usr/bin wrapper, avoiding the
+expensive 'pkg_resources' import at runtime. The idea is from
+https://github.com/ninjaaron/fast-entry_points but patched directly into
+the native build of setuptools here, so that all Python modules under
+bitbake automatically use it without needing additional build time
+dependencies.
+
+Upstream-Status: Pending
+
+Signed-off-by: Lauri Tirkkonen <lauri.tirkkonen.ext@nokia.com>
+Signed-off-by: Trevor Gamblin <trevor.gamblin@windriver.com>
+---
+ setuptools/command/easy_install.py | 14 ++++++--------
+ 1 file changed, 6 insertions(+), 8 deletions(-)
+
+diff --git a/setuptools/command/easy_install.py b/setuptools/command/easy_install.py
+index 8fba7b41..03a72714 100755
+--- a/setuptools/command/easy_install.py
++++ b/setuptools/command/easy_install.py
+@@ -2023,17 +2023,12 @@ class ScriptWriter(object):
+ """
+
+ template = textwrap.dedent(r"""
+- # EASY-INSTALL-ENTRY-SCRIPT: %(spec)r,%(group)r,%(name)r
+- __requires__ = %(spec)r
+- import re
+ import sys
+- from pkg_resources import load_entry_point
++
++ from %(module)s import %(ep0)s
+
+ if __name__ == '__main__':
+- sys.argv[0] = re.sub(r'(-script\.pyw?|\.exe)?$', '', sys.argv[0])
+- sys.exit(
+- load_entry_point(%(spec)r, %(group)r, %(name)r)()
+- )
++ sys.exit(%(entrypoint)s())
+ """).lstrip()
+
+ command_spec_class = CommandSpec
+@@ -2068,6 +2063,9 @@ class ScriptWriter(object):
+ for type_ in 'console', 'gui':
+ group = type_ + '_scripts'
+ for name, ep in dist.get_entry_map(group).items():
++ module = ep.module_name
++ ep0 = ep.attrs[0]
++ entrypoint = '.'.join(ep.attrs)
+ cls._ensure_safe_name(name)
+ script_text = cls.template % locals()
+ args = cls._get_script_args(type_, name, header, script_text)
+--
+2.24.1
+
diff --git a/poky/meta/recipes-devtools/python/python3_3.8.3.bb b/poky/meta/recipes-devtools/python/python3_3.8.3.bb
index 4367923b5..2eb2a422e 100644
--- a/poky/meta/recipes-devtools/python/python3_3.8.3.bb
+++ b/poky/meta/recipes-devtools/python/python3_3.8.3.bb
@@ -82,16 +82,16 @@ CACHED_CONFIGUREVARS = " \
ac_cv_file__dev_ptc=no \
ac_cv_working_tzset=yes \
"
-python() {
+
+def possibly_include_pgo(d):
# PGO currently causes builds to not be reproducible, so disable it for
# now. See YOCTO #13407
if bb.utils.contains('MACHINE_FEATURES', 'qemu-usermode', True, False, d) and d.getVar('BUILD_REPRODUCIBLE_BINARIES') != '1':
- d.setVar('PACKAGECONFIG_PGO', 'pgo')
- else:
- d.setVar('PACKAGECONFIG_PGO', '')
-}
+ return 'pgo'
+
+ return ''
-PACKAGECONFIG_class-target ??= "readline ${PACKAGECONFIG_PGO} gdbm"
+PACKAGECONFIG_class-target ??= "readline ${@possibly_include_pgo(d)} gdbm"
PACKAGECONFIG_class-native ??= "readline gdbm"
PACKAGECONFIG_class-nativesdk ??= "readline gdbm"
PACKAGECONFIG[readline] = ",,readline"
@@ -331,7 +331,15 @@ INSANE_SKIP_${PN}-dev += "dev-elf"
# catch all the rest (unsorted)
PACKAGES += "${PN}-misc"
-RDEPENDS_${PN}-misc += "python3-core python3-email python3-codecs python3-pydoc python3-pickle python3-audio"
+RDEPENDS_${PN}-misc += "\
+ ${PN}-core \
+ ${PN}-email \
+ ${PN}-codecs \
+ ${PN}-pydoc \
+ ${PN}-pickle \
+ ${PN}-audio \
+ ${PN}-numbers \
+"
RDEPENDS_${PN}-modules_append_class-target = " ${MLPREFIX}python3-misc"
RDEPENDS_${PN}-modules_append_class-nativesdk = " ${MLPREFIX}python3-misc"
FILES_${PN}-misc = "${libdir}/python${PYTHON_MAJMIN} ${libdir}/python${PYTHON_MAJMIN}/lib-dynload"
@@ -345,6 +353,7 @@ RDEPENDS_libpython3_append_libc-glibc = " libgcc"
RDEPENDS_${PN}-ptest = "${PN}-modules ${PN}-tests unzip bzip2 libgcc tzdata-europe coreutils sed"
RDEPENDS_${PN}-ptest_append_libc-glibc = " locale-base-tr-tr.iso-8859-9"
RDEPENDS_${PN}-tkinter += "${@bb.utils.contains('PACKAGECONFIG', 'tk', 'tk tk-lib', '', d)}"
+RDEPENDS_${PN}-idle += "${@bb.utils.contains('PACKAGECONFIG', 'tk', '${PN}-tkinter tcl', '', d)}"
RDEPENDS_${PN}-dev = ""
RDEPENDS_${PN}-tests_append_class-target = " ${MLPREFIX}bash"