Skip to contentSkip to conversation

python-numpy: remove the python 2.x version of the recipe

PATCH In review Alexander Kanavin 5 participants 11 messages Aug 12, 2019 – Aug 13, 2019

lore
Share & tools
lore
#0 lore raw

PATCH 1/4 python-numpy: remove the python 2.x version of the recipe

The 1.17.0 release of NumPy no longer supports Python 2.x.

---
 meta/conf/distro/include/maintainers.inc               |  1 -
 .../python-numpy/python-numpy_1.16.3.bb                | 10 ----------
 2 files changed, 11 deletions(-)
 delete mode 100644 meta/recipes-devtools/python-numpy/python-numpy_1.16.3.bb
meta/conf/distro/include/maintainers.inc +0 -1
index 5cf9c7a8e80..c713c811ffa 100644
@@ -588,7 +588,6 @@ RECIPE_MAINTAINER_pn-puzzles = "Anuj Mittal <[email protected]>"
 RECIPE_MAINTAINER_pn-python = "Oleksandr Kravchuk <[email protected]>"
 RECIPE_MAINTAINER_pn-python-native = "Oleksandr Kravchuk <[email protected]>"
 RECIPE_MAINTAINER_pn-python-nose = "Oleksandr Kravchuk <[email protected]>"
-RECIPE_MAINTAINER_pn-python-numpy = "Oleksandr Kravchuk <[email protected]>"
 RECIPE_MAINTAINER_pn-python-scons = "Oleksandr Kravchuk <[email protected]>"
 RECIPE_MAINTAINER_pn-python-scons-native = "Oleksandr Kravchuk <[email protected]>"
 RECIPE_MAINTAINER_pn-python-setuptools = "Oleksandr Kravchuk <[email protected]>"
meta/recipes-devtools/python-numpy/python-numpy_1.16.3.bb deleted +0 -10
deleted file mode 100644
index a1133dad41c..00000000000
@@ -1,10 +0,0 @@
-inherit setuptools
-require python-numpy.inc
-
-RDEPENDS_${PN}_class-target_append = " \
-    ${PYTHON_PN}-subprocess \
-"
-
-do_install_append(){
-        rm ${D}/${bindir}/f2py
-}
Signature · 1 line
2.17.1
#1 lore raw

PATCH 2/4 python3-numpy: update to 1.17.0

Rebase files/0001-Don-t-search-usr-and-so-on-for-libraries-by-default-.patch

License-Update: clarified license for numpy/core/src/multiarray/dragon4.c (it is MIT)

---
 ...-and-so-on-for-libraries-by-default-.patch | 47 ++++++++-----------
 ...up.py-remove-the-detection-of-x86-ta.patch | 32 +++++++++++++
 .../python-numpy/python-numpy.inc             |  9 ++--
 ...umpy_1.16.3.bb => python3-numpy_1.17.0.bb} |  0
 4 files changed, 57 insertions(+), 31 deletions(-)
 create mode 100644 meta/recipes-devtools/python-numpy/files/0001-numpy-random-setup.py-remove-the-detection-of-x86-ta.patch
 rename meta/recipes-devtools/python-numpy/{python3-numpy_1.16.3.bb => python3-numpy_1.17.0.bb} (100%)
meta/recipes-devtools/python-numpy/files/0001-Don-t-search-usr-and-so-on-for-libraries-by-default-.patch +20 -27
index 8fe0d1a27ee..98a97058312 100644
@@ -1,4 +1,4 @@
-From c14554c7e2fff8dd559dfb41e7dd11392c6f85e3 Mon Sep 17 00:00:00 2001
+From 672a75c8417ce08db9e31fc415ec445479231d5a Mon Sep 17 00:00:00 2001
 From: Alexander Kanavin <[email protected]>
 Date: Thu, 10 Dec 2015 13:20:30 +0200
 Subject: [PATCH] Don't search /usr and so on for libraries by default to
