Fix Python 3.9 compatibility (#1792055)
This commit is contained in:
parent
5f013c0024
commit
d017f13c95
2 changed files with 35 additions and 1 deletions
28
0005-fix-python-3.9-compatibility.patch
Normal file
28
0005-fix-python-3.9-compatibility.patch
Normal file
|
|
@ -0,0 +1,28 @@
|
|||
diff --git a/blosc/toplevel.py b/blosc/toplevel.py
|
||||
index 94cf4af..2fa2c49 100644
|
||||
--- a/blosc/toplevel.py
|
||||
+++ b/blosc/toplevel.py
|
||||
@@ -435,9 +435,9 @@ def compress(bytesobj, typesize=8, clevel=9, shuffle=blosc.SHUFFLE,
|
||||
Examples
|
||||
--------
|
||||
|
||||
- >>> import array
|
||||
+ >>> import array, sys
|
||||
>>> a = array.array('i', range(1000*1000))
|
||||
- >>> a_bytesobj = a.tostring()
|
||||
+ >>> a_bytesobj = a.tobytes() if sys.version_info >= (3, 0, 0) else a.tostring()
|
||||
>>> c_bytesobj = blosc.compress(a_bytesobj, typesize=4)
|
||||
>>> len(c_bytesobj) < len(a_bytesobj)
|
||||
True
|
||||
@@ -574,9 +574,9 @@ def decompress(bytesobj, as_bytearray=False):
|
||||
Examples
|
||||
--------
|
||||
|
||||
- >>> import array
|
||||
+ >>> import array, sys
|
||||
>>> a = array.array('i', range(1000*1000))
|
||||
- >>> a_bytesobj = a.tostring()
|
||||
+ >>> a_bytesobj = a.tobytes() if sys.version_info >= (3, 0, 0) else a.tostring()
|
||||
>>> c_bytesobj = blosc.compress(a_bytesobj, typesize=4)
|
||||
>>> a_bytesobj2 = blosc.decompress(c_bytesobj)
|
||||
>>> a_bytesobj == a_bytesobj2
|
||||
|
|
@ -1,7 +1,7 @@
|
|||
Summary: Python wrapper for the Blosc high performance compressor
|
||||
Name: python-blosc
|
||||
Version: 1.8.1
|
||||
Release: 6%{?dist}
|
||||
Release: 7%{?dist}
|
||||
License: MIT
|
||||
URL: https://github.com/Blosc/python-blosc
|
||||
Source0: https://github.com/Blosc/python-blosc/archive/v%{version}/blosc-%{version}.tar.gz
|
||||
|
|
@ -12,6 +12,9 @@ Patch2: 0002-setup.py-unbreak-build-on-architectures-which-don-t-.patch
|
|||
Patch3: 0003-setup.py-catch-import-error-for-cpuinfo.patch
|
||||
# https://github.com/Blosc/python-blosc/pull/202
|
||||
Patch4: 0004-Read-os-release-instead-of-using-platform.linux_dist.patch
|
||||
# Fix Python 3.9 compatibility
|
||||
# https://github.com/Blosc/python-blosc/pull/218
|
||||
Patch5: 0005-fix-python-3.9-compatibility.patch
|
||||
|
||||
BuildRequires: gcc
|
||||
BuildRequires: blosc-devel >= 1.16.0
|
||||
|
|
@ -57,6 +60,9 @@ PYTHONPATH=%{buildroot}%{python3_sitearch} %__python3 -c 'import sys, blosc; sys
|
|||
%doc README.rst RELEASE_NOTES.rst
|
||||
|
||||
%changelog
|
||||
* Wed May 27 2020 Charalampos Stratakis <cstratak@redhat.com> - 1.8.1-7
|
||||
- Fix Python 3.9 compatibility (#1792055)
|
||||
|
||||
* Tue May 26 2020 Miro Hrončok <mhroncok@redhat.com> - 1.8.1-6
|
||||
- Rebuilt for Python 3.9
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue