diff --git a/.gitignore b/.gitignore index ad7f91f..5a84aff 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,3 @@ /pyfastnoisesimd-0.3.2.tar.gz /pyfastnoisesimd-0.4.1.tar.gz +/pyfastnoisesimd-0.4.2.tar.gz diff --git a/0005-Fix-alignment-on-non-optimized-systems.patch b/0005-Fix-alignment-on-non-optimized-systems.patch deleted file mode 100644 index a9d04b4..0000000 --- a/0005-Fix-alignment-on-non-optimized-systems.patch +++ /dev/null @@ -1,48 +0,0 @@ -From d1ac49b993d625651e61dd115115b609a0c8b22a Mon Sep 17 00:00:00 2001 -From: Elliott Sales de Andrade -Date: Sun, 13 Jan 2019 01:17:40 -0500 -Subject: [PATCH 5/5] Fix alignment on non-optimized systems. - -PPC64LE, for example, does not have any optimized code, so alignment is -2, and dividing by item size (which is greater than 2), the result is 0. -This produces a divide-by-zero later, so it should be limited to 1 at -minimum. - -Signed-off-by: Elliott Sales de Andrade ---- - pyfastnoisesimd/helpers.py | 5 ++--- - 1 file changed, 2 insertions(+), 3 deletions(-) - -diff --git a/pyfastnoisesimd/helpers.py b/pyfastnoisesimd/helpers.py -index b62aeba..a9e8c58 100644 ---- a/pyfastnoisesimd/helpers.py -+++ b/pyfastnoisesimd/helpers.py -@@ -59,7 +59,7 @@ def empty_coords(length, dtype=np.float32, n_byte=ext.SIMD_ALIGNMENT): - itemsize = dtype.itemsize - - # We need to expand length to be a multiple of the vector size -- vect_len = ext.SIMD_ALIGNMENT // itemsize -+ vect_len = max(ext.SIMD_ALIGNMENT // itemsize, 1) - aligned_len = int(vect_len*np.ceil(length/vect_len)) - shape = (3, aligned_len) - -@@ -125,7 +125,7 @@ def aligned_chunks(array, n_chunks, axis=0): - block_size = np.product(array.shape[axis:]) - # print(f'Got blocksize of {block_size}') - -- vect_len = ext.SIMD_ALIGNMENT // array.dtype.itemsize -+ vect_len = max(ext.SIMD_ALIGNMENT // array.dtype.itemsize, 1) - - if block_size % vect_len == 0: - # Iterate at-will, the underlying blocks have the correct shape -@@ -880,7 +880,6 @@ class Noise(object): - # for I, ((result_chunk, r_offset), (coord_chunk, offset)) in enumerate(zip( - # aligned_chunks(result, self._num_workers, axis=0), - # aligned_chunks(coords, self._num_workers, axis=1))): -- vect_len = ext.SIMD_ALIGNMENT // itemsize - for I, (result_chunk, offset) in enumerate( - aligned_chunks(result, self._num_workers, axis=0)): - --- -2.20.1 - diff --git a/python-pyfastnoisesimd.spec b/python-pyfastnoisesimd.spec index 4dff54d..17bbc1d 100644 --- a/python-pyfastnoisesimd.spec +++ b/python-pyfastnoisesimd.spec @@ -3,8 +3,8 @@ %global srcname pyfastnoisesimd Name: python-%{srcname} -Version: 0.4.1 -Release: 10%{?dist} +Version: 0.4.2 +Release: 1%{?dist} Summary: Python Fast Noise with SIMD License: BSD @@ -20,8 +20,6 @@ Patch0002: 0002-Use-fallback-for-PPC64-and-S390x.patch Patch0003: 0003-Add-platform-specific-flags-for-NEON.patch # https://github.com/Auburns/FastNoiseSIMD/pull/32 Patch0004: 0004-Use-getauxval-to-check-for-NEON-on-Linux.patch -# https://github.com/robbmcleod/pyfastnoisesimd/pull/20 -Patch0005: 0005-Fix-alignment-on-non-optimized-systems.patch # gcc seems to enable SSE2 even when not requested. ExcludeArch: %{ix86} @@ -58,12 +56,6 @@ Requires: python3dist(numpy) > 1.7 # Remove bundled egg-info rm -rf %{srcname}.egg-info -# Fix line endings -for file in README.rst; do - sed "s|\r||g" ${file} > ${file}.new - touch -r ${file} ${file}.new - mv ${file}.new ${file} -done %build @@ -83,10 +75,10 @@ popd %files -n python3-%{srcname} -%doc README.rst +%doc README.md %license LICENSE -%{python3_sitearch}/%{srcname} -%{python3_sitearch}/%{srcname}-%{version}-py%{python3_version}.egg-info +%{python3_sitearch}/%{srcname}/ +%{python3_sitearch}/%{srcname}-%{version}-py%{python3_version}.egg-info/ %changelog diff --git a/sources b/sources index e702da5..1c49fd4 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (pyfastnoisesimd-0.4.1.tar.gz) = 6f8f0957b3e71e7221221af3bbfff0617ffd550461803c936baeb0dba217b42f223d3b0121b5072d5f61a3a45f0718bcca31e78196a53b30a513b4cf34c3f301 +SHA512 (pyfastnoisesimd-0.4.2.tar.gz) = a8272d3cae1aab25cf8a6368d65016bd707aaf38d2d9fed04df38049ef5224d1af97ea9839d0aa2350d80cd4135c3236ef47279d78fcce53c5ea962ac548a177