@@ -10,14 +10,14 @@ Signed-off-by: Ross Burton <[email protected]>
 Signed-off-by: Alexander Kanavin <[email protected]>
 
 ---
- numpy/distutils/system_info.py | 50 ++++------------------------------
- 1 file changed, 6 insertions(+), 44 deletions(-)
+ numpy/distutils/system_info.py | 42 ++++------------------------------
+ 1 file changed, 5 insertions(+), 37 deletions(-)
 
 diff --git a/numpy/distutils/system_info.py b/numpy/distutils/system_info.py
-index 2424943..bf56a6d 100644
+index ba2b1f4..f94dce1 100644
 --- a/numpy/distutils/system_info.py
 +++ b/numpy/distutils/system_info.py
-@@ -274,51 +274,13 @@ if sys.platform == 'win32':
+@@ -278,45 +278,13 @@ if sys.platform == 'win32':
              add_system_root(os.path.join(conda_dir, 'Library'))
  
  else:
@@ -45,31 +45,24 @@ index 2424943..bf56a6d 100644
 -            default_x11_include_dirs.extend(['/usr/lib/X11/include',
 -                                             '/usr/include/X11'])
 -
--    import subprocess as sp
--    tmp = None
--    try:
--        # Explicitly open/close file to avoid ResourceWarning when
--        # tests are run in debug mode Python 3.
--        tmp = open(os.devnull, 'w')
--        p = sp.Popen(["gcc", "-print-multiarch"], stdout=sp.PIPE,
--                     stderr=tmp)
--    except (OSError, DistutilsError):
--        # OSError if gcc is not installed, or SandboxViolation (DistutilsError
--        # subclass) if an old setuptools bug is triggered (see gh-3160).
--        pass
--    else:
--        triplet = str(p.communicate()[0].decode().strip())
--        if p.returncode == 0:
--            # gcc supports the "-print-multiarch" option
--            default_x11_lib_dirs += [os.path.join("/usr/lib/", triplet)]
--            default_lib_dirs += [os.path.join("/usr/lib/", triplet)]
--    finally:
--        if tmp is not None:
--            tmp.close()
+-    with open(os.devnull, 'w') as tmp:
+-        try:
+-            p = subprocess.Popen(["gcc", "-print-multiarch"], stdout=subprocess.PIPE,
+-                         stderr=tmp)
+-        except (OSError, DistutilsError):
+-            # OSError if gcc is not installed, or SandboxViolation (DistutilsError
+-            # subclass) if an old setuptools bug is triggered (see gh-3160).
+-            pass
+-        else:
+-            triplet = str(p.communicate()[0].decode().strip())
+-            if p.returncode == 0:
+-                # gcc supports the "-print-multiarch" option
+-                default_x11_lib_dirs += [os.path.join("/usr/lib/", triplet)]
+-                default_lib_dirs += [os.path.join("/usr/lib/", triplet)]
 +    default_lib_dirs = libpaths(['/deadir/lib'], platform_bits)
 +    default_include_dirs = ['/deaddir/include']
 +    default_src_dirs = ['.', '/deaddir/src']
-+
+ 
 +    default_x11_lib_dirs = libpaths(['/deaddir/lib'], platform_bits)
 +    default_x11_include_dirs = ['/deaddir/include']
  
