Merge commit 'a8a9e5fce7' into epel7

Builds for python3X for EPEL

Conflicts:
	python-blosc.spec
This commit is contained in:
Orion Poplawski 2018-11-12 18:31:55 -07:00
commit 3f1efa2e42
6 changed files with 93 additions and 100 deletions

1
.gitignore vendored
View file

@ -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

View file

@ -1,34 +0,0 @@
From b6c85062b316ecd4606c64b449fe0c8ec5d2a708 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= <zbyszek@in.waw.pl>
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

View file

@ -0,0 +1,35 @@
From b49ff10a169a0c8e862a5dbe0f4b291cef17f9d0 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= <zbyszek@in.waw.pl>
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

View file

@ -1,28 +0,0 @@
From 16688ab07612e4f022b3118e7a18660ffdfcb106 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= <zbyszek@in.waw.pl>
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

View file

@ -1,41 +1,47 @@
%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
# 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
Version: 1.2.8
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
Patch0: 0001-Allow-verbosity-to-be-specified-when-running-test-su.patch
Patch1: 0002-Propagate-the-result-of-tests.patch
Patch0: 0001-tests-fix-error-with-new-numpy.patch
BuildRequires: blosc-devel
BuildRequires: python2-devel
BuildRequires: numpy
%{?fedora:Recommends: numpy}
BuildRequires: python2-psutil
%description
Python wrapper for the Blosc high performance compressor.
%{summary}.
%if 0%{?with_python3}
%package -n python3-%{module}
%package -n python2-%{module}
Summary: %{summary}
%{?python_provide:%python_provide python2-blosc}
%{?fedora:Recommends: numpy}
%description -n python2-%{module}
%{summary}.
%package -n python%{python3_pkgversion}-%{module}
Summary: Python wrapper for the blosc high performance compressor
BuildRequires: python3-devel
BuildRequires: python3-numpy
%{?fedora:Recommends: python3-numpy}
%description -n python3-%{module}
Python wrapper for the Blosc high performance compressor.
%endif
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 python%{python3_pkgversion}-%{module}
%{summary}.
%prep
%autosetup -n %{module}-%{version} -p1
@ -45,39 +51,52 @@ sed -i "s|CFLAGS\.append(\"-msse2\")|pass|" setup.py
%build
export BLOSC_DIR=%{_libdir}/blosc CFLAGS="%{optflags}"
%{__python2} setup.py build
%if 0%{?with_python3}
%{__python3} setup.py build
%endif
%py2_build
%py3_build
%install
%{__python2} setup.py install --prefix=%{_prefix} -O1 --skip-build --root=%{buildroot}
%if 0%{?with_python3}
%{__python3} setup.py install --prefix=%{_prefix} -O1 --skip-build --root=%{buildroot}
%endif
%py2_install
%py3_install
%files
%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/
%{python2_sitearch}/blosc-%{version}*-py*.egg-info
%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 <orion@cora.nwra.com> - 1.2.8-3
- Fix provides filter
- Use %%python3_pkgversion for EPEL7 compatibility
* Sat Feb 13 2016 Zbigniew Jędrzejewski-Szmek <zbyszek@bupkis> - 1.2.8-2
- Add dependency on psutil to check for leaks during build
- Fix build (#1307896)
* Thu Feb 04 2016 Fedora Release Engineering <releng@fedoraproject.org> - 1.2.8-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild
* Mon Nov 16 2015 Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> - 1.2.8-1
- Update to latest version (#1263680)
- Add python2 subpackage following the latest guidelines
* Tue Nov 10 2015 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.2.7-5
- Rebuilt for https://fedoraproject.org/wiki/Changes/python3.5
* Thu Jun 18 2015 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.2.7-4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild
* Fri May 29 2015 Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> - 1.2.7-3
- Run test suite

View file

@ -1 +1 @@
4661af9ef228971d851852fa3c468416 blosc-1.2.7.tar.gz
d7f505adefd46fbdb50c7b608d5cbdf6 blosc-1.2.8.tar.gz