diff --git a/0001-Skip-tests-that-fail-on-s390x.patch b/0001-Skip-tests-that-fail-on-s390x.patch index 82fef25..c9d5208 100644 --- a/0001-Skip-tests-that-fail-on-s390x.patch +++ b/0001-Skip-tests-that-fail-on-s390x.patch @@ -1,4 +1,4 @@ -From 7da961d821fc48a87182f81f805573acd7122457 Mon Sep 17 00:00:00 2001 +From 35a394b3806687e4be0e369fe293b98e939deb07 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= Date: Sat, 26 Mar 2022 11:58:59 +0100 Subject: [PATCH] Skip tests that fail on s390x @@ -173,3 +173,6 @@ index f845a33e16..050820c2a5 100644 return theSuite +-- +2.39.1 + diff --git a/0002-Relax-dependency-on-blosc2.patch b/0002-Relax-dependency-on-blosc2.patch new file mode 100644 index 0000000..6c7d82b --- /dev/null +++ b/0002-Relax-dependency-on-blosc2.patch @@ -0,0 +1,39 @@ +From 6dad0d61386d69833ca73098b533faa6b01a31b5 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= +Date: Sun, 14 May 2023 18:54:14 +0200 +Subject: [PATCH] Relax dependency on blosc2 + +As specified before, it translates to "blosc2 >= 2" + "blosc2 < 2.1", +which is obviously not satisfied by current blosc2 = 2.2.2. +--- + pyproject.toml | 2 +- + requirements.txt | 2 +- + 2 files changed, 2 insertions(+), 2 deletions(-) + +diff --git a/pyproject.toml b/pyproject.toml +index 022614ad25..eb16091a6c 100644 +--- a/pyproject.toml ++++ b/pyproject.toml +@@ -6,6 +6,6 @@ requires = [ + "packaging", + "py-cpuinfo", + "Cython >=0.29.21", +- "blosc2 ~=2.0.0" ++ "blosc2 >=2.0.0" + ] + build-backend = "setuptools.build_meta" +diff --git a/requirements.txt b/requirements.txt +index 8d2f5d2456..99e7db38dc 100644 +--- a/requirements.txt ++++ b/requirements.txt +@@ -6,6 +6,6 @@ numpy>=1.19.0 + numexpr>=2.6.2 + # blosc2 wheel is actually only needed when compiling on conda envs. + # Otherwise, lib comes bundled in PyTables wheels (but it doesn't hurt either). +-blosc2~=2.0.0 ++blosc2>=2.0.0 + packaging + py-cpuinfo +-- +2.40.1 + diff --git a/0002-Skip-test-that-fails-on-amd64.patch b/0002-Skip-test-that-fails-on-amd64.patch deleted file mode 100644 index 6838f12..0000000 --- a/0002-Skip-test-that-fails-on-amd64.patch +++ /dev/null @@ -1,27 +0,0 @@ -From 1657d4894d0450a98265685338ae3b63aa75c5d2 Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= -Date: Sat, 26 Mar 2022 11:52:36 +0100 -Subject: [PATCH] Skip test that fails on amd64 - ---- - tables/tests/test_expression.py | 7 ++----- - 1 file changed, 2 insertions(+), 5 deletions(-) - -diff --git a/tables/tests/test_expression.py b/tables/tests/test_expression.py -index 502ae42b74..ee8edf340b 100644 ---- a/tables/tests/test_expression.py -+++ b/tables/tests/test_expression.py -@@ -892,11 +892,8 @@ class FunctionsTestCase(common.TempFileMixin, common.PyTablesTestCase): - expr = tb.Expr("sin(a1) * sqrt(b1)") - r1 = expr.eval() - r2 = np.sin(a) * np.sqrt(b) -- if common.verbose: -- print("Computed expression:", repr(r1), r1.dtype) -- print("Should look like:", repr(r2), r2.dtype) -- self.assertTrue(common.areArraysEqual(r1, r2), -- "Evaluate is returning a wrong value.") -+ print("Computed expression:", repr(r1), r1.dtype) -+ print("Should look like:", repr(r2), r2.dtype) - - - # Test for EArrays with maindim != 0 diff --git a/always-use-blosc.diff b/always-use-blosc.diff deleted file mode 100644 index 0e3f298..0000000 --- a/always-use-blosc.diff +++ /dev/null @@ -1,14 +0,0 @@ ---- PyTables-v.3.2.0/tables/utilsextension.pyx~ 2015-05-06 10:10:43.000000000 -0400 -+++ PyTables-v.3.2.0/tables/utilsextension.pyx 2015-05-07 19:03:11.439144042 -0400 -@@ -276,11 +276,6 @@ - # http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=661286). - # This function has been written by Julian Taylor . - def _arch_without_blosc(): -- import platform -- arch = platform.machine().lower() -- for a in ("arm", "sparc", "mips", "aarch64"): -- if a in arch: -- return True - return False - - if blosc_version and blosc_version < ('1', '4') and _arch_without_blosc(): diff --git a/python-tables.spec b/python-tables.spec index a5d6a49..1a721b4 100644 --- a/python-tables.spec +++ b/python-tables.spec @@ -6,7 +6,7 @@ Summary: HDF5 support in Python Name: python-tables -Version: 3.7.0 +Version: 3.8.0 Release: %autorelease #Source0: https://github.com/PyTables/PyTables/archive/%{commit}/PyTables-%{commit}.tar.gz Source0: https://github.com/PyTables/PyTables/archive/v%{version}/python-tables-%{version}.tar.gz @@ -15,9 +15,8 @@ Source0: https://github.com/PyTables/PyTables/archive/v%{version}/python- %global manual_version 3.3.0 Source1: https://github.com/PyTables/PyTables/releases/download/v%{manual_version}/pytablesmanual-%{manual_version}.pdf -Patch0: always-use-blosc.diff Patch1: 0001-Skip-tests-that-fail-on-s390x.patch -Patch2: 0002-Skip-test-that-fails-on-amd64.patch +Patch2: 0002-Relax-dependency-on-blosc2.patch Patch3: 0003-python3.12-cython-fix-slice-indexing.patch License: BSD @@ -26,9 +25,11 @@ URL: https://www.pytables.org BuildRequires: hdf5-devel >= 1.8 BuildRequires: bzip2-devel BuildRequires: lzo-devel -BuildRequires: blosc-devel >= 1.5.2 +BuildRequires: blosc-devel +BuildRequires: blosc2-devel BuildRequires: python%{python3_pkgversion}-devel BuildRequires: python%{python3_pkgversion}-setuptools +BuildRequires: python%{python3_pkgversion}-blosc2 BuildRequires: python%{python3_pkgversion}-Cython >= 0.13 BuildRequires: python%{python3_pkgversion}-numpy BuildRequires: python%{python3_pkgversion}-numexpr >= 2.4 @@ -59,21 +60,25 @@ The %{name}-doc package contains the documentation for %{name}. %prep %setup -n PyTables-%{version} -q -%patch0 -p1 # https://github.com/PyTables/PyTables/issues/735 %ifarch s390x -%patch1 -p1 +%patch 1 -p1 %endif -%patch2 -p1 -%patch3 -p1 +%patch 2 -p1 +%patch 3 -p1 cp -a %{SOURCE1} pytablesmanual.pdf # Make sure we are not using anything from the bundled blosc by mistake find c-blosc -mindepth 1 -maxdepth 1 -name hdf5 -prune -o -exec rm -r {} + +# circumvent the broken attempt to detect library location +sed -r -i \ + '/def get_blosc2_directories\(\):/a \ \ \ \ return "%{_includedir}","%{_libdir}"' \ + setup.py + %build %py3_build diff --git a/sources b/sources index 3b2d608..02050b5 100644 --- a/sources +++ b/sources @@ -1,2 +1,2 @@ +SHA512 (python-tables-3.8.0.tar.gz) = 552d0217cebbf6342f97215caae4519daa88dd333c190da298fb2d583e2350456c63d7e4c37b0019e9bab714fd7ea41361207a06ab4bf13f8255dcce3f0712f5 SHA512 (pytablesmanual-3.3.0.pdf) = beb068a301e20370fdab9f942bed271b94872f409087cba8f7127967a51e45a233d8e6df1aaa12aad532282aec324b0c823b1646be31a5b71e5e7c035ba06270 -SHA512 (python-tables-3.7.0.tar.gz) = 133ba3099fdc788e6fedf3b82ed4e14274c5af093a5ffdc86e3816cb4fe4be76ce389b43eb50421ac44b387ef1be75746105e39a839a10efd254e2d75c1c677e