The package rpms/python-numpy-stl.git has added or updated architecture specific content
in its
spec file (ExclusiveArch/ExcludeArch or %ifarch/%ifnarch) in commit(s):
https://src.fedoraproject.org/cgit/rpms/python-numpy-stl.git/commit/?id=4...
https://src.fedoraproject.org/cgit/rpms/python-numpy-stl.git/commit/?id=8....
Change:
+%ifnarch armv7hl
-%ifnarch armv7hl
Thanks.
Full change:
============
commit 4219577b60840c948fa0bc417ac23b9e0ea32097
Author: Miro Hronok <miro(a)hroncok.cz>
Date: Mon Dec 10 15:23:52 2018 +0100
Update to 2.8.0, fixes a long-standing bug with ASCII STL files
Fixes
https://bugzilla.redhat.com/show_bug.cgi?id=1589520
diff --git a/.gitignore b/.gitignore
index d19d78e..5bcbd35 100644
--- a/.gitignore
+++ b/.gitignore
@@ -7,3 +7,4 @@
/numpy-stl-2.4.1.tar.gz
/numpy-stl-v2.6.0.tar.xz
/numpy-stl-v2.7.0.tar.xz
+/numpy-stl-v2.8.0.tar.xz
diff --git a/python-numpy-stl.spec b/python-numpy-stl.spec
index ed8b0a9..60fcf66 100644
--- a/python-numpy-stl.spec
+++ b/python-numpy-stl.spec
@@ -1,7 +1,7 @@
%global pypi_name numpy-stl
Name: python-%{pypi_name}
-Version: 2.7.0
+Version: 2.8.0
Release: 1%{?dist}
Summary: Library for reading, writing and modifying STL files
@@ -20,6 +20,13 @@ BuildRequires: python3-setuptools
BuildRequires: python3-sphinx
BuildRequires: python3-utils >= 1.6.2
+%ifnarch armv7hl
+# the test is optional based on the presence of PyQt5
+# xvfb somehow fails on this arch
+BuildRequires: python3-PyQt5
+BuildRequires: /usr/bin/xvfb-run
+%endif
+
%?python_enable_dependency_generator
%description
@@ -53,6 +60,8 @@ rm -rf %{pypi_name}.egg-info
# Remove pytest config - it assumes coverage and is not otherwise needed
rm pytest.ini
+#
https://github.com/WoLpH/numpy-stl/pull/96
+sed -i 's/warnings.ImportWarning/ImportWarning/' tests/test_ascii.py
%build
%py3_build
@@ -66,7 +75,7 @@ rm -rf html/.{doctrees,buildinfo}
%check
-%{__python3} setup.py pytest
+%{__python3} setup.py pytest --addopts -v
%files -n python3-%{pypi_name}
@@ -82,6 +91,9 @@ rm -rf html/.{doctrees,buildinfo}
%doc html
%changelog
+* Mon Dec 10 2018 Miro Hronok <mhroncok(a)redhat.com> - 2.8.0-1
+- Update to 2.8.0, fixes a long-standing bug with ASCII STL files (#1589520)
+
* Wed Aug 01 2018 Miro Hronok <mhroncok(a)redhat.com> - 2.7.0-1
- Update to 2.7.0 (#1595001)
- Make doc subpackage noarch
diff --git a/sources b/sources
index ee52875..23e97ef 100644
--- a/sources
+++ b/sources
@@ -1 +1 @@
-SHA512 (numpy-stl-v2.7.0.tar.xz) =
257216cbc94b5ba837a370351a284a1395101ae56b8a61db74379ab4204d3bca2cf3d8dff076d89f2a46ea6a1771c9c6dd54be6329d32e859486063be30ccb7c
+SHA512 (numpy-stl-v2.8.0.tar.xz) =
402b17393f6748ed8cc09994a038f49fe4dec31b6f06f824a9a26903bdf32941e6f15b7027a5449f1486f41aa91458e001f70ace00012ee52d74fb4c0c22b38a
commit f869aec3dd0cbd792974e849f742017de9460b9e
Author: Miro Hronok <miro(a)hroncok.cz>
Date: Wed Aug 1 17:51:23 2018 +0200
Update to 2.7.0 (#1595001), make doc noarch
diff --git a/.gitignore b/.gitignore
index dcdd683..d19d78e 100644
--- a/.gitignore
+++ b/.gitignore
@@ -6,3 +6,4 @@
/numpy-stl-2.3.2.tar.gz
/numpy-stl-2.4.1.tar.gz
/numpy-stl-v2.6.0.tar.xz
+/numpy-stl-v2.7.0.tar.xz
diff --git a/numpy-stl-python37.patch b/numpy-stl-python37.patch
deleted file mode 100644
index 65c930b..0000000
--- a/numpy-stl-python37.patch
+++ /dev/null
@@ -1,72 +0,0 @@
-From c472e634aa6aa4c42adef5601541b641c79f6bf0 Mon Sep 17 00:00:00 2001
-From: =?UTF-8?q?Miro=20Hron=C4=8Dok?= <miro(a)hroncok.cz>
-Date: Mon, 25 Jun 2018 13:18:24 +0200
-Subject: [PATCH] Support Python 3.7 (PEP 479)
-
-See
https://www.python.org/dev/peps/pep-0479/
-Fixes
https://github.com/WoLpH/numpy-stl/issues/82
----
- .travis.yml | 7 +++++++
- stl/stl.py | 2 +-
- tox.ini | 5 ++++-
- 3 files changed, 12 insertions(+), 2 deletions(-)
-
-diff --git a/.travis.yml b/.travis.yml
-index a5af03b..b1b1aad 100644
---- a/.travis.yml
-+++ b/.travis.yml
-@@ -13,6 +13,13 @@ env:
- - TOX_ENV=py34-nix
- - TOX_ENV=py35-nix
- - TOX_ENV=py36-nix
-+matrix:
-+ include:
-+ - env: TOX_ENV=py37-nix
-+ python: '3.7-dev'
-+ install: pip install coveralls flake8 tox
-+ # be more verbose not to timeout:
-+ script: tox -vv -e $TOX_ENV
- install:
- - pip install -r tests/requirements.txt
- - pip install coveralls flake8 tox
-diff --git a/stl/stl.py b/stl/stl.py
-index f4007ed..ec8225d 100644
---- a/stl/stl.py
-+++ b/stl/stl.py
-@@ -214,7 +214,7 @@ def get(prefix=''):
- except AssertionError as e: # pragma: no cover
- raise RuntimeError(recoverable[0], e)
- except StopIteration:
-- raise
-+ return
-
- @classmethod
- def _load_ascii(cls, fh, header, speedups=True):
-diff --git a/tox.ini b/tox.ini
-index 275a844..f8a1057 100644
---- a/tox.ini
-+++ b/tox.ini
-@@ -1,5 +1,5 @@
- [tox]
--envlist = {py27,py33,py34,py35,py36}-{windows-32,windows-64,nix}, docs, flake8
-+envlist = {py27,py33,py34,py35,py36,py37}-{windows-32,windows-64,nix}, docs, flake8
- skip_missing_interpreters = True
-
- [testenv]
-@@ -12,6 +12,7 @@ basepython =
- py34-nix: python3.4
- py35-nix: python3.5
- py36-nix: python3.6
-+ py37-nix: python3.7
- py27-windows-32: C:\\Python27\\python.exe
- py27-windows-64: C:\\Python27-x64\\python.exe
- py34-windows-32: C:\\Python34\\python.exe
-@@ -20,6 +21,8 @@ basepython =
- py35-windows-64: C:\\Python35-x64\\python.exe
- py36-windows-32: C:\\Python36\\python.exe
- py36-windows-64: C:\\Python36-x64\\python.exe
-+ py37-windows-32: C:\\Python37\\python.exe
-+ py37-windows-64: C:\\Python37-x64\\python.exe
-
- [testenv:flake8]
- basepython=python
diff --git a/python-numpy-stl.spec b/python-numpy-stl.spec
index 3b25f01..ed8b0a9 100644
--- a/python-numpy-stl.spec
+++ b/python-numpy-stl.spec
@@ -1,17 +1,14 @@
%global pypi_name numpy-stl
Name: python-%{pypi_name}
-Version: 2.6.0
-Release: 2%{?dist}
+Version: 2.7.0
+Release: 1%{?dist}
Summary: Library for reading, writing and modifying STL files
License: BSD
URL:
https://github.com/WoLpH/numpy-stl/
Source0: %{url}/releases/download/v%{version}/%{pypi_name}-v%{version}.tar.xz
-#
https://github.com/WoLpH/numpy-stl/pull/83
-Patch0: %{pypi_name}-python37.patch
-
BuildRequires: gcc
BuildRequires: python3-devel
@@ -45,6 +42,7 @@ fastest STL editing libraries for Python available.
%package doc
Summary: %{name} documentation
Suggests: python3-%{pypi_name}
+BuildArch: noarch
%description doc
Documentation for %{name}.
@@ -84,6 +82,10 @@ rm -rf html/.{doctrees,buildinfo}
%doc html
%changelog
+* Wed Aug 01 2018 Miro Hronok <mhroncok(a)redhat.com> - 2.7.0-1
+- Update to 2.7.0 (#1595001)
+- Make doc subpackage noarch
+
* Sat Jul 14 2018 Fedora Release Engineering <releng(a)fedoraproject.org> - 2.6.0-2
- Rebuilt for
https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild
diff --git a/sources b/sources
index 5865784..ee52875 100644
--- a/sources
+++ b/sources
@@ -1 +1 @@
-SHA512 (numpy-stl-v2.6.0.tar.xz) =
85f070df8dcfc59088e18c76397eab4179713324fb312d8676fe6751c7491e7e6e1591bf35d50dc3375d2de9cecd3ade2fda765e06393796099fdf4a092f9c1a
+SHA512 (numpy-stl-v2.7.0.tar.xz) =
257216cbc94b5ba837a370351a284a1395101ae56b8a61db74379ab4204d3bca2cf3d8dff076d89f2a46ea6a1771c9c6dd54be6329d32e859486063be30ccb7c
commit c7b8468156339ada75eac508aadd61958ac20988
Author: Miro Hronok <miro(a)hroncok.cz>
Date: Sun Jul 15 16:28:06 2018 +0200
BR gcc
diff --git a/python-numpy-stl.spec b/python-numpy-stl.spec
index 5a1d949..3b25f01 100644
--- a/python-numpy-stl.spec
+++ b/python-numpy-stl.spec
@@ -12,6 +12,8 @@ Source0:
%{url}/releases/download/v%{version}/%{pypi_name}-v%{version}.ta
#
https://github.com/WoLpH/numpy-stl/pull/83
Patch0: %{pypi_name}-python37.patch
+BuildRequires: gcc
+
BuildRequires: python3-devel
BuildRequires: python3-Cython
BuildRequires: python3-numpy
commit ac3d598f4512138d8216bd03f4e915abab92676d
Author: Fedora Release Engineering <releng(a)fedoraproject.org>
Date: Sat Jul 14 01:10:53 2018 +0000
- Rebuilt for
https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild
Signed-off-by: Fedora Release Engineering <releng(a)fedoraproject.org>
diff --git a/python-numpy-stl.spec b/python-numpy-stl.spec
index 741eaae..5a1d949 100644
--- a/python-numpy-stl.spec
+++ b/python-numpy-stl.spec
@@ -2,7 +2,7 @@
Name: python-%{pypi_name}
Version: 2.6.0
-Release: 1%{?dist}
+Release: 2%{?dist}
Summary: Library for reading, writing and modifying STL files
License: BSD
@@ -82,6 +82,9 @@ rm -rf html/.{doctrees,buildinfo}
%doc html
%changelog
+* Sat Jul 14 2018 Fedora Release Engineering <releng(a)fedoraproject.org> - 2.6.0-2
+- Rebuilt for
https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild
+
* Mon Jun 25 2018 Miro Hronok <mhroncok(a)redhat.com> - 2.6.0-1
- Update to 2.6.0 (#1577429)
- Add a patch to support Python 3.7
commit 4e2814120c212bb4813e69e17fcb165a7c40876c
Author: Miro Hronok <miro(a)hroncok.cz>
Date: Mon Jun 25 17:00:51 2018 +0200
Update to 2.6.0 (#1577429)
- Add a patch to support Python 3.7
diff --git a/.gitignore b/.gitignore
index 0e36a82..dcdd683 100644
--- a/.gitignore
+++ b/.gitignore
@@ -5,3 +5,4 @@
/numpy-stl-2.2.3.tar.gz
/numpy-stl-2.3.2.tar.gz
/numpy-stl-2.4.1.tar.gz
+/numpy-stl-v2.6.0.tar.xz
diff --git a/numpy-stl-allclose.patch b/numpy-stl-allclose.patch
deleted file mode 100644
index f3468ea..0000000
--- a/numpy-stl-allclose.patch
+++ /dev/null
@@ -1,212 +0,0 @@
-From d1c02b07eb8cb3534b91c771e4b158885606bc1c Mon Sep 17 00:00:00 2001
-From: =?UTF-8?q?Miro=20Hron=C4=8Dok?= <miro(a)hroncok.cz>
-Date: Fri, 11 May 2018 15:52:47 +0200
-Subject: [PATCH] Use numpy.allclose() in tests to check float arrays equality
-
-On some platforms, a regular (a == b).all() might not work due to
-float32 not being very precise. In one particular case, we also
-increase the tolerance for allclose(), because on ppc64le 3
-rotations are enough to divert too much from the mathematically
-correct result.
-
-We cannot increase the precision, because STL has 32bit floats.
-
-Fixes
https://github.com/WoLpH/numpy-stl/issues/78
----
- tests/test_mesh.py | 47 ++++++++++++++++++++++-------------------------
- tests/test_rotate.py | 50 ++++++++++++++++++++++++++------------------------
- 2 files changed, 48 insertions(+), 49 deletions(-)
-
-diff --git a/tests/test_mesh.py b/tests/test_mesh.py
-index 6c9906a..d272126 100644
---- a/tests/test_mesh.py
-+++ b/tests/test_mesh.py
-@@ -33,12 +33,9 @@ def test_units_2d():
- mesh = Mesh(data, remove_empty_areas=False)
- mesh.update_units()
-
-- assert (mesh.areas == [.5, .5]).all()
-- assert (mesh.normals == [[0, 0, 1.],
-- [0, 0, -1.]]).all()
--
-- assert (mesh.units == [[0, 0, 1],
-- [0, 0, -1]]).all()
-+ assert numpy.allclose(mesh.areas, [.5, .5])
-+ assert numpy.allclose(mesh.normals, [[0, 0, 1.], [0, 0, -1.]])
-+ assert numpy.allclose(mesh.units, [[0, 0, 1], [0, 0, -1]])
-
-
- def test_units_3d():
-@@ -51,7 +48,7 @@ def test_units_3d():
- mesh.update_units()
-
- assert (mesh.areas - 2 ** .5) < 0.0001
-- assert (mesh.normals == [0, -1, 1]).all()
-+ assert numpy.allclose(mesh.normals, [0, -1, 1])
-
- units = mesh.units[0]
- assert units[0] == 0
-@@ -102,28 +99,28 @@ def test_duplicate_polygons():
- mesh = Mesh(data, remove_duplicate_polygons=True)
- assert mesh.data.size == 3
-
-- assert (mesh.vectors[0] == numpy.array([[1, 0, 0],
-- [0, 0, 0],
-- [0, 0, 0]])).all()
-- assert (mesh.vectors[1] == numpy.array([[2, 0, 0],
-- [0, 0, 0],
-- [0, 0, 0]])).all()
-- assert (mesh.vectors[2] == numpy.array([[0, 0, 0],
-- [0, 0, 0],
-- [0, 0, 0]])).all()
-+ assert numpy.allclose(mesh.vectors[0], numpy.array([[1, 0, 0],
-+ [0, 0, 0],
-+ [0, 0, 0]]))
-+ assert numpy.allclose(mesh.vectors[1], numpy.array([[2, 0, 0],
-+ [0, 0, 0],
-+ [0, 0, 0]]))
-+ assert numpy.allclose(mesh.vectors[2], numpy.array([[0, 0, 0],
-+ [0, 0, 0],
-+ [0, 0, 0]]))
-
- mesh = Mesh(data, remove_duplicate_polygons=RemoveDuplicates.ALL)
- assert mesh.data.size == 3
-
-- assert (mesh.vectors[0] == numpy.array([[1, 0, 0],
-- [0, 0, 0],
-- [0, 0, 0]])).all()
-- assert (mesh.vectors[1] == numpy.array([[2, 0, 0],
-- [0, 0, 0],
-- [0, 0, 0]])).all()
-- assert (mesh.vectors[2] == numpy.array([[0, 0, 0],
-- [0, 0, 0],
-- [0, 0, 0]])).all()
-+ assert numpy.allclose(mesh.vectors[0], numpy.array([[1, 0, 0],
-+ [0, 0, 0],
-+ [0, 0, 0]]))
-+ assert numpy.allclose(mesh.vectors[1], numpy.array([[2, 0, 0],
-+ [0, 0, 0],
-+ [0, 0, 0]]))
-+ assert numpy.allclose(mesh.vectors[2], numpy.array([[0, 0, 0],
-+ [0, 0, 0],
-+ [0, 0, 0]]))
-
-
- def test_remove_all_duplicate_polygons():
-diff --git a/tests/test_rotate.py b/tests/test_rotate.py
-index 65900ea..5275fad 100644
---- a/tests/test_rotate.py
-+++ b/tests/test_rotate.py
-@@ -49,14 +49,16 @@ def test_rotation():
- # substracting .5
- data['vectors'] += .5
-
-- assert (mesh.vectors == numpy.array([
-+ # We use a slightly higher absolute tolerance here, for ppc64le
-+ #
https://github.com/WoLpH/numpy-stl/issues/78
-+ assert numpy.allclose(mesh.vectors, numpy.array([
- [[1, 0, 0], [0, 1, 0], [0, 0, 0]],
- [[0, 1, 0], [1, 0, 0], [1, 1, 0]],
- [[0, 1, 1], [0, 1, 0], [1, 1, 1]],
- [[1, 1, 0], [0, 1, 0], [1, 1, 1]],
- [[0, 0, 1], [0, 1, 1], [0, 1, 0]],
- [[0, 0, 1], [0, 0, 0], [0, 1, 0]],
-- ])).all()
-+ ]), atol=1e-07)
-
-
- def test_rotation_over_point():
-@@ -127,13 +129,13 @@ def test_no_rotation():
-
- # Rotate by 0 degrees
- mesh.rotate([0.5, 0.0, 0.0], math.radians(0))
-- assert (mesh.vectors == numpy.array([
-- [[0, 1, 1], [1, 0, 1], [0, 0, 1]]])).all()
-+ assert numpy.allclose(mesh.vectors, numpy.array([
-+ [[0, 1, 1], [1, 0, 1], [0, 0, 1]]]))
-
- # Use a zero rotation matrix
- mesh.rotate([0.0, 0.0, 0.0], math.radians(90))
-- assert (mesh.vectors == numpy.array([
-- [[0, 1, 1], [1, 0, 1], [0, 0, 1]]])).all()
-+ assert numpy.allclose(mesh.vectors, numpy.array([
-+ [[0, 1, 1], [1, 0, 1], [0, 0, 1]]]))
-
-
- def test_no_translation():
-@@ -144,13 +146,13 @@ def test_no_translation():
- [0, 0, 1]])
-
- mesh = Mesh(data, remove_empty_areas=False)
-- assert (mesh.vectors == numpy.array([
-- [[0, 1, 1], [1, 0, 1], [0, 0, 1]]])).all()
-+ assert numpy.allclose(mesh.vectors, numpy.array([
-+ [[0, 1, 1], [1, 0, 1], [0, 0, 1]]]))
-
- # Translate mesh with a zero vector
- mesh.translate([0.0, 0.0, 0.0])
-- assert (mesh.vectors == numpy.array([
-- [[0, 1, 1], [1, 0, 1], [0, 0, 1]]])).all()
-+ assert numpy.allclose(mesh.vectors, numpy.array([
-+ [[0, 1, 1], [1, 0, 1], [0, 0, 1]]]))
-
-
- def test_translation():
-@@ -161,13 +163,13 @@ def test_translation():
- [0, 0, 1]])
-
- mesh = Mesh(data, remove_empty_areas=False)
-- assert (mesh.vectors == numpy.array([
-- [[0, 1, 1], [1, 0, 1], [0, 0, 1]]])).all()
-+ assert numpy.allclose(mesh.vectors, numpy.array([
-+ [[0, 1, 1], [1, 0, 1], [0, 0, 1]]]))
-
- # Translate mesh with vector [1, 2, 3]
- mesh.translate([1.0, 2.0, 3.0])
-- assert (mesh.vectors == numpy.array([
-- [[1, 3, 4], [2, 2, 4], [1, 2, 4]]])).all()
-+ assert numpy.allclose(mesh.vectors, numpy.array([
-+ [[1, 3, 4], [2, 2, 4], [1, 2, 4]]]))
-
-
- def test_no_transformation():
-@@ -178,14 +180,14 @@ def test_no_transformation():
- [0, 0, 1]])
-
- mesh = Mesh(data, remove_empty_areas=False)
-- assert (mesh.vectors == numpy.array([
-- [[0, 1, 1], [1, 0, 1], [0, 0, 1]]])).all()
-+ assert numpy.allclose(mesh.vectors, numpy.array([
-+ [[0, 1, 1], [1, 0, 1], [0, 0, 1]]]))
-
- # Transform mesh with identity matrix
- mesh.transform(numpy.eye(4))
-- assert (mesh.vectors == numpy.array([
-- [[0, 1, 1], [1, 0, 1], [0, 0, 1]]])).all()
-- assert numpy.all(mesh.areas == 0.5)
-+ assert numpy.allclose(mesh.vectors, numpy.array([
-+ [[0, 1, 1], [1, 0, 1], [0, 0, 1]]]))
-+ assert numpy.allclose(mesh.areas, 0.5)
-
-
- def test_transformation():
-@@ -196,14 +198,14 @@ def test_transformation():
- [0, 0, 1]])
-
- mesh = Mesh(data, remove_empty_areas=False)
-- assert (mesh.vectors == numpy.array([
-- [[0, 1, 1], [1, 0, 1], [0, 0, 1]]])).all()
-+ assert numpy.allclose(mesh.vectors, numpy.array([
-+ [[0, 1, 1], [1, 0, 1], [0, 0, 1]]]))
-
- # Transform mesh with identity matrix
- tr = numpy.zeros((4, 4))
- tr[0:3, 0:3] = Mesh.rotation_matrix([0, 0, 1], 0.5 * numpy.pi)
- tr[0:3, 3] = [1, 2, 3]
- mesh.transform(tr)
-- assert (mesh.vectors == numpy.array([
-- [[0, 2, 4], [1, 3, 4], [1, 2, 4]]])).all()
-- assert numpy.all(mesh.areas == 0.5)
-+ assert numpy.allclose(mesh.vectors, numpy.array([
-+ [[0, 2, 4], [1, 3, 4], [1, 2, 4]]]))
-+ assert numpy.allclose(mesh.areas, 0.5)
diff --git a/numpy-stl-python37.patch b/numpy-stl-python37.patch
new file mode 100644
index 0000000..65c930b
--- /dev/null
+++ b/numpy-stl-python37.patch
@@ -0,0 +1,72 @@
+From c472e634aa6aa4c42adef5601541b641c79f6bf0 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Miro=20Hron=C4=8Dok?= <miro(a)hroncok.cz>
+Date: Mon, 25 Jun 2018 13:18:24 +0200
+Subject: [PATCH] Support Python 3.7 (PEP 479)
+
+See
https://www.python.org/dev/peps/pep-0479/
+Fixes
https://github.com/WoLpH/numpy-stl/issues/82
+---
+ .travis.yml | 7 +++++++
+ stl/stl.py | 2 +-
+ tox.ini | 5 ++++-
+ 3 files changed, 12 insertions(+), 2 deletions(-)
+
+diff --git a/.travis.yml b/.travis.yml
+index a5af03b..b1b1aad 100644
+--- a/.travis.yml
++++ b/.travis.yml
+@@ -13,6 +13,13 @@ env:
+ - TOX_ENV=py34-nix
+ - TOX_ENV=py35-nix
+ - TOX_ENV=py36-nix
++matrix:
++ include:
++ - env: TOX_ENV=py37-nix
++ python: '3.7-dev'
++ install: pip install coveralls flake8 tox
++ # be more verbose not to timeout:
++ script: tox -vv -e $TOX_ENV
+ install:
+ - pip install -r tests/requirements.txt
+ - pip install coveralls flake8 tox
+diff --git a/stl/stl.py b/stl/stl.py
+index f4007ed..ec8225d 100644
+--- a/stl/stl.py
++++ b/stl/stl.py
+@@ -214,7 +214,7 @@ def get(prefix=''):
+ except AssertionError as e: # pragma: no cover
+ raise RuntimeError(recoverable[0], e)
+ except StopIteration:
+- raise
++ return
+
+ @classmethod
+ def _load_ascii(cls, fh, header, speedups=True):
+diff --git a/tox.ini b/tox.ini
+index 275a844..f8a1057 100644
+--- a/tox.ini
++++ b/tox.ini
+@@ -1,5 +1,5 @@
+ [tox]
+-envlist = {py27,py33,py34,py35,py36}-{windows-32,windows-64,nix}, docs, flake8
++envlist = {py27,py33,py34,py35,py36,py37}-{windows-32,windows-64,nix}, docs, flake8
+ skip_missing_interpreters = True
+
+ [testenv]
+@@ -12,6 +12,7 @@ basepython =
+ py34-nix: python3.4
+ py35-nix: python3.5
+ py36-nix: python3.6
++ py37-nix: python3.7
+ py27-windows-32: C:\\Python27\\python.exe
+ py27-windows-64: C:\\Python27-x64\\python.exe
+ py34-windows-32: C:\\Python34\\python.exe
+@@ -20,6 +21,8 @@ basepython =
+ py35-windows-64: C:\\Python35-x64\\python.exe
+ py36-windows-32: C:\\Python36\\python.exe
+ py36-windows-64: C:\\Python36-x64\\python.exe
++ py37-windows-32: C:\\Python37\\python.exe
++ py37-windows-64: C:\\Python37-x64\\python.exe
+
+ [testenv:flake8]
+ basepython=python
diff --git a/python-numpy-stl.spec b/python-numpy-stl.spec
index ac19a86..741eaae 100644
--- a/python-numpy-stl.spec
+++ b/python-numpy-stl.spec
@@ -1,16 +1,16 @@
%global pypi_name numpy-stl
Name: python-%{pypi_name}
-Version: 2.4.1
-Release: 2%{?dist}
+Version: 2.6.0
+Release: 1%{?dist}
Summary: Library for reading, writing and modifying STL files
License: BSD
URL:
https://github.com/WoLpH/numpy-stl/
-Source0:
https://files.pythonhosted.org/packages/source/n/%{pypi_name}/%{pypi_name...
+Source0: %{url}/releases/download/v%{version}/%{pypi_name}-v%{version}.tar.xz
-#
https://github.com/WoLpH/numpy-stl/issues/78
-Patch0: %{pypi_name}-allclose.patch
+#
https://github.com/WoLpH/numpy-stl/pull/83
+Patch0: %{pypi_name}-python37.patch
BuildRequires: python3-devel
BuildRequires: python3-Cython
@@ -47,9 +47,12 @@ Suggests: python3-%{pypi_name}
Documentation for %{name}.
%prep
-%autosetup -n %{pypi_name}-%{version} -p1
+%autosetup -n %{pypi_name}-v%{version} -p1
# Remove bundled egg-info
rm -rf %{pypi_name}.egg-info
+# Remove pytest config - it assumes coverage and is not otherwise needed
+rm pytest.ini
+
%build
%py3_build
@@ -79,6 +82,10 @@ rm -rf html/.{doctrees,buildinfo}
%doc html
%changelog
+* Mon Jun 25 2018 Miro Hronok <mhroncok(a)redhat.com> - 2.6.0-1
+- Update to 2.6.0 (#1577429)
+- Add a patch to support Python 3.7
+
* Tue Jun 19 2018 Miro Hronok <mhroncok(a)redhat.com> - 2.4.1-2
- Rebuilt for Python 3.7
diff --git a/sources b/sources
index 4cc1697..5865784 100644
--- a/sources
+++ b/sources
@@ -1 +1 @@
-SHA512 (numpy-stl-2.4.1.tar.gz) =
d45d4606f6f622b7514faa30457b46e1e0ddf258c20953a74de9b37e9f4d8830f441bc8ad031a0a263d029e4da870f5c78e568d25a1d53ade526e4f85f8bfa7f
+SHA512 (numpy-stl-v2.6.0.tar.xz) =
85f070df8dcfc59088e18c76397eab4179713324fb312d8676fe6751c7491e7e6e1591bf35d50dc3375d2de9cecd3ade2fda765e06393796099fdf4a092f9c1a
commit f3f8b5e4f8c97b4ca7684f41e42b7580880fb312
Author: Miro Hronok <miro(a)hroncok.cz>
Date: Tue Jun 19 11:10:59 2018 +0200
Rebuilt for Python 3.7
diff --git a/python-numpy-stl.spec b/python-numpy-stl.spec
index 7593132..ac19a86 100644
--- a/python-numpy-stl.spec
+++ b/python-numpy-stl.spec
@@ -2,7 +2,7 @@
Name: python-%{pypi_name}
Version: 2.4.1
-Release: 1%{?dist}
+Release: 2%{?dist}
Summary: Library for reading, writing and modifying STL files
License: BSD
@@ -79,6 +79,9 @@ rm -rf html/.{doctrees,buildinfo}
%doc html
%changelog
+* Tue Jun 19 2018 Miro Hronok <mhroncok(a)redhat.com> - 2.4.1-2
+- Rebuilt for Python 3.7
+
* Fri May 11 2018 Miro Hronok <mhroncok(a)redhat.com> - 2.4.1-1
- Updated to 2.4.1 (#1475307)
- Enable automatic dependency generator, drop nine from BRs
commit 0255b74368c1a41afaf1acb14f9d765c4835ea0d
Author: Miro Hronok <miro(a)hroncok.cz>
Date: Fri May 11 16:02:16 2018 +0200
Add tolerance to tests that check float equality
Fixes test failure on ppc64le.
diff --git a/numpy-stl-allclose.patch b/numpy-stl-allclose.patch
new file mode 100644
index 0000000..f3468ea
--- /dev/null
+++ b/numpy-stl-allclose.patch
@@ -0,0 +1,212 @@
+From d1c02b07eb8cb3534b91c771e4b158885606bc1c Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Miro=20Hron=C4=8Dok?= <miro(a)hroncok.cz>
+Date: Fri, 11 May 2018 15:52:47 +0200
+Subject: [PATCH] Use numpy.allclose() in tests to check float arrays equality
+
+On some platforms, a regular (a == b).all() might not work due to
+float32 not being very precise. In one particular case, we also
+increase the tolerance for allclose(), because on ppc64le 3
+rotations are enough to divert too much from the mathematically
+correct result.
+
+We cannot increase the precision, because STL has 32bit floats.
+
+Fixes
https://github.com/WoLpH/numpy-stl/issues/78
+---
+ tests/test_mesh.py | 47 ++++++++++++++++++++++-------------------------
+ tests/test_rotate.py | 50 ++++++++++++++++++++++++++------------------------
+ 2 files changed, 48 insertions(+), 49 deletions(-)
+
+diff --git a/tests/test_mesh.py b/tests/test_mesh.py
+index 6c9906a..d272126 100644
+--- a/tests/test_mesh.py
++++ b/tests/test_mesh.py
+@@ -33,12 +33,9 @@ def test_units_2d():
+ mesh = Mesh(data, remove_empty_areas=False)
+ mesh.update_units()
+
+- assert (mesh.areas == [.5, .5]).all()
+- assert (mesh.normals == [[0, 0, 1.],
+- [0, 0, -1.]]).all()
+-
+- assert (mesh.units == [[0, 0, 1],
+- [0, 0, -1]]).all()
++ assert numpy.allclose(mesh.areas, [.5, .5])
++ assert numpy.allclose(mesh.normals, [[0, 0, 1.], [0, 0, -1.]])
++ assert numpy.allclose(mesh.units, [[0, 0, 1], [0, 0, -1]])
+
+
+ def test_units_3d():
+@@ -51,7 +48,7 @@ def test_units_3d():
+ mesh.update_units()
+
+ assert (mesh.areas - 2 ** .5) < 0.0001
+- assert (mesh.normals == [0, -1, 1]).all()
++ assert numpy.allclose(mesh.normals, [0, -1, 1])
+
+ units = mesh.units[0]
+ assert units[0] == 0
+@@ -102,28 +99,28 @@ def test_duplicate_polygons():
+ mesh = Mesh(data, remove_duplicate_polygons=True)
+ assert mesh.data.size == 3
+
+- assert (mesh.vectors[0] == numpy.array([[1, 0, 0],
+- [0, 0, 0],
+- [0, 0, 0]])).all()
+- assert (mesh.vectors[1] == numpy.array([[2, 0, 0],
+- [0, 0, 0],
+- [0, 0, 0]])).all()
+- assert (mesh.vectors[2] == numpy.array([[0, 0, 0],
+- [0, 0, 0],
+- [0, 0, 0]])).all()
++ assert numpy.allclose(mesh.vectors[0], numpy.array([[1, 0, 0],
++ [0, 0, 0],
++ [0, 0, 0]]))
++ assert numpy.allclose(mesh.vectors[1], numpy.array([[2, 0, 0],
++ [0, 0, 0],
++ [0, 0, 0]]))
++ assert numpy.allclose(mesh.vectors[2], numpy.array([[0, 0, 0],
++ [0, 0, 0],
++ [0, 0, 0]]))
+
+ mesh = Mesh(data, remove_duplicate_polygons=RemoveDuplicates.ALL)
+ assert mesh.data.size == 3
+
+- assert (mesh.vectors[0] == numpy.array([[1, 0, 0],
+- [0, 0, 0],
+- [0, 0, 0]])).all()
+- assert (mesh.vectors[1] == numpy.array([[2, 0, 0],
+- [0, 0, 0],
+- [0, 0, 0]])).all()
+- assert (mesh.vectors[2] == numpy.array([[0, 0, 0],
+- [0, 0, 0],
+- [0, 0, 0]])).all()
++ assert numpy.allclose(mesh.vectors[0], numpy.array([[1, 0, 0],
++ [0, 0, 0],
++ [0, 0, 0]]))
++ assert numpy.allclose(mesh.vectors[1], numpy.array([[2, 0, 0],
++ [0, 0, 0],
++ [0, 0, 0]]))
++ assert numpy.allclose(mesh.vectors[2], numpy.array([[0, 0, 0],
++ [0, 0, 0],
++ [0, 0, 0]]))
+
+
+ def test_remove_all_duplicate_polygons():
+diff --git a/tests/test_rotate.py b/tests/test_rotate.py
+index 65900ea..5275fad 100644
+--- a/tests/test_rotate.py
++++ b/tests/test_rotate.py
+@@ -49,14 +49,16 @@ def test_rotation():
+ # substracting .5
+ data['vectors'] += .5
+
+- assert (mesh.vectors == numpy.array([
++ # We use a slightly higher absolute tolerance here, for ppc64le
++ #
https://github.com/WoLpH/numpy-stl/issues/78
++ assert numpy.allclose(mesh.vectors, numpy.array([
+ [[1, 0, 0], [0, 1, 0], [0, 0, 0]],
+ [[0, 1, 0], [1, 0, 0], [1, 1, 0]],
+ [[0, 1, 1], [0, 1, 0], [1, 1, 1]],
+ [[1, 1, 0], [0, 1, 0], [1, 1, 1]],
+ [[0, 0, 1], [0, 1, 1], [0, 1, 0]],
+ [[0, 0, 1], [0, 0, 0], [0, 1, 0]],
+- ])).all()
++ ]), atol=1e-07)
+
+
+ def test_rotation_over_point():
+@@ -127,13 +129,13 @@ def test_no_rotation():
+
+ # Rotate by 0 degrees
+ mesh.rotate([0.5, 0.0, 0.0], math.radians(0))
+- assert (mesh.vectors == numpy.array([
+- [[0, 1, 1], [1, 0, 1], [0, 0, 1]]])).all()
++ assert numpy.allclose(mesh.vectors, numpy.array([
++ [[0, 1, 1], [1, 0, 1], [0, 0, 1]]]))
+
+ # Use a zero rotation matrix
+ mesh.rotate([0.0, 0.0, 0.0], math.radians(90))
+- assert (mesh.vectors == numpy.array([
+- [[0, 1, 1], [1, 0, 1], [0, 0, 1]]])).all()
++ assert numpy.allclose(mesh.vectors, numpy.array([
++ [[0, 1, 1], [1, 0, 1], [0, 0, 1]]]))
+
+
+ def test_no_translation():
+@@ -144,13 +146,13 @@ def test_no_translation():
+ [0, 0, 1]])
+
+ mesh = Mesh(data, remove_empty_areas=False)
+- assert (mesh.vectors == numpy.array([
+- [[0, 1, 1], [1, 0, 1], [0, 0, 1]]])).all()
++ assert numpy.allclose(mesh.vectors, numpy.array([
++ [[0, 1, 1], [1, 0, 1], [0, 0, 1]]]))
+
+ # Translate mesh with a zero vector
+ mesh.translate([0.0, 0.0, 0.0])
+- assert (mesh.vectors == numpy.array([
+- [[0, 1, 1], [1, 0, 1], [0, 0, 1]]])).all()
++ assert numpy.allclose(mesh.vectors, numpy.array([
++ [[0, 1, 1], [1, 0, 1], [0, 0, 1]]]))
+
+
+ def test_translation():
+@@ -161,13 +163,13 @@ def test_translation():
+ [0, 0, 1]])
+
+ mesh = Mesh(data, remove_empty_areas=False)
+- assert (mesh.vectors == numpy.array([
+- [[0, 1, 1], [1, 0, 1], [0, 0, 1]]])).all()
++ assert numpy.allclose(mesh.vectors, numpy.array([
++ [[0, 1, 1], [1, 0, 1], [0, 0, 1]]]))
+
+ # Translate mesh with vector [1, 2, 3]
+ mesh.translate([1.0, 2.0, 3.0])
+- assert (mesh.vectors == numpy.array([
+- [[1, 3, 4], [2, 2, 4], [1, 2, 4]]])).all()
++ assert numpy.allclose(mesh.vectors, numpy.array([
++ [[1, 3, 4], [2, 2, 4], [1, 2, 4]]]))
+
+
+ def test_no_transformation():
+@@ -178,14 +180,14 @@ def test_no_transformation():
+ [0, 0, 1]])
+
+ mesh = Mesh(data, remove_empty_areas=False)
+- assert (mesh.vectors == numpy.array([
+- [[0, 1, 1], [1, 0, 1], [0, 0, 1]]])).all()
++ assert numpy.allclose(mesh.vectors, numpy.array([
++ [[0, 1, 1], [1, 0, 1], [0, 0, 1]]]))
+
+ # Transform mesh with identity matrix
+ mesh.transform(numpy.eye(4))
+- assert (mesh.vectors == numpy.array([
+- [[0, 1, 1], [1, 0, 1], [0, 0, 1]]])).all()
+- assert numpy.all(mesh.areas == 0.5)
++ assert numpy.allclose(mesh.vectors, numpy.array([
++ [[0, 1, 1], [1, 0, 1], [0, 0, 1]]]))
++ assert numpy.allclose(mesh.areas, 0.5)
+
+
+ def test_transformation():
+@@ -196,14 +198,14 @@ def test_transformation():
+ [0, 0, 1]])
+
+ mesh = Mesh(data, remove_empty_areas=False)
+- assert (mesh.vectors == numpy.array([
+- [[0, 1, 1], [1, 0, 1], [0, 0, 1]]])).all()
++ assert numpy.allclose(mesh.vectors, numpy.array([
++ [[0, 1, 1], [1, 0, 1], [0, 0, 1]]]))
+
+ # Transform mesh with identity matrix
+ tr = numpy.zeros((4, 4))
+ tr[0:3, 0:3] = Mesh.rotation_matrix([0, 0, 1], 0.5 * numpy.pi)
+ tr[0:3, 3] = [1, 2, 3]
+ mesh.transform(tr)
+- assert (mesh.vectors == numpy.array([
+- [[0, 2, 4], [1, 3, 4], [1, 2, 4]]])).all()
+- assert numpy.all(mesh.areas == 0.5)
++ assert numpy.allclose(mesh.vectors, numpy.array([
++ [[0, 2, 4], [1, 3, 4], [1, 2, 4]]]))
++ assert numpy.allclose(mesh.areas, 0.5)
diff --git a/python-numpy-stl.spec b/python-numpy-stl.spec
index 8c1bd71..7593132 100644
--- a/python-numpy-stl.spec
+++ b/python-numpy-stl.spec
@@ -9,7 +9,8 @@ License: BSD
URL:
https://github.com/WoLpH/numpy-stl/
Source0:
https://files.pythonhosted.org/packages/source/n/%{pypi_name}/%{pypi_name...
-Patch0: allclose.patch
+#
https://github.com/WoLpH/numpy-stl/issues/78
+Patch0: %{pypi_name}-allclose.patch
BuildRequires: python3-devel
BuildRequires: python3-Cython
@@ -82,6 +83,7 @@ rm -rf html/.{doctrees,buildinfo}
- Updated to 2.4.1 (#1475307)
- Enable automatic dependency generator, drop nine from BRs
- Enable tests on armv7hl once again (it works now)
+- Add tolerance to tests that check float equality, fixes test failure on ppc64le
* Wed Feb 14 2018 Miro Hronok <mhroncok(a)redhat.com> - 2.3.2-1
- Updated to 2.3.2 to fix FTBFS
commit 8db33278e76e3c2190dcc712329a0afb6cf06552
Author: Miro Hronok <miro(a)hroncok.cz>
Date: Fri May 11 14:56:07 2018 +0200
Enable tests on armv7hl once again (it works now)
diff --git a/python-numpy-stl.spec b/python-numpy-stl.spec
index 3da1f47..8c1bd71 100644
--- a/python-numpy-stl.spec
+++ b/python-numpy-stl.spec
@@ -9,6 +9,8 @@ License: BSD
URL:
https://github.com/WoLpH/numpy-stl/
Source0:
https://files.pythonhosted.org/packages/source/n/%{pypi_name}/%{pypi_name...
+Patch0: allclose.patch
+
BuildRequires: python3-devel
BuildRequires: python3-Cython
BuildRequires: python3-numpy
@@ -60,10 +62,7 @@ rm -rf html/.{doctrees,buildinfo}
%check
-# The tests on armv7hl fail with Bus errors, will investigate later
-%ifnarch armv7hl
%{__python3} setup.py pytest
-%endif
%files -n python3-%{pypi_name}
@@ -82,6 +81,7 @@ rm -rf html/.{doctrees,buildinfo}
* Fri May 11 2018 Miro Hronok <mhroncok(a)redhat.com> - 2.4.1-1
- Updated to 2.4.1 (#1475307)
- Enable automatic dependency generator, drop nine from BRs
+- Enable tests on armv7hl once again (it works now)
* Wed Feb 14 2018 Miro Hronok <mhroncok(a)redhat.com> - 2.3.2-1
- Updated to 2.3.2 to fix FTBFS
commit 02d7f1820b920831353ed8f5d7687640f3191f36
Author: Miro Hronok <miro(a)hroncok.cz>
Date: Fri May 11 14:54:38 2018 +0200
Enable automatic dependency generator, drop nine from BRs
diff --git a/python-numpy-stl.spec b/python-numpy-stl.spec
index 69b8aec..3da1f47 100644
--- a/python-numpy-stl.spec
+++ b/python-numpy-stl.spec
@@ -11,7 +11,6 @@ Source0:
https://files.pythonhosted.org/packages/source/n/%{pypi_name}/%{
BuildRequires: python3-devel
BuildRequires: python3-Cython
-BuildRequires: python3-nine
BuildRequires: python3-numpy
BuildRequires: python3-pytest
BuildRequires: python3-pytest-runner
@@ -19,6 +18,8 @@ BuildRequires: python3-setuptools
BuildRequires: python3-sphinx
BuildRequires: python3-utils >= 1.6.2
+%?python_enable_dependency_generator
+
%description
Simple library to make working with STL files (and 3D objects in general) fast
and easy. Due to all operations heavily relying on numpy this is one of the
@@ -28,10 +29,8 @@ fastest STL editing libraries for Python available.
Summary: %{summary}
%{?python_provide:%python_provide python3-%{pypi_name}}
-Requires: python3-numpy
-Requires: python3-nine
-Requires: python3-utils >= 1.6.2
-Requires: python3-setuptools
+# for entrypoints
+Requires: %{py3_dist setuptools}
%description -n python3-%{pypi_name}
Simple library to make working with STL files (and 3D objects in general) fast
@@ -82,6 +81,7 @@ rm -rf html/.{doctrees,buildinfo}
%changelog
* Fri May 11 2018 Miro Hronok <mhroncok(a)redhat.com> - 2.4.1-1
- Updated to 2.4.1 (#1475307)
+- Enable automatic dependency generator, drop nine from BRs
* Wed Feb 14 2018 Miro Hronok <mhroncok(a)redhat.com> - 2.3.2-1
- Updated to 2.3.2 to fix FTBFS
commit 82c9266da326caa24baadf7326d5f5e71bac8041
Author: Miro Hronok <miro(a)hroncok.cz>
Date: Fri May 11 14:36:39 2018 +0200
Updated to 2.4.1 (#1475307)
diff --git a/.gitignore b/.gitignore
index c2b1851..0e36a82 100644
--- a/.gitignore
+++ b/.gitignore
@@ -4,3 +4,4 @@
/numpy-stl-2.2.2.tar.gz
/numpy-stl-2.2.3.tar.gz
/numpy-stl-2.3.2.tar.gz
+/numpy-stl-2.4.1.tar.gz
diff --git a/python-numpy-stl.spec b/python-numpy-stl.spec
index 98f2dce..69b8aec 100644
--- a/python-numpy-stl.spec
+++ b/python-numpy-stl.spec
@@ -1,7 +1,7 @@
%global pypi_name numpy-stl
Name: python-%{pypi_name}
-Version: 2.3.2
+Version: 2.4.1
Release: 1%{?dist}
Summary: Library for reading, writing and modifying STL files
@@ -80,6 +80,9 @@ rm -rf html/.{doctrees,buildinfo}
%doc html
%changelog
+* Fri May 11 2018 Miro Hronok <mhroncok(a)redhat.com> - 2.4.1-1
+- Updated to 2.4.1 (#1475307)
+
* Wed Feb 14 2018 Miro Hronok <mhroncok(a)redhat.com> - 2.3.2-1
- Updated to 2.3.2 to fix FTBFS
diff --git a/sources b/sources
index 81c6aa6..4cc1697 100644
--- a/sources
+++ b/sources
@@ -1 +1 @@
-SHA512 (numpy-stl-2.3.2.tar.gz) =
7ff0429947b75f4933d27bbfdc22db0cec681472a9eeaff078b91711b6896770e293572a957c98e5080c7423c8f1bd7c582120579fc1a6d7f7ef155bc5b3c0cc
+SHA512 (numpy-stl-2.4.1.tar.gz) =
d45d4606f6f622b7514faa30457b46e1e0ddf258c20953a74de9b37e9f4d8830f441bc8ad031a0a263d029e4da870f5c78e568d25a1d53ade526e4f85f8bfa7f