python3-numpy: Upgrade to 1.19.4
PATCH v2 1/7 python3-numpy: Upgrade to 1.19.4
Unify inc file into single recipe, py2 is gone
---
meta/recipes-devtools/python-numpy/python3-numpy_1.19.3.bb | 3 ---
.../{python-numpy.inc => python3-numpy_1.19.4.bb} | 6 ++++--
2 files changed, 4 insertions(+), 5 deletions(-)
delete mode 100644 meta/recipes-devtools/python-numpy/python3-numpy_1.19.3.bb
rename meta/recipes-devtools/python-numpy/{python-numpy.inc => python3-numpy_1.19.4.bb} (94%)meta/recipes-devtools/python-numpy/python3-numpy_1.19.3.bb deleted +0 -3
@@ -1,3 +0,0 @@ -inherit setuptools3 -require python-numpy.inc -
meta/recipes-devtools/python-numpy/python3-numpy_1.19.4.bb renamed from meta/recipes-devtools/python-numpy/python-numpy.inc +4 -2
@@ -8,14 +8,16 @@ SRCNAME = "numpy" SRC_URI = "https://github.com/${SRCNAME}/${SRCNAME}/releases/download/v${PV}/${SRCNAME}-${PV}.tar.gz \ file://0001-Don-t-search-usr-and-so-on-for-libraries-by-default-.patch \ file://0001-numpy-core-Define-RISCV-32-support.patch \ - " -SRC_URI[sha256sum] = "9179d259a9bc53ed7b153d31fc3156d1ca560d61079f53191cf177c3efc4a498" +" +SRC_URI[sha256sum] = "fe836a685d6838dbb3f603caef01183ea98e88febf4ce956a2ea484a75378413" UPSTREAM_CHECK_URI = "https://github.com/numpy/numpy/releases" UPSTREAM_CHECK_REGEX = "(?P<pver>\d+(\.\d+)+)\.tar" DEPENDS += "python3-cython-native" +inherit setuptools3 + S = "${WORKDIR}/numpy-${PV}" CLEANBROKEN = "1"
Signature · 1 line
2.29.2
PATCH v2 2/7 python3-hypothesis: Add recipe
Its used in many python packages for testing eg. numpy
--- .../python/python3-hypothesis_5.41.2.bb | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 meta/recipes-devtools/python/python3-hypothesis_5.41.2.bb
meta/recipes-devtools/python/python3-hypothesis_5.41.2.bb new file +14 -0
@@ -0,0 +1,14 @@ +SUMMARY = "A library for property-based testing" +HOMEPAGE = "https://github.com/HypothesisWorks/hypothesis/tree/master/hypothesis-python" +LICENSE = "MPL-2.0" +LIC_FILES_CHKSUM = "file://LICENSE.txt;md5=4ee62c16ebd0f4f99d906f36b7de8c3c" + +PYPI_PACKAGE = "hypothesis" + +inherit pypi setuptools3 + +SRC_URI[sha256sum] = "f8c281355aaba1da696e40f1488c2bb47c42660424f5750daea45a85e2d047b3" + +RDEPENDS_${PN} += "python3-core" + +BBCLASSEXTEND = "native nativesdk"
Signature · 1 line
2.29.2
PATCH v2 3/7 python3-sortedcontainers: Add recipe
In reply to Khem RajUsed in some python package testing infrastructures
--- .../python/python3-sortedcontainers_2.3.0.bb | 9 +++++++++ 1 file changed, 9 insertions(+) create mode 100644 meta/recipes-devtools/python/python3-sortedcontainers_2.3.0.bb
meta/recipes-devtools/python/python3-sortedcontainers_2.3.0.bb new file +9 -0
@@ -0,0 +1,9 @@ +SUMMARY = "Sorted Containers is an Apache2 licensed sorted collections library, written in pure-Python, and fast as C-extensions." +HOMEPAGE = "http://www.grantjenks.com/docs/sortedcontainers/" +LICENSE = "Apache-2.0" +LIC_FILES_CHKSUM = "file://LICENSE;md5=7c7c6a1a12ec816da16c1839137d53ae" + +inherit pypi setuptools3 +SRC_URI[sha256sum] = "59cc937650cf60d677c16775597c89a960658a09cf7c1a668f86e1e4464b10a1" + +BBCLASSEXTEND = "native nativesdk"
Signature · 1 line
2.29.2
PATCH v2 4/7 python-numpy: Add ptest
In reply to Khem RajSince 1.15, numpy have replaced nose with pytest testing framework it additionally needs hypothesis and sortedcontainers modules
--- meta/recipes-devtools/python-numpy/files/run-ptest | 5 +++++ meta/recipes-devtools/python-numpy/python3-numpy_1.19.4.bb | 7 +++++-- 2 files changed, 10 insertions(+), 2 deletions(-) create mode 100644 meta/recipes-devtools/python-numpy/files/run-ptest
meta/recipes-devtools/python-numpy/files/run-ptest new file +5 -0
@@ -0,0 +1,5 @@ +#!/usr/bin/env python3 + +import numpy +numpy.test(label='full', verbose=2) +
meta/recipes-devtools/python-numpy/python3-numpy_1.19.4.bb +5 -2
@@ -8,6 +8,7 @@ SRCNAME = "numpy" SRC_URI = "https://github.com/${SRCNAME}/${SRCNAME}/releases/download/v${PV}/${SRCNAME}-${PV}.tar.gz \ file://0001-Don-t-search-usr-and-so-on-for-libraries-by-default-.patch \ file://0001-numpy-core-Define-RISCV-32-support.patch \ + file://run-ptest \ " SRC_URI[sha256sum] = "fe836a685d6838dbb3f603caef01183ea98e88febf4ce956a2ea484a75378413"
@@ -16,7 +17,7 @@ UPSTREAM_CHECK_REGEX = "(?P<pver>\d+(\.\d+)+)\.tar" DEPENDS += "python3-cython-native" -inherit setuptools3 +inherit ptest setuptools3 S = "${WORKDIR}/numpy-${PV}"
@@ -30,7 +31,6 @@ RDEPENDS_${PN} = "${PYTHON_PN}-unittest \ ${PYTHON_PN}-pprint \ ${PYTHON_PN}-pickle \ ${PYTHON_PN}-shell \ - ${PYTHON_PN}-nose \ ${PYTHON_PN}-doctest \ ${PYTHON_PN}-datetime \ ${PYTHON_PN}-distutils \
@@ -39,6 +39,9 @@ RDEPENDS_${PN} = "${PYTHON_PN}-unittest \ ${PYTHON_PN}-netclient \ ${PYTHON_PN}-numbers \ ${PYTHON_PN}-pydoc \ + ${PYTHON_PN}-pytest \ + ${PYTHON_PN}-hypothesis \ + ${PYTHON_PN}-sortedcontainers \ ${PYTHON_PN}-pkgutil \ ${PYTHON_PN}-email \ ${PYTHON_PN}-compression \
Signature · 1 line
2.29.2
PATCH v2 5/7 python3-numpy: Add ldd runtime dependency on ptest package
In reply to Khem RajFixes
E RuntimeError: command ['ldd'] cannot be run
--- meta/recipes-devtools/python-numpy/python3-numpy_1.19.4.bb | 1 + 1 file changed, 1 insertion(+)
meta/recipes-devtools/python-numpy/python3-numpy_1.19.4.bb +1 -0
@@ -49,6 +49,7 @@ RDEPENDS_${PN} = "${PYTHON_PN}-unittest \ ${PYTHON_PN}-threading \ ${PYTHON_PN}-multiprocessing \ " +RDEPENDS_${PN}-ptest += "ldd" RDEPENDS_${PN}_class-native = ""
Signature · 1 line
2.29.2
PATCH v2 6/7 python3-pytest: Add recipe
In reply to Khem RajMoved to OE-Core from meta-python
There are several recipes in various layers which use pytest framework some of them being in OE-Core, this will help to keep this in core recipe metadata
--- ...he-setup_requires-for-setuptools-scm.patch | 39 +++++++++++++++++++ .../python/python3-pytest_6.1.0.bb | 38 ++++++++++++++++++ 2 files changed, 77 insertions(+) create mode 100644 meta/recipes-devtools/python/python3-pytest/0001-setup.py-remove-the-setup_requires-for-setuptools-scm.patch create mode 100644 meta/recipes-devtools/python/python3-pytest_6.1.0.bb
meta/recipes-devtools/python/python3-pytest/0001-setup.py-remove-the-setup_requires-for-setuptools-scm.patch new file +39 -0
@@ -0,0 +1,39 @@ +From ff784f4803ab33f5e3389e40d038d52d1e211843 Mon Sep 17 00:00:00 2001 +From: Yuan Chao <[email protected]> +Date: Wed, 28 Aug 2019 16:12:27 +0900 +Subject: [PATCH] [PATCH] setup.py: remove the setup_requires for + setuptools-scm + +The setup_requires argument forces the download of the egg file for setuptools-scm +during the do_compile phase. This download is incompatible with the typical fetch +and mirror structure. The only usage of scm is the generation of the _version.py +file and in the release tarball it is already correctly created + +Upstream-Status: Inappropriate [oe specific] + +Signed-off-by: Derek Straka <[email protected]> + +Signed-off-by: Yuan Chao <[email protected]> + +Rebase for pytest 6.1.0. + +Signed-off-by: Kai Kang <[email protected]> +--- + setup.cfg | 1 - + 1 file changed, 1 deletion(-) + +diff --git a/setup.cfg b/setup.cfg +index 60f6564..c4d1471 100644 +--- a/setup.cfg ++++ b/setup.cfg +@@ -55,7 +55,6 @@ package_dir = + =src + setup_requires = + setuptools>=40.0 +- setuptools-scm + zip_safe = no + + [options.entry_points] +-- +2.17.1 +
meta/recipes-devtools/python/python3-pytest_6.1.0.bb new file +38 -0
@@ -0,0 +1,38 @@ +SUMMARY = "Simple powerful testing with python" + +LICENSE = "MIT" +LIC_FILES_CHKSUM = "file://LICENSE;md5=81eb9f71d006c6b268cf4388e3c98f7b" + +SRC_URI[sha256sum] = "d010e24666435b39a4cf48740b039885642b6c273a3f77be3e7e03554d2806b7" + +SRC_URI_append = " file://0001-setup.py-remove-the-setup_requires-for-setuptools-scm.patch " + +inherit update-alternatives pypi setuptools3 + +RDEPENDS_${PN}_append_class-target = " \ + ${PYTHON_PN}-attrs \ + ${PYTHON_PN}-debugger \ + ${PYTHON_PN}-doctest \ + ${PYTHON_PN}-iniconfig \ + ${PYTHON_PN}-json \ + ${PYTHON_PN}-pluggy \ + ${PYTHON_PN}-py \ + ${PYTHON_PN}-setuptools \ + ${PYTHON_PN}-six \ + ${PYTHON_PN}-atomicwrites \ + ${PYTHON_PN}-importlib-metadata \ + ${PYTHON_PN}-pathlib2 \ + ${PYTHON_PN}-wcwidth \ + ${PYTHON_PN}-more-itertools \ + ${PYTHON_PN}-packaging \ +" + +ALTERNATIVE_${PN} += "py.test pytest" + +NATIVE_LINK_NAME[pytest] = "${bindir}/pytest" +ALTERNATIVE_TARGET[pytest] = "${bindir}/pytest" + +ALTERNATIVE_LINK_NAME[py.test] = "${bindir}/py.test" +ALTERNATIVE_TARGET[py.test] = "${bindir}/py.test" + +BBCLASSEXTEND = "native nativesdk"
Signature · 1 line
2.29.2
PATCH v2 7/7 maintainers: Add myself for new pytest related recipes
In reply to Khem Raj--- meta/conf/distro/include/maintainers.inc | 3 +++ 1 file changed, 3 insertions(+)
meta/conf/distro/include/maintainers.inc +3 -0
@@ -591,6 +591,7 @@ RECIPE_MAINTAINER_pn-python3-pycryptodomex = "Joshua Watt <[email protected]> RECIPE_MAINTAINER_pn-python3-extras = "Oleksandr Kravchuk <[email protected]>" RECIPE_MAINTAINER_pn-python3-git = "Oleksandr Kravchuk <[email protected]>" RECIPE_MAINTAINER_pn-python3-gitdb = "Oleksandr Kravchuk <[email protected]>" +RECIPE_MAINTAINER_pn-python3-hypothesis = "Khem Raj <[email protected]>" RECIPE_MAINTAINER_pn-python3-iniparse = "Oleksandr Kravchuk <[email protected]>" RECIPE_MAINTAINER_pn-python3-jinja2 = "Richard Purdie <[email protected]>" RECIPE_MAINTAINER_pn-python3-libarchive-c = "Joshua Watt <[email protected]>"
@@ -606,11 +607,13 @@ RECIPE_MAINTAINER_pn-python3-pyelftools = "Joshua Watt <[email protected]>" RECIPE_MAINTAINER_pn-python3-pygments = "Oleksandr Kravchuk <[email protected]>" RECIPE_MAINTAINER_pn-python3-pygobject = "Zang Ruochen <[email protected]>" RECIPE_MAINTAINER_pn-python3-pyparsing = "Oleksandr Kravchuk <[email protected]>" +RECIPE_MAINTAINER_pn-python3-pytest = "Khem Raj <[email protected]>" RECIPE_MAINTAINER_pn-python3-scons = "Tim Orling <[email protected]>" RECIPE_MAINTAINER_pn-python3-scons-native = "Tim Orling <[email protected]>" RECIPE_MAINTAINER_pn-python3-setuptools = "Oleksandr Kravchuk <[email protected]>" RECIPE_MAINTAINER_pn-python3-six = "Zang Ruochen <[email protected]>" RECIPE_MAINTAINER_pn-python3-smmap = "Oleksandr Kravchuk <[email protected]>" +RECIPE_MAINTAINER_pn-python3-sortedcontainers = "Khem Raj <[email protected]>" RECIPE_MAINTAINER_pn-python3-subunit = "Oleksandr Kravchuk <[email protected]>" RECIPE_MAINTAINER_pn-python3-testtools = "Oleksandr Kravchuk <[email protected]>" RECIPE_MAINTAINER_pn-qemu = "Richard Purdie <[email protected]>"
Signature · 1 line
2.29.2