From d23ecf1b30aa6e9da9e041a0fa4a6518efb47c7a Mon Sep 17 00:00:00 2001 From: Dennis Gilmore Date: Thu, 18 Jun 2015 18:38:54 +0000 Subject: [PATCH 1/6] - Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild --- python-blosc.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/python-blosc.spec b/python-blosc.spec index 7966f4e..46bd331 100644 --- a/python-blosc.spec +++ b/python-blosc.spec @@ -11,7 +11,7 @@ Summary: Python wrapper for the blosc high performance compressor Name: python-%{module} Version: 1.2.7 -Release: 3%{?dist} +Release: 4%{?dist} License: MIT URL: https://github.com/FrancescAlted/python-blosc Source0: https://pypi.python.org/packages/source/b/%{module}/%{module}-%{version}.tar.gz @@ -78,6 +78,9 @@ PYTHONPATH=%{buildroot}%{python3_sitearch} python3 -c 'import sys, blosc; sys.ex %endif %changelog +* Thu Jun 18 2015 Fedora Release Engineering - 1.2.7-4 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild + * Fri May 29 2015 Zbigniew Jędrzejewski-Szmek - 1.2.7-3 - Run test suite From d039e870ae55fdd3f2ed8017f7734b86f8b9df56 Mon Sep 17 00:00:00 2001 From: Peter Robinson Date: Tue, 10 Nov 2015 15:19:32 +0000 Subject: [PATCH 2/6] - Rebuilt for https://fedoraproject.org/wiki/Changes/python3.5 --- python-blosc.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/python-blosc.spec b/python-blosc.spec index 46bd331..8090125 100644 --- a/python-blosc.spec +++ b/python-blosc.spec @@ -11,7 +11,7 @@ Summary: Python wrapper for the blosc high performance compressor Name: python-%{module} Version: 1.2.7 -Release: 4%{?dist} +Release: 5%{?dist} License: MIT URL: https://github.com/FrancescAlted/python-blosc Source0: https://pypi.python.org/packages/source/b/%{module}/%{module}-%{version}.tar.gz @@ -78,6 +78,9 @@ PYTHONPATH=%{buildroot}%{python3_sitearch} python3 -c 'import sys, blosc; sys.ex %endif %changelog +* Tue Nov 10 2015 Fedora Release Engineering +- Rebuilt for https://fedoraproject.org/wiki/Changes/python3.5 + * Thu Jun 18 2015 Fedora Release Engineering - 1.2.7-4 - Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild From b62540ff25012f23b66a640c755f88b8a9a5245c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= Date: Mon, 16 Nov 2015 13:36:38 -0500 Subject: [PATCH 3/6] Update to 1.2.8 --- .gitignore | 1 + ...to-be-specified-when-running-test-su.patch | 34 --------------- 0002-Propagate-the-result-of-tests.patch | 28 ------------- python-blosc.spec | 42 ++++++++++++------- sources | 2 +- 5 files changed, 29 insertions(+), 78 deletions(-) delete mode 100644 0001-Allow-verbosity-to-be-specified-when-running-test-su.patch delete mode 100644 0002-Propagate-the-result-of-tests.patch diff --git a/.gitignore b/.gitignore index 4be21f8..1c4c1bd 100644 --- a/.gitignore +++ b/.gitignore @@ -3,3 +3,4 @@ /blosc-1.2.4.tar.gz /blosc-1.2.5.tar.gz /blosc-1.2.7.tar.gz +/blosc-1.2.8.tar.gz diff --git a/0001-Allow-verbosity-to-be-specified-when-running-test-su.patch b/0001-Allow-verbosity-to-be-specified-when-running-test-su.patch deleted file mode 100644 index e4d13c8..0000000 --- a/0001-Allow-verbosity-to-be-specified-when-running-test-su.patch +++ /dev/null @@ -1,34 +0,0 @@ -From b6c85062b316ecd4606c64b449fe0c8ec5d2a708 Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= -Date: Fri, 29 May 2015 13:15:40 -0400 -Subject: [PATCH 1/2] Allow verbosity to be specified when running test suite - ---- - blosc/test.py | 4 ++-- - 1 file changed, 2 insertions(+), 2 deletions(-) - -diff --git a/blosc/test.py b/blosc/test.py -index c7227451d9..0a12fb0107 100644 ---- a/blosc/test.py -+++ b/blosc/test.py -@@ -177,7 +177,7 @@ class TestCodec(unittest.TestCase): - self.assertRaises(TypeError, blosc.unpack_array, 1.0) - - --def run(): -+def run(verbosity=2): - import blosc - import blosc.toplevel - blosc.print_versions() -@@ -187,7 +187,7 @@ def run(): - - # suite = unittest.TestLoader().discover(start_dir='.', pattern='test*.py') - suite.addTests(unittest.TestLoader().loadTestsFromModule(blosc.toplevel)) -- unittest.TextTestRunner(verbosity=2).run(suite) -+ unittest.TextTestRunner(verbosity=verbosity).run(suite) - - - if __name__ == '__main__': --- -2.1.0 - diff --git a/0002-Propagate-the-result-of-tests.patch b/0002-Propagate-the-result-of-tests.patch deleted file mode 100644 index a148166..0000000 --- a/0002-Propagate-the-result-of-tests.patch +++ /dev/null @@ -1,28 +0,0 @@ -From 16688ab07612e4f022b3118e7a18660ffdfcb106 Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= -Date: Fri, 29 May 2015 13:16:52 -0400 -Subject: [PATCH] Propagate the result of tests - -This way things like - python -c 'import sys, blosc; sys.exit(blosc.test())' -actually fail if tests fail. ---- - blosc/test.py | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/blosc/test.py b/blosc/test.py -index 0a12fb0107..760db66296 100644 ---- a/blosc/test.py -+++ b/blosc/test.py -@@ -187,7 +187,7 @@ def run(verbosity=2): - - # suite = unittest.TestLoader().discover(start_dir='.', pattern='test*.py') - suite.addTests(unittest.TestLoader().loadTestsFromModule(blosc.toplevel)) -- unittest.TextTestRunner(verbosity=verbosity).run(suite) -+ assert unittest.TextTestRunner(verbosity=verbosity).run(suite).wasSuccessful() - - - if __name__ == '__main__': --- -2.1.0 - diff --git a/python-blosc.spec b/python-blosc.spec index 8090125..3438bd0 100644 --- a/python-blosc.spec +++ b/python-blosc.spec @@ -8,33 +8,41 @@ # Use the same directory of the main package for subpackage licence and docs %global _docdir_fmt %{name} -Summary: Python wrapper for the blosc high performance compressor +Summary: Python wrapper for the Blosc high performance compressor Name: python-%{module} -Version: 1.2.7 -Release: 5%{?dist} +Version: 1.2.8 +Release: 1%{?dist} License: MIT URL: https://github.com/FrancescAlted/python-blosc Source0: https://pypi.python.org/packages/source/b/%{module}/%{module}-%{version}.tar.gz -Patch0: 0001-Allow-verbosity-to-be-specified-when-running-test-su.patch -Patch1: 0002-Propagate-the-result-of-tests.patch BuildRequires: blosc-devel BuildRequires: python2-devel BuildRequires: numpy -Recommends: numpy %description -Python wrapper for the Blosc high performance compressor. +%{summary}. + +%package -n python2-%{module} +Summary: %{summary} + +%{?python_provide:%python_provide python2-blosc} +%{?fedora:Recommends: numpy} + +%description -n python2-%{module} +%{summary}. %if 0%{?with_python3} %package -n python3-%{module} Summary: Python wrapper for the blosc high performance compressor + BuildRequires: python3-devel BuildRequires: python3-numpy -Recommends: python3-numpy +%{?python_provide:%python_provide python3-blosc} +%{?fedora:Recommends: python3-numpy} %description -n python3-%{module} -Python wrapper for the Blosc high performance compressor. +%{summary}. %endif %prep @@ -45,18 +53,18 @@ sed -i "s|CFLAGS\.append(\"-msse2\")|pass|" setup.py %build export BLOSC_DIR=%{_libdir}/blosc CFLAGS="%{optflags}" -%{__python2} setup.py build +%py2_build %if 0%{?with_python3} -%{__python3} setup.py build +%py3_build %endif %install -%{__python2} setup.py install --prefix=%{_prefix} -O1 --skip-build --root=%{buildroot} +%py2_install %if 0%{?with_python3} -%{__python3} setup.py install --prefix=%{_prefix} -O1 --skip-build --root=%{buildroot} +%py3_install %endif -%files +%files -n python2-%{module} %{python2_sitearch}/blosc/ %{python2_sitearch}/blosc-%{version}*-py*.egg-info %license LICENSES/PYTHON-BLOSC.txt @@ -78,7 +86,11 @@ PYTHONPATH=%{buildroot}%{python3_sitearch} python3 -c 'import sys, blosc; sys.ex %endif %changelog -* Tue Nov 10 2015 Fedora Release Engineering +* Mon Nov 16 2015 Zbigniew Jędrzejewski-Szmek - 1.2.8-1 +- Update to latest version (#1263680) +- Add python2 subpackage following the latest guidelines + +* Tue Nov 10 2015 Fedora Release Engineering - 1.2.7-5 - Rebuilt for https://fedoraproject.org/wiki/Changes/python3.5 * Thu Jun 18 2015 Fedora Release Engineering - 1.2.7-4 diff --git a/sources b/sources index 60d53e0..63e3e9a 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -4661af9ef228971d851852fa3c468416 blosc-1.2.7.tar.gz +d7f505adefd46fbdb50c7b608d5cbdf6 blosc-1.2.8.tar.gz From dd20be5f501ec4bc666b02e99989fc201b138ef2 Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Thu, 4 Feb 2016 19:07:25 +0000 Subject: [PATCH 4/6] - Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild --- python-blosc.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/python-blosc.spec b/python-blosc.spec index 3438bd0..1b88db6 100644 --- a/python-blosc.spec +++ b/python-blosc.spec @@ -11,7 +11,7 @@ Summary: Python wrapper for the Blosc high performance compressor Name: python-%{module} Version: 1.2.8 -Release: 1%{?dist} +Release: 2%{?dist} License: MIT URL: https://github.com/FrancescAlted/python-blosc Source0: https://pypi.python.org/packages/source/b/%{module}/%{module}-%{version}.tar.gz @@ -86,6 +86,9 @@ PYTHONPATH=%{buildroot}%{python3_sitearch} python3 -c 'import sys, blosc; sys.ex %endif %changelog +* Thu Feb 04 2016 Fedora Release Engineering - 1.2.8-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild + * Mon Nov 16 2015 Zbigniew Jędrzejewski-Szmek - 1.2.8-1 - Update to latest version (#1263680) - Add python2 subpackage following the latest guidelines From c8e222785c211c023e584ab3823b8bb40dcffae0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= Date: Sat, 13 Feb 2016 19:10:04 -0500 Subject: [PATCH 5/6] Add dependency on psutil and fix build --- 0001-tests-fix-error-with-new-numpy.patch | 35 +++++++++++++++++++++++ python-blosc.spec | 7 +++++ 2 files changed, 42 insertions(+) create mode 100644 0001-tests-fix-error-with-new-numpy.patch diff --git a/0001-tests-fix-error-with-new-numpy.patch b/0001-tests-fix-error-with-new-numpy.patch new file mode 100644 index 0000000..613f7cc --- /dev/null +++ b/0001-tests-fix-error-with-new-numpy.patch @@ -0,0 +1,35 @@ +From b49ff10a169a0c8e862a5dbe0f4b291cef17f9d0 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= +Date: Sat, 13 Feb 2016 17:35:36 -0500 +Subject: [PATCH] tests: fix error with new numpy + +ERROR: test_pack_array_exceptions (blosc.test.TestCodec) +---------------------------------------------------------------------- +Traceback (most recent call last): + File "/builddir/build/BUILDROOT/python-blosc-1.2.8-2.fc24.i386/usr/lib/python2.7/site-packages/blosc/test.py", line 195, in test_pack_array_exceptions + strides=(8, 0))[0] + File "/usr/lib/python2.7/site-packages/numpy/lib/stride_tricks.py", line 48, in as_strided + array = np.asarray(DummyArray(interface, base=x)) + File "/usr/lib/python2.7/site-packages/numpy/core/numeric.py", line 482, in asarray + return array(a, dtype, copy=False, order=order) +TypeError: 'float' object cannot be interpreted as an index +--- + blosc/test.py | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/blosc/test.py b/blosc/test.py +index 8bf9c48600..ce96f5ec6f 100644 +--- a/blosc/test.py ++++ b/blosc/test.py +@@ -185,7 +185,7 @@ class TestCodec(unittest.TestCase): + self.assertRaises(TypeError, blosc.pack_array, 'abc') + self.assertRaises(TypeError, blosc.pack_array, 1.0) + +- items = (blosc.BLOSC_MAX_BUFFERSIZE / 8) + 1 ++ items = (blosc.BLOSC_MAX_BUFFERSIZE // 8) + 1 + one = numpy.ones(1, dtype=numpy.int64) + self.assertRaises(ValueError, blosc.pack_array, one, clevel=-1) + self.assertRaises(ValueError, blosc.pack_array, one, clevel=10) +-- +2.5.0 + diff --git a/python-blosc.spec b/python-blosc.spec index 1b88db6..18583af 100644 --- a/python-blosc.spec +++ b/python-blosc.spec @@ -15,10 +15,12 @@ Release: 2%{?dist} License: MIT URL: https://github.com/FrancescAlted/python-blosc Source0: https://pypi.python.org/packages/source/b/%{module}/%{module}-%{version}.tar.gz +Patch0: 0001-tests-fix-error-with-new-numpy.patch BuildRequires: blosc-devel BuildRequires: python2-devel BuildRequires: numpy +BuildRequires: python2-psutil %description %{summary}. @@ -38,6 +40,7 @@ Summary: Python wrapper for the blosc high performance compressor BuildRequires: python3-devel BuildRequires: python3-numpy +BuildRequires: python3-psutil %{?python_provide:%python_provide python3-blosc} %{?fedora:Recommends: python3-numpy} @@ -86,6 +89,10 @@ PYTHONPATH=%{buildroot}%{python3_sitearch} python3 -c 'import sys, blosc; sys.ex %endif %changelog +* Sat Feb 13 2016 Zbigniew Jędrzejewski-Szmek - 1.2.8-2 +- Add dependency on psutil to check for leaks during build +- Fix build (#1307896) + * Thu Feb 04 2016 Fedora Release Engineering - 1.2.8-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild From a8a9e5fce74a68f5a9cde6981216cea32f75b5bc Mon Sep 17 00:00:00 2001 From: Orion Poplawski Date: Mon, 16 May 2016 13:27:13 -0600 Subject: [PATCH 6/6] Fix provides filter - Use %python3_pkgversion for EPEL7 compatibility --- python-blosc.spec | 47 +++++++++++++++++++---------------------------- 1 file changed, 19 insertions(+), 28 deletions(-) diff --git a/python-blosc.spec b/python-blosc.spec index 18583af..7b31b60 100644 --- a/python-blosc.spec +++ b/python-blosc.spec @@ -1,7 +1,4 @@ -%global with_python3 0%{?fedora} - -%global __provides_filter_from ^%{python_sitearch}/.*\\.so$ -%global __provides_filter_from ^%{python3_sitearch}/.*\\.so$ +%global __provides_exclude_from ^(%{python2_sitearch}|%{python3_sitearch})/.*\\.so$ %global module blosc @@ -11,7 +8,7 @@ Summary: Python wrapper for the Blosc high performance compressor Name: python-%{module} Version: 1.2.8 -Release: 2%{?dist} +Release: 3%{?dist} License: MIT URL: https://github.com/FrancescAlted/python-blosc Source0: https://pypi.python.org/packages/source/b/%{module}/%{module}-%{version}.tar.gz @@ -34,19 +31,17 @@ Summary: %{summary} %description -n python2-%{module} %{summary}. -%if 0%{?with_python3} -%package -n python3-%{module} +%package -n python%{python3_pkgversion}-%{module} Summary: Python wrapper for the blosc high performance compressor -BuildRequires: python3-devel -BuildRequires: python3-numpy -BuildRequires: python3-psutil -%{?python_provide:%python_provide python3-blosc} -%{?fedora:Recommends: python3-numpy} +BuildRequires: python%{python3_pkgversion}-devel +BuildRequires: python%{python3_pkgversion}-numpy +BuildRequires: python%{python3_pkgversion}-psutil +%{?python_provide:%python_provide python%{python3_pkgversion}-blosc} +%{?fedora:Recommends: python%{python3_pkgversion}-numpy} -%description -n python3-%{module} +%description -n python%{python3_pkgversion}-%{module} %{summary}. -%endif %prep %autosetup -n %{module}-%{version} -p1 @@ -57,15 +52,16 @@ sed -i "s|CFLAGS\.append(\"-msse2\")|pass|" setup.py %build export BLOSC_DIR=%{_libdir}/blosc CFLAGS="%{optflags}" %py2_build -%if 0%{?with_python3} %py3_build -%endif %install %py2_install -%if 0%{?with_python3} %py3_install -%endif + +%check +cd / # avoid interference with build dir +PYTHONPATH=%{buildroot}%{python2_sitearch} python -c 'import sys, blosc; sys.exit(blosc.test())' +PYTHONPATH=%{buildroot}%{python3_sitearch} python3 -c 'import sys, blosc; sys.exit(blosc.test())' %files -n python2-%{module} %{python2_sitearch}/blosc/ @@ -73,22 +69,17 @@ export BLOSC_DIR=%{_libdir}/blosc CFLAGS="%{optflags}" %license LICENSES/PYTHON-BLOSC.txt %doc README.rst RELEASE_NOTES.rst -%if 0%{?with_python3} -%files -n python3-%{module} +%files -n python%{python3_pkgversion}-%{module} %{python3_sitearch}/blosc/ %{python3_sitearch}/blosc-%{version}*-py*.egg-info %license LICENSES/PYTHON-BLOSC.txt %doc README.rst RELEASE_NOTES.rst -%endif - -%check -cd / # avoid interference with build dir -PYTHONPATH=%{buildroot}%{python2_sitearch} python -c 'import sys, blosc; sys.exit(blosc.test())' -%if 0%{?with_python3} -PYTHONPATH=%{buildroot}%{python3_sitearch} python3 -c 'import sys, blosc; sys.exit(blosc.test())' -%endif %changelog +* Mon May 16 2016 Orion Poplawski - 1.2.8-3 +- Fix provides filter +- Use %%python3_pkgversion for EPEL7 compatibility + * Sat Feb 13 2016 Zbigniew Jędrzejewski-Szmek - 1.2.8-2 - Add dependency on psutil to check for leaks during build - Fix build (#1307896)