Skip to contentSkip to conversation

python3-h5py: Upgrade 2.10.0 -> 3.1.0

PATCH In review Leon Anavi 2 participants 2 messages Feb 22, 2021 – Feb 24, 2021

lore
Share & tools
lore

Leon Anavi

author
#0 lore raw

PATCH 1/1 python3-h5py: Upgrade 2.10.0 -> 3.1.0

Upgrade to release 3.1.0:

- Fix using bytes as names for :meth:~Group.create_dataset and  :meth:~Group.create_virtual_dataset.
- Fix writing data as a list to a dataset with a sub-array data type.
- Preserve endianess in Cython dataset Reader
- If pytest is missing pytest-mpi then it will now fail immediately with a clear warning message
- Fix a test which was failing on big-endian systems

---
 .../0001-cross-compiling-support.patch        | 47 -------------------
 .../0001-setup.py-Fix-numpy-version.patch     | 28 +++++++++++
 ...1-setup_build.py-avoid-absolute-path.patch | 15 +++---
 ...3-h5py_2.10.0.bb => python3-h5py_3.1.0.bb} |  5 +-
 4 files changed, 37 insertions(+), 58 deletions(-)
 delete mode 100644 meta-python/recipes-devtools/python/python3-h5py/0001-cross-compiling-support.patch
 create mode 100644 meta-python/recipes-devtools/python/python3-h5py/0001-setup.py-Fix-numpy-version.patch
 rename meta-python/recipes-devtools/python/{python3-h5py_2.10.0.bb => python3-h5py_3.1.0.bb} (78%)
meta-python/recipes-devtools/python/python3-h5py/0001-cross-compiling-support.patch deleted +0 -47
deleted file mode 100644
index 8c0b914326..0000000000
@@ -1,47 +0,0 @@
-From 364fd0906efa349ea44a761820408dcf6b2b8726 Mon Sep 17 00:00:00 2001
-From: Hongxu Jia <[email protected]>
-Date: Tue, 29 Jan 2019 17:08:32 +0800
-Subject: [PATCH] cross compiling support
-
-Remove useless dirs
-
-Upstream-Status: Inappropriate [oe specific]
-
-Signed-off-by: Hongxu Jia <[email protected]>
-Signed-off-by: Leon Anavi <[email protected]>
----
- setup_build.py     | 4 ----
- setup_configure.py | 2 +-
- 2 files changed, 1 insertion(+), 5 deletions(-)
-
-diff --git a/setup_build.py b/setup_build.py
-index c0e9a28c..ffd3bef7 100644
---- a/setup_build.py
-+++ b/setup_build.py
-@@ -55,10 +55,6 @@ if sys.platform.startswith('win'):
-         ('_HDF5USEDLL_', None),
-         ('H5_BUILT_AS_DYNAMIC_LIB', None)
-     ])
--else:
--    FALLBACK_PATHS['include_dirs'].extend(['/opt/local/include', '/usr/local/include'])
--    FALLBACK_PATHS['library_dirs'].extend(['/opt/local/lib', '/usr/local/lib'])
--
- 
- class h5py_build_ext(build_ext):
- 
-diff --git a/setup_configure.py b/setup_configure.py
-index 5576775e..75f4141e 100644
---- a/setup_configure.py
-+++ b/setup_configure.py
-@@ -206,7 +206,7 @@ def autodetect_version(hdf5_dir=None):
-         default_path = 'libhdf5.so'
-         regexp = re.compile(r'^libhdf5.so')
- 
--    libdirs = ['/usr/local/lib', '/opt/local/lib']
-+    libdirs = []
-     try:
-         if pkgconfig.exists("hdf5"):
-             libdirs.extend(pkgconfig.parse("hdf5")['library_dirs'])
--- 
-2.17.1
-
meta-python/recipes-devtools/python/python3-h5py/0001-setup.py-Fix-numpy-version.patch new file +28 -0
new file mode 100644
index 0000000000..4881b023c8
@@ -0,0 +1,28 @@
+From e6c0d487fb5e6063305b8b3187896fbfe5720ed2 Mon Sep 17 00:00:00 2001
+From: Leon Anavi <[email protected]>
+Date: Mon, 22 Feb 2021 18:42:43 +0200
+Subject: [PATCH] setup.py: Fix numpy version
+
+Fix numpy version to ensure bitbake will find the pip package.
+
+Upstream-Status: Inappropriate [oe specific]
+
+Signed-off-by: Leon Anavi <[email protected]>
+
+---
+ setup.py | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/setup.py b/setup.py
+index 7dbe583..6602c97 100755
+--- a/setup.py
++++ b/setup.py
+@@ -49,7 +49,7 @@ SETUP_REQUIRES = [
+     f"Cython >=0.29; python_version<'3.8'",
+     f"Cython >=0.29.14; python_version>='3.8'",
+ ] + [
+-    f"numpy =={np_min}; python_version{py_condition}"
++    f"numpy >={np_min}; python_version{py_condition}"
+     for np_min, py_condition in NUMPY_MIN_VERSIONS
+ ]
+ 
meta-python/recipes-devtools/python/python3-h5py/0001-setup_build.py-avoid-absolute-path.patch +7 -8
index da95ee7af5..d0c2ece19b 100644
@@ -1,6 +1,6 @@
-From b5d5a7efc7aaa2be830731001ed17c5b71bcefb1 Mon Sep 17 00:00:00 2001
+From 1a46082d0889a784037952c4da0cde3822849032 Mon Sep 17 00:00:00 2001
 From: Mingli Yu <[email protected]>
