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