meta/recipes-devtools/python-numpy/files/0001-numpy-random-setup.py-remove-the-detection-of-x86-ta.patch new file +32 -0
new file mode 100644
index 00000000000..ebb2a6f9df1
@@ -0,0 +1,32 @@
+From b881e0b2ba9cf1a4aa351a1c1ea90b1e1776ce21 Mon Sep 17 00:00:00 2001
+From: Alexander Kanavin <[email protected]>
+Date: Mon, 12 Aug 2019 15:37:36 +0200
+Subject: [PATCH] numpy/random/setup.py: remove the detection of x86 targets
+ via uname()
+
+This was badly breaking compilation for ARM targets (and possibly
+other non-x86 targets); if -msse2 is desirable for x86 builds it has
+to be passed through another channel.
+
+Upstream-Status: Inappropriate [oe-core specific]
+Signed-off-by: Alexander Kanavin <[email protected]>
+---
+ numpy/random/setup.py | 5 -----
+ 1 file changed, 5 deletions(-)
+
+diff --git a/numpy/random/setup.py b/numpy/random/setup.py
+index a1bf3b8..60fb534 100644
+--- a/numpy/random/setup.py
++++ b/numpy/random/setup.py
+@@ -49,11 +49,6 @@ def configuration(parent_package='', top_path=None):
+     elif not is_msvc:
+         # Some bit generators require c99
+         EXTRA_COMPILE_ARGS += ['-std=c99']
+-        INTEL_LIKE = any([val in k.lower() for k in platform.uname()
+-                          for val in ('x86', 'i686', 'i386', 'amd64')])
+-        if INTEL_LIKE:
+-            # Assumes GCC or GCC-like compiler
+-            EXTRA_COMPILE_ARGS += ['-msse2']
+ 
+     # Use legacy integer variable sizes
+     LEGACY_DEFS = [('NP_RANDOM_LEGACY', '1')]
meta/recipes-devtools/python-numpy/python-numpy.inc +5 -4
index 43c3053cd88..98405fee12a 100644
@@ -1,7 +1,7 @@
 SUMMARY = "A sophisticated Numeric Processing Package for Python"
 SECTION = "devel/python"
-LICENSE = "BSD-3-Clause & BSD-2-Clause & PSF & Apache-2.0 & BSD"
-LIC_FILES_CHKSUM = "file://LICENSE.txt;md5=d26bde5432613cce2334b93985576231"
+LICENSE = "BSD-3-Clause & BSD-2-Clause & PSF & Apache-2.0 & BSD & MIT"
+LIC_FILES_CHKSUM = "file://LICENSE.txt;md5=1a32aba007a415aa8a1c708a0e2b86a1"
 
 SRCNAME = "numpy"
 
@@ -9,9 +9,10 @@ SRC_URI = "https://github.com/${SRCNAME}/${SRCNAME}/releases/download/v${PV}/${S
            file://0001-Don-t-search-usr-and-so-on-for-libraries-by-default-.patch \
            file://0001-npy_cpu-Add-riscv-support.patch \
            ${CONFIGFILESURI} \
+           file://0001-numpy-random-setup.py-remove-the-detection-of-x86-ta.patch \
            "
-SRC_URI[md5sum] = "0886e5b5017f08f2b7a624c0b5931e61"
-SRC_URI[sha256sum] = "adf063a3f87ab89393f5eea0eb903293b112fa0a308e8c594a75ffa585d81d4f"
+SRC_URI[md5sum] = "c48b2ad785f82cdfe28c907ce35e2a71"
+SRC_URI[sha256sum] = "47b7b6145e7ba5918ce26be25999b6d4b35cf9fbfdf46b7da50090ffdb020445"
 
 UPSTREAM_CHECK_URI = "https://github.com/numpy/numpy/releases"
 UPSTREAM_CHECK_REGEX = "(?P<pver>\d+(\.\d+)+)\.tar"
meta/recipes-devtools/python-numpy/python3-numpy_1.17.0.bb renamed from meta/recipes-devtools/python-numpy/python3-numpy_1.16.3.bb +0 -0
similarity index 100%
rename from meta/recipes-devtools/python-numpy/python3-numpy_1.16.3.bb
rename to meta/recipes-devtools/python-numpy/python3-numpy_1.17.0.bb
Signature · 1 line
2.17.1
#2 lore raw

Re: [PATCH 2/4] python3-numpy: update to 1.17.0

Quoted 16 lines · Alexander Kanavin

Rebase files/0001-Don-t-search-usr-and-so-on-for-libraries-by- default-.patch

License-Update: clarified license for
numpy/core/src/multiarray/dragon4.c (it is MIT)

---
 ...-and-so-on-for-libraries-by-default-.patch | 47 ++++++++---------