-Date: Fri, 29 Jan 2021 02:33:06 +0000
+Date: Thu, 28 Jan 2021 18:44:10 -0800
 Subject: [PATCH] setup_build.py: avoid absolute path
 
 Prevent absolute path from ending up in the egg-info SOURCES.txt.
@@ -8,15 +8,17 @@ Prevent absolute path from ending up in the egg-info SOURCES.txt.
 Upstream-Status: Submitted [https://github.com/h5py/h5py/pull/1803]
 
 Signed-off-by: Mingli Yu <[email protected]>
+Signed-off-by: Leon Anavi <[email protected]>
+
 ---
  setup_build.py | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)
 
 diff --git a/setup_build.py b/setup_build.py
-index ffd3bef..fb196c0 100644
+index 3c7c7ad..d824bdd 100644
 --- a/setup_build.py
 +++ b/setup_build.py
-@@ -20,7 +20,7 @@ import api_gen
+@@ -21,7 +21,7 @@ from setup_configure import BuildConfig
  
  
  def localpath(*args):
@@ -24,7 +26,4 @@ index ffd3bef..fb196c0 100644
 +    return op.join(*args)
  
  
- MODULES =  ['defs','_errors','_objects','_proxy', 'h5fd', 'h5z',
--- 
-2.29.2
-
+ MODULES = ['defs', '_errors', '_objects', '_proxy', 'h5fd', 'h5z',
meta-python/recipes-devtools/python/python3-h5py_3.1.0.bb renamed from meta-python/recipes-devtools/python/python3-h5py_2.10.0.bb +2 -3
similarity index 78%
rename from meta-python/recipes-devtools/python/python3-h5py_2.10.0.bb
rename to meta-python/recipes-devtools/python/python3-h5py_3.1.0.bb
index b812b323fa..03ae4c9db4 100644
@@ -4,12 +4,11 @@ SECTION = "devel/python"
 LICENSE = "BSD-3-Clause"
 LIC_FILES_CHKSUM = "file://LICENSE;md5=113251d71fb0384712c719b567261c5c"
 
-SRC_URI[md5sum] = "504b595237409ab766fbbe568e60a080"
-SRC_URI[sha256sum] = "84412798925dc870ffd7107f045d7659e60f5d46d1c70c700375248bf6bf512d"
+SRC_URI[sha256sum] = "1e2516f190652beedcb8c7acfa1c6fa92d99b42331cbef5e5c7ec2d65b0fc3c2"
 
 SRC_URI_append = " \
-           file://0001-cross-compiling-support.patch \
            file://0001-setup_build.py-avoid-absolute-path.patch \
+           file://0001-setup.py-Fix-numpy-version.patch \
           "
 
 inherit pypi setuptools3
Signature · 1 line
2.17.1
Acked-by on v1 1/1
#1 lore raw
Quoted 13 lines · Leon Anavi

[Please note: This e-mail is from an EXTERNAL e-mail address]

Upgrade to release 3.1.0:

- Fix using bytes as names for :meth:~Group.create_dataset and  :meth:~Group.create_virtual_dataset.
- Fix writing data as a list to a dataset with a sub-array data type.
- Preserve endianess in Cython dataset Reader
- If pytest is missing pytest-mpi then it will now fail immediately with a clear warning message
- Fix a test which was failing on big-endian systems

Quoted 1 line
Quoted 167 lines
---
  .../0001-cross-compiling-support.patch        | 47 -------------------
  .../0001-setup.py-Fix-numpy-version.patch     | 28 +++++++++++
  ...1-setup_build.py-avoid-absolute-path.patch | 15 +++---
  ...3-h5py_2.10.0.bb => python3-h5py_3.1.0.bb} |  5 +-
  4 files changed, 37 insertions(+), 58 deletions(-)

delete mode 100644 meta-python/recipes-devtools/python/python3-h5py/0001-cross-compiling-support.patch create mode 100644 meta-python/recipes-devtools/python/python3-h5py/0001-setup.py-Fix-numpy-version.patch rename meta-python/recipes-devtools/python/{python3-h5py_2.10.0.bb => python3-h5py_3.1.0.bb} (78%)

meta-python/recipes-devtools/python/python3-h5py/0001-cross-compiling-support.patch deleted +0 -47
deleted file mode 100644
index 8c0b914326..0000000000
@@ -1,47 +0,0 @@
-From 364fd0906efa349ea44a761820408dcf6b2b8726 Mon Sep 17 00:00:00 2001
-From: Hongxu Jia <[email protected]>
-Date: Tue, 29 Jan 2019 17:08:32 +0800
-Subject: [PATCH] cross compiling support
-
-Remove useless dirs
-
-Upstream-Status: Inappropriate [oe specific]
-
-Signed-off-by: Hongxu Jia <[email protected]>
-Signed-off-by: Leon Anavi <[email protected]>
----
- setup_build.py     | 4 ----
- setup_configure.py | 2 +-
- 2 files changed, 1 insertion(+), 5 deletions(-)
-
-diff --git a/setup_build.py b/setup_build.py
-index c0e9a28c..ffd3bef7 100644
---- a/setup_build.py
-+++ b/setup_build.py
-@@ -55,10 +55,6 @@ if sys.platform.startswith('win'):
-         ('_HDF5USEDLL_', None),
-         ('H5_BUILT_AS_DYNAMIC_LIB', None)
-     ])
--else:
--    FALLBACK_PATHS['include_dirs'].extend(['/opt/local/include', '/usr/local/include'])
--    FALLBACK_PATHS['library_dirs'].extend(['/opt/local/lib', '/usr/local/lib'])
--
-
- class h5py_build_ext(build_ext):
-
-diff --git a/setup_configure.py b/setup_configure.py
-index 5576775e..75f4141e 100644
---- a/setup_configure.py
-+++ b/setup_configure.py
-@@ -206,7 +206,7 @@ def autodetect_version(hdf5_dir=None):
-         default_path = 'libhdf5.so'
-         regexp = re.compile(r'^libhdf5.so')
-
--    libdirs = ['/usr/local/lib', '/opt/local/lib']
-+    libdirs = []
-     try:
-         if pkgconfig.exists("hdf5"):
-             libdirs.extend(pkgconfig.parse("hdf5")['library_dirs'])
---
-2.17.1
-
meta-python/recipes-devtools/python/python3-h5py/0001-setup.py-Fix-numpy-version.patch new file +28 -0
new file mode 100644
index 0000000000..4881b023c8
@@ -0,0 +1,28 @@
+From e6c0d487fb5e6063305b8b3187896fbfe5720ed2 Mon Sep 17 00:00:00 2001
+From: Leon Anavi <[email protected]>
+Date: Mon, 22 Feb 2021 18:42:43 +0200
+Subject: [PATCH] setup.py: Fix numpy version
+
+Fix numpy version to ensure bitbake will find the pip package.
+
+Upstream-Status: Inappropriate [oe specific]
+
+Signed-off-by: Leon Anavi <[email protected]>
+
+---
+ setup.py | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/setup.py b/setup.py
+index 7dbe583..6602c97 100755
+--- a/setup.py
++++ b/setup.py
+@@ -49,7 +49,7 @@ SETUP_REQUIRES = [
+     f"Cython >=0.29; python_version<'3.8'",
+     f"Cython >=0.29.14; python_version>='3.8'",
+ ] + [
+-    f"numpy =={np_min}; python_version{py_condition}"
++    f"numpy >={np_min}; python_version{py_condition}"
+     for np_min, py_condition in NUMPY_MIN_VERSIONS
+ ]
+
meta-python/recipes-devtools/python/python3-h5py/0001-setup_build.py-avoid-absolute-path.patch +7 -8
index da95ee7af5..d0c2ece19b 100644
@@ -1,6 +1,6 @@
-From b5d5a7efc7aaa2be830731001ed17c5b71bcefb1 Mon Sep 17 00:00:00 2001
+From 1a46082d0889a784037952c4da0cde3822849032 Mon Sep 17 00:00:00 2001
  From: Mingli Yu <[email protected]>
-Date: Fri, 29 Jan 2021 02:33:06 +0000
+Date: Thu, 28 Jan 2021 18:44:10 -0800
  Subject: [PATCH] setup_build.py: avoid absolute path
 
  Prevent absolute path from ending up in the egg-info SOURCES.txt.
@@ -8,15 +8,17 @@ Prevent absolute path from ending up in the egg-info SOURCES.txt.
  Upstream-Status: Submitted [https://github.com/h5py/h5py/pull/1803]
 
  Signed-off-by: Mingli Yu <[email protected]>
+Signed-off-by: Leon Anavi <[email protected]>
+
  ---
   setup_build.py | 2 +-
   1 file changed, 1 insertion(+), 1 deletion(-)
 
  diff --git a/setup_build.py b/setup_build.py
-index ffd3bef..fb196c0 100644
+index 3c7c7ad..d824bdd 100644
  --- a/setup_build.py
  +++ b/setup_build.py
-@@ -20,7 +20,7 @@ import api_gen
+@@ -21,7 +21,7 @@ from setup_configure import BuildConfig
 
 
   def localpath(*args):
@@ -24,7 +26,4 @@ index ffd3bef..fb196c0 100644
  +    return op.join(*args)
 
 
- MODULES =  ['defs','_errors','_objects','_proxy', 'h5fd', 'h5z',
---
-2.29.2
-
+ MODULES = ['defs', '_errors', '_objects', '_proxy', 'h5fd', 'h5z',
meta-python/recipes-devtools/python/python3-h5py_3.1.0.bb renamed from meta-python/recipes-devtools/python/python3-h5py_2.10.0.bb +2 -4
similarity index 78%
rename from meta-python/recipes-devtools/python/python3-h5py_2.10.0.bb
rename to meta-python/recipes-devtools/python/python3-h5py_3.1.0.bb
index b812b323fa..03ae4c9db4 100644
@@ -4,12 +4,11 @@ SECTION = "devel/python"
  LICENSE = "BSD-3-Clause"
  LIC_FILES_CHKSUM = "file://LICENSE;md5=113251d71fb0384712c719b567261c5c"
 
-SRC_URI[md5sum] = "504b595237409ab766fbbe568e60a080"
-SRC_URI[sha256sum] = "84412798925dc870ffd7107f045d7659e60f5d46d1c70c700375248bf6bf512d"
+SRC_URI[sha256sum] = "1e2516f190652beedcb8c7acfa1c6fa92d99b42331cbef5e5c7ec2d65b0fc3c2"
 
  SRC_URI_append = " \
-           file://0001-cross-compiling-support.patch \
             file://0001-setup_build.py-avoid-absolute-path.patch \
+           file://0001-setup.py-Fix-numpy-version.patch \
            "
 
  inherit pypi setuptools3
--

2.17.1