--
 ...up.py-remove-the-detection-of-x86-ta.patch | 32 +++++++++++++
 .../python-numpy/python-numpy.inc             |  9 ++--
 ...umpy_1.16.3.bb => python3-numpy_1.17.0.bb} |  0
 4 files changed, 57 insertions(+), 31 deletions(-)
 create mode 100644 meta/recipes-devtools/python-numpy/files/0001-
numpy-random-setup.py-remove-the-detection-of-x86-ta.patch
 rename meta/recipes-devtools/python-numpy/{python3-numpy_1.16.3.bb
Quoted 1 line

=> python3-numpy_1.17.0.bb} (100%)

This doesn't build on opensuse 42.3:

https://autobuilder.yoctoproject.org/typhoon/#/builders/52/builds/907

Its numpy-native and looks like it might be the old compiler :(

Cheers,

Richard

#4 lore raw

Re: [PATCH 2/4] python3-numpy: update to 1.17.0

Quoted 9 lines · Alexander Kanavin

On Tue, 13 Aug 2019 at 10:34, Richard Purdie <[email protected] <mailto:[email protected]>> wrote:

This doesn't build on opensuse 42.3:

https://autobuilder.yoctoproject.org/typhoon/#/builders/52/builds/907

Quoted 7 lines

Its numpy-native and looks like it might be the old compiler :(

That version of opensuse went end-of-life about a month ago. We can hold this off until the autobuilder is upgraded.

Alex

I'm ready to drop this worker at any time. opensuse-42.3 is still a SANITY_TESTED_DISTRO. Is it fine to go ahead and remove this?

Signature · 2 lines
Michael Halstead
Linux Foundation / SysAdmin
#5 lore raw

Re: [PATCH 2/4] python3-numpy: update to 1.17.0

Quoted 11 lines · Michael Halstead

On 8/13/19 2:54 AM, Alexander Kanavin wrote:

Quoted 6 lines · Richard Purdie

This doesn't build on opensuse 42.3:

https://autobuilder.yoctoproject.org/typhoon/#/builders/52/builds/907

Quoted 9 lines
Quoted 1 line

Its numpy-native and looks like it might be the old compiler :(

That version of opensuse went end-of-life about a month ago. We can hold this off until the autobuilder is upgraded.

Alex

I'm ready to drop this worker at any time. opensuse-42.3 is still a SANITY_TESTED_DISTRO. Is it fine to go ahead and remove this?

sure, also a patch to drop it from SANITY_TESTED_DISTRO before disconnecting it

Quoted 9 lines

--
Michael Halstead
Linux Foundation / SysAdmin

--
_______________________________________________
Openembedded-core mailing list
[email protected]
http://lists.openembedded.org/mailman/listinfo/openembedded-core

#6 lore raw

Re: [PATCH 2/4] python3-numpy: update to 1.17.0

Quoted 17 lines · Khem Raj
Quoted 15 lines · Michael Halstead

On 8/13/19 2:54 AM, Alexander Kanavin wrote:

Quoted 6 lines · Richard Purdie

This doesn't build on opensuse 42.3:

https://autobuilder.yoctoproject.org/typhoon/#/builders/52/builds/907

Its numpy-native and looks like it might be the old compiler :(

That version of opensuse went end-of-life about a month ago. We can hold this off until the autobuilder is upgraded.

Quoted 8 lines
Quoted 5 lines

Alex

I'm ready to drop this worker at any time. opensuse-42.3 is still a SANITY_TESTED_DISTRO. Is it fine to go ahead and remove this?

sure, also a patch to drop it from SANITY_TESTED_DISTRO before disconnecting it

Patch queued.

Cheers,

Richard

#7 lore raw

PATCH 3/4 python-scons: remove the python 2.x version of the recipe

In reply to Alexander Kanavin

Nothing in oe-core or meta-oe is using it (scons.bbclass is set to use 3.x version).

---
 meta/conf/distro/include/maintainers.inc      |  2 --
 .../python/python-scons-native_3.1.0.bb       |  8 -------
 .../python/python-scons_3.1.0.bb              | 24 -------------------
 3 files changed, 34 deletions(-)
 delete mode 100644 meta/recipes-devtools/python/python-scons-native_3.1.0.bb
 delete mode 100644 meta/recipes-devtools/python/python-scons_3.1.0.bb
meta/conf/distro/include/maintainers.inc +0 -2
index c713c811ffa..08fd83d3c4e 100644
@@ -588,8 +588,6 @@ RECIPE_MAINTAINER_pn-puzzles = "Anuj Mittal <[email protected]>"
 RECIPE_MAINTAINER_pn-python = "Oleksandr Kravchuk <[email protected]>"
 RECIPE_MAINTAINER_pn-python-native = "Oleksandr Kravchuk <[email protected]>"
 RECIPE_MAINTAINER_pn-python-nose = "Oleksandr Kravchuk <[email protected]>"
-RECIPE_MAINTAINER_pn-python-scons = "Oleksandr Kravchuk <[email protected]>"
-RECIPE_MAINTAINER_pn-python-scons-native = "Oleksandr Kravchuk <[email protected]>"
 RECIPE_MAINTAINER_pn-python-setuptools = "Oleksandr Kravchuk <[email protected]>"
 RECIPE_MAINTAINER_pn-python3 = "Oleksandr Kravchuk <[email protected]>"
 RECIPE_MAINTAINER_pn-python3-async = "Oleksandr Kravchuk <[email protected]>"
meta/recipes-devtools/python/python-scons-native_3.1.0.bb deleted +0 -8
deleted file mode 100644
index 68b63c93579..00000000000
@@ -1,8 +0,0 @@
-require python-scons_${PV}.bb
-inherit native pythonnative
-DEPENDS = "python-native"
-RDEPENDS_${PN} = ""
-
-do_install_append() {
-    create_wrapper ${D}${bindir}/scons SCONS_LIB_DIR='${STAGING_DIR_HOST}/${PYTHON_SITEPACKAGES_DIR}' PYTHONNOUSERSITE='1'
-}
meta/recipes-devtools/python/python-scons_3.1.0.bb deleted +0 -24
deleted file mode 100644
index b174050583f..00000000000
@@ -1,24 +0,0 @@
-SUMMARY = "Software Construction tool (make/autotools replacement)"
-SECTION = "devel/python"
-LICENSE = "MIT"
-LIC_FILES_CHKSUM = "file://LICENSE.txt;md5=37bb53a08e6beaea0c90e7821d731284"
-
-SRC_URI = "${SOURCEFORGE_MIRROR}/scons/scons-${PV}.tar.gz"
-SRC_URI[md5sum] = "e2fe9d16f81b0285b969238af4b552ff"
-SRC_URI[sha256sum] = "f3f548d738d4a2179123ecd744271ec413b2d55735ea7625a59b1b59e6cd132f"
-
-S = "${WORKDIR}/scons-${PV}"
-
-UPSTREAM_CHECK_URI = "http://scons.org/pages/download.html"
-UPSTREAM_CHECK_REGEX = "(?P<pver>\d+(\.\d+)+)\.tar"
-
-inherit setuptools
-
-RDEPENDS_${PN} = "\
-  python-fcntl \
-  python-io \
-  python-json \
-  python-subprocess \
-  python-shell \
-  python-pprint \
-  "
Signature · 1 line
2.17.1
#8 lore raw

PATCH 4/4 python-nose: remove the python 2.x version of the recipe

In reply to Alexander Kanavin

With removal of python 2.x numpy, nothing needs it anymore.

---
 meta/conf/distro/include/maintainers.inc          | 1 -
 meta/recipes-devtools/python/python-nose_1.3.7.bb | 6 ------
 2 files changed, 7 deletions(-)
 delete mode 100644 meta/recipes-devtools/python/python-nose_1.3.7.bb
meta/conf/distro/include/maintainers.inc +0 -1
index 08fd83d3c4e..a595507948b 100644
@@ -587,7 +587,6 @@ RECIPE_MAINTAINER_pn-pulseaudio-client-conf-sato = "Tanu Kaskinen <[email protected]>
 RECIPE_MAINTAINER_pn-puzzles = "Anuj Mittal <[email protected]>"
 RECIPE_MAINTAINER_pn-python = "Oleksandr Kravchuk <[email protected]>"
 RECIPE_MAINTAINER_pn-python-native = "Oleksandr Kravchuk <[email protected]>"
-RECIPE_MAINTAINER_pn-python-nose = "Oleksandr Kravchuk <[email protected]>"
 RECIPE_MAINTAINER_pn-python-setuptools = "Oleksandr Kravchuk <[email protected]>"
 RECIPE_MAINTAINER_pn-python3 = "Oleksandr Kravchuk <[email protected]>"
 RECIPE_MAINTAINER_pn-python3-async = "Oleksandr Kravchuk <[email protected]>"
meta/recipes-devtools/python/python-nose_1.3.7.bb deleted +0 -6
deleted file mode 100644
index fab609df901..00000000000
@@ -1,6 +0,0 @@
-inherit setuptools
-require python-nose.inc
-
-do_install_append() {
-    rm ${D}${bindir}/nosetests
-}
Signature · 1 line
2.17.1
#9 lore raw

✗ patchtest: failure for "python-numpy: remove the pytho..." and 3 more

In reply to Alexander Kanavin

== Series Details ==

Series: "python-numpy: remove the pytho..." and 3 more
Revision: 1
URL : https://patchwork.openembedded.org/series/19237/
State : failure

== Summary ==

Thank you for submitting this patch series to OpenEmbedded Core. This is an automated response. Several tests have been executed on the proposed series by patchtest resulting in the following failures:

* Issue Series does not apply on top of target branch [test_series_merge_on_head]
Suggested fix Rebase your series on top of targeted branch
Targeted branch master (currently at 30a2af80f5)

If you believe any of these test results are incorrect, please reply to the mailing list ([email protected]) raising your concerns. Otherwise we would appreciate you correcting the issues and submitting a new version of the patchset if applicable. Please ensure you add/increment the version number when sending the new version (i.e. [PATCH] -> [PATCH v2] -> [PATCH v3] -> ...).

---

Guidelines:     https://www.openembedded.org/wiki/Commit_Patch_Message_Guidelines
Test framework: http://git.yoctoproject.org/cgit/cgit.cgi/patchtest
Test suite:     http://git.yoctoproject.org/cgit/cgit.cgi/patchtest-oe
#10 lore raw

Re: ✗ patchtest: failure for "python-numpy: remove the pytho..." and 3 more

Again, this is intentional, as it replaces a part of the earlier patchset I sent.

Alex

Quoted 39 lines · Patchwork

== Series Details ==

Series: "python-numpy: remove the pytho..." and 3 more
Revision: 1
URL : https://patchwork.openembedded.org/series/19237/
State : failure

== Summary ==

Thank you for submitting this patch series to OpenEmbedded Core. This is an automated response. Several tests have been executed on the proposed series by patchtest resulting in the following failures:

* Issue Series does not apply on top of target branch
[test_series_merge_on_head]
Suggested fix Rebase your series on top of targeted branch
Targeted branch master (currently at 30a2af80f5)

If you believe any of these test results are incorrect, please reply to the mailing list ([email protected]) raising your concerns.
Otherwise we would appreciate you correcting the issues and submitting a new
version of the patchset if applicable. Please ensure you add/increment the version number when sending the new version (i.e. [PATCH] -> [PATCH v2] -> [PATCH v3] -> ...).

---
Guidelines:
https://www.openembedded.org/wiki/Commit_Patch_Message_Guidelines

Test framework: http://git.yoctoproject.org/cgit/cgit.cgi/patchtest
Test suite:     http://git.yoctoproject.org/cgit/cgit.cgi/patchtest-oe