The package rpms/python-ezdxf.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-ezdxf.git/commit/?id=77f84b6c... https://src.fedoraproject.org/cgit/rpms/python-ezdxf.git/commit/?id=8f644fe6....
Change: -%ifnarch %{x86} x86_64 +%ifnarch %{x86} x86_64
Thanks.
Full change: ============
commit 77f84b6c5fc0088b53ec8d2d73aea9a470cce8b6 Author: Benjamin A. Beasley code@musicinmybrain.net Date: Tue Aug 2 08:41:36 2022 -0400
Backport upstream fixes/workarounds for non-x86 failures
diff --git a/b00d2533f97e1e7425ad4b3e4bde02668988a1db.patch b/b00d2533f97e1e7425ad4b3e4bde02668988a1db.patch new file mode 100644 index 0000000..f817e75 --- /dev/null +++ b/b00d2533f97e1e7425ad4b3e4bde02668988a1db.patch @@ -0,0 +1,67 @@ +From b00d2533f97e1e7425ad4b3e4bde02668988a1db Mon Sep 17 00:00:00 2001 +From: mozman me@mozman.at +Date: Sat, 30 Jul 2022 18:15:33 +0200 +Subject: [PATCH] use Vec2.isclose() for test result check #713 + +--- + tests/test_06_math/test_618_clipping.py | 12 ++++++------ + 1 file changed, 6 insertions(+), 6 deletions(-) + +diff --git a/tests/test_06_math/test_618_clipping.py b/tests/test_06_math/test_618_clipping.py +index 161d392aa..b26da504c 100644 +--- a/tests/test_06_math/test_618_clipping.py ++++ b/tests/test_06_math/test_618_clipping.py +@@ -40,7 +40,7 @@ def test_subject_is_inside_rect(rect, inside): + result = clip_polygon_2d(rect, inside) + assert len(result) == 4 + for v in inside: +- assert v in result ++ assert any(r.isclose(v) for r in result) is True + + + def test_clockwise_oriented_clipping_rect(rect, inside): +@@ -48,7 +48,7 @@ def test_clockwise_oriented_clipping_rect(rect, inside): + result = clip_polygon_2d(rect, inside) + assert len(result) == 4 + for v in inside: +- assert v in result ++ assert any(r.isclose(v) for r in result) is True + + + def test_subject_is_outside_rect(rect, outside): +@@ -61,7 +61,7 @@ def test_circle_outside_rect(rect): + result = clip_polygon_2d(rect, c, ccw_check=False) + assert len(result) == 4 + for v in rect: +- assert v in result ++ assert any(r.isclose(v) for r in result) is True + + + def test_circle_inside_rect(rect): +@@ -69,7 +69,7 @@ def test_circle_inside_rect(rect): + result = clip_polygon_2d(rect, c, ccw_check=False) + assert len(result) == 16 + for v in c: +- assert v in result ++ assert any(r.isclose(v) for r in result) is True + + + def test_rect_outside_circle(rect): +@@ -77,7 +77,7 @@ def test_rect_outside_circle(rect): + result = clip_polygon_2d(c, rect, ccw_check=False) + assert len(result) == 16 + for v in c: +- assert v in result ++ assert any(r.isclose(v) for r in result) is True + + + def test_rect_inside_circle(rect): +@@ -85,7 +85,7 @@ def test_rect_inside_circle(rect): + result = clip_polygon_2d(c, rect, ccw_check=False) + assert len(result) == 4 + for v in rect: +- assert v in result ++ assert any(r.isclose(v) for r in result) is True + + + if __name__ == "__main__": diff --git a/f51566328e5c8a87a1188cd4dff1e4852b3f8533.patch b/f51566328e5c8a87a1188cd4dff1e4852b3f8533.patch new file mode 100644 index 0000000..4d59605 --- /dev/null +++ b/f51566328e5c8a87a1188cd4dff1e4852b3f8533.patch @@ -0,0 +1,22 @@ +From f51566328e5c8a87a1188cd4dff1e4852b3f8533 Mon Sep 17 00:00:00 2001 +From: mozman me@mozman.at +Date: Sat, 30 Jul 2022 18:19:10 +0200 +Subject: [PATCH] disable test "issue142" because of issue #713 + +--- + integration_tests/test_mapbox_earcut.py | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/integration_tests/test_mapbox_earcut.py b/integration_tests/test_mapbox_earcut.py +index 3cfe79f7a..ee49a35a3 100644 +--- a/integration_tests/test_mapbox_earcut.py ++++ b/integration_tests/test_mapbox_earcut.py +@@ -58,7 +58,7 @@ def earcut_driver( + # "issue111": 19, # error? - I don't see it! + "issue119": 18, + "issue131": 12, +- "issue142": 4, ++ # "issue142": 4, disabled because of issue #713 on some aarch64 systems + "issue149": 2, + "issue16": 12, + "issue17": 11, diff --git a/python-ezdxf.spec b/python-ezdxf.spec index a565beb..4b1c0d6 100644 --- a/python-ezdxf.spec +++ b/python-ezdxf.spec @@ -38,7 +38,8 @@ Summary: Create/manipulate DXF drawings # * ezdxf/addons/binpacking.py License: MIT AND ISC AND AGPL-3.0-only URL: https://ezdxf.mozman.at/ -Source0: https://github.com/mozman/ezdxf/archive/v%%7Bversion%7D/ezdxf-%%7Bversion%7D... +%global forgeurl https://github.com/mozman/ezdxf +Source0: %{forgeurl}/archive/v%{version}/ezdxf-%{version}.tar.gz
# Man pages written for Fedora in groff_man(7) format based on --help output # and docs/ content. @@ -52,6 +53,16 @@ Source16: ezdxf-pp.1 Source17: ezdxf-strip.1 Source18: ezdxf-view.1
+# Two test failures on non-x86 architectures +# https://github.com/mozman/ezdxf/issues/713 +# +# use Vec2.isclose() for test result check #713 +# https://github.com/mozman/ezdxf/commit/b00d2533f97e1e7425ad4b3e4bde02668988a... +Patch: %{forgeurl}/commit/b00d2533f97e1e7425ad4b3e4bde02668988a1db.patch +# disable test "issue142" because of issue #713 +# https://github.com/mozman/ezdxf/commit/f51566328e5c8a87a1188cd4dff1e4852b3f8... +Patch: %{forgeurl}/commit/f51566328e5c8a87a1188cd4dff1e4852b3f8533.patch + BuildRequires: python3-devel BuildRequires: gcc-c++
@@ -130,7 +141,7 @@ BuildArch: noarch
%prep -%autosetup -n ezdxf-%{version} +%autosetup -n ezdxf-%{version} -p1 # Note that C++ sources in the GitHub tarball are *not* Cython-generated, and # we must not remove them.
@@ -202,47 +213,6 @@ install -t '%{buildroot}%{_mandir}/man1' -D -p -m 0644 \ # available (and are presumably not freely distributable). This is fine; it # just means a few tests are automatically skipped.
-%ifnarch %{x86} x86_64 -# Two test failures on non-x86 architectures -# https://github.com/mozman/ezdxf/issues/713 -# -# =================================== FAILURES =================================== -# ___________________________ test_circle_outside_rect ___________________________ -# rect = [(-1, -1), (1, -1), (1, 1), (-1, 1)] -# def test_circle_outside_rect(rect): -# c = circle(16, 3) -# result = clip_polygon_2d(rect, c, ccw_check=False) -# assert len(result) == 4 -# for v in rect: -# > assert v in result -# E assert (-1, -1) in [Vec2(1.0, -0.9999999999999999), Vec2(1.0, 1.0), Vec2(-1.0, 0.9999999999999999), Vec2(-1.0, -0.9999999999999998)] -# tests/test_06_math/test_618_clipping.py:64: AssertionError -# _____________________ test_mapbox_earcut[issue142-Cython] ______________________ -# filename = PosixPath('/builddir/build/BUILD/ezdxf-0.18/integration_tests/mapbox-test-data/issue142.json') -# earcut = functools.partial(<function earcut_driver at 0xffffa8c0f380>, func=<built-in function earcut>) -# @pytest.mark.parametrize( -# "earcut", [py_earcut, cy_earcut], ids=("CPython", CYTHON) -# ) -# def test_mapbox_earcut(filename: Path, earcut): -# name = filename.stem -# with filename.open("rt") as fp: -# data = json.load(fp) -# shape = data[0] -# holes = data[1:] -# triangles = earcut(shape, holes) -# > assert len(triangles) == EXPECTED[name], f"{name}.json failed" -# E AssertionError: issue142.json failed -# E assert 7 == 4 -# E + where 7 = len([(Vec2(5.62675358811389, 31.94879819160804), Vec2(-16.369709114391867, 28.341954255099814), Vec2(5.62675358811389, 31.... 1.1716264034331543), Vec2(-8.602352370111433, 2.142874784407777), Vec2(-6.833718161055838, -0.6655405509524673)), ...]) -# integration_tests/test_mapbox_earcut.py:110: AssertionError -# =========================== short test summary info ============================ -# FAILED tests/test_06_math/test_618_clipping.py::test_circle_outside_rect - as... -# FAILED integration_tests/test_mapbox_earcut.py::test_mapbox_earcut[issue142-Cython] -# ============ 2 failed, 6823 passed, 31 skipped in 83.09s (0:01:23) ============= -k="${k-}${k+ and }not test_circle_outside_rect" -k="${k-}${k+ and }not test_mapbox_earcut[issue142-Cython]" -%endif - # See tox-extras.ini: # Note: It is NOT safe to parallelize these tests with pytest-xdist! %pytest -k "${k-}" tests integration_tests
commit 8f644fe661c7e4b75d2fa0ec824c68f368a0ae8e Author: Benjamin A. Beasley code@musicinmybrain.net Date: Fri Jul 29 09:10:53 2022 -0400
Update to 0.18 (close RHBZ#2112288)
- Generate documentation dependencies from requirements-dev.txt - Run DXF examples as extra tests - License changes from MIT to (now SPDX): (MIT AND (ISC AND MIT) AND (AGPL-3.0-only AND MIT))
diff --git a/.gitignore b/.gitignore index e9689ac..b043e86 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1,2 @@ /ezdxf-0.17.2.tar.gz +/ezdxf-0.18.tar.gz diff --git a/python-ezdxf.spec b/python-ezdxf.spec index f7dadb8..a565beb 100644 --- a/python-ezdxf.spec +++ b/python-ezdxf.spec @@ -4,16 +4,39 @@ # We can generate PDF documentation as a substitute. %bcond_without doc_pdf
-# As of 2021-10-20, PySide6 (https://pypi.org/project/PySide6/) is not yet +# As of 2022-07-29, PySide6 (https://pypi.org/project/PySide6/) is not yet # packaged in Fedora. When it is, we should use it. +# +# Review Request: python-pyqt6 - PyQt6 is Python bindings for Qt6 +# https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=2074709 %bcond_with qt6
Name: python-ezdxf -Version: 0.17.2 +Version: 0.18 Release: %autorelease Summary: Create/manipulate DXF drawings
-License: MIT +# The entire source is MIT, except: +# +# - The following are derived from https://github.com/mapbox/earcut (but are a +# rewrite from C++ to Python, so are not treated as a bundled dependency) and +# are therefore (ISC AND MIT): +# * src/ezdxf/acc/mapbox_earcut.pyx +# * src/ezdxf/math/_mapbox_earcut.py +# - The following is derived from +# https://github.com/mlarocca/AlgorithmsAndDataStructuresInAction/tree/master/... +# (but is a rewrite from JavaScript to Python, so is not treated as a bundled +# dependency) and is therefore (AGPL-3.0-only AND MIT): +# * src/ezdxf/math/rtree.py +# +# Additionally: +# - The following is derived from https://github.com/enzoruiz/3dbinpacking. +# Since the original source is Python, it is treated as a bundled dependency; +# since the implementation is forked, it cannot be unbundled. The original +# source is also under an (MIT) license, so this does not affect the License +# tag. +# * ezdxf/addons/binpacking.py +License: MIT AND ISC AND AGPL-3.0-only URL: https://ezdxf.mozman.at/ Source0: https://github.com/mozman/ezdxf/archive/v%%7Bversion%7D/ezdxf-%%7Bversion%7D...
@@ -50,8 +73,6 @@ BuildRequires: font(notosanssc)
%if %{with doc_pdf} BuildRequires: make -BuildRequires: python3dist(sphinx) -BuildRequires: python3dist(sphinx-rtd-theme) BuildRequires: python3-sphinx-latex BuildRequires: latexmk BuildRequires: /usr/bin/xindy @@ -85,6 +106,12 @@ Requires: font(liberationserif) Obsoletes: python3-ezdxf+all < 0.17.2-7 Obsoletes: python3-ezdxf+all < 0.17.2-7
+# ezdxf/addons/binpacking.py is derived from an unspecified version of py3dbp +# (https://github.com/enzoruiz/3dbinpacking, https://pypi.org/project/py3dbp/). +# The implementation is significantly forked, so unbundling will not be +# possible. +Provides: bundled(python3dist(py3dbp)) + %description -n python3-ezdxf %{common_description}
@@ -120,7 +147,7 @@ dos2unix docs/notes/dxf-group-code-reference.txt \ examples_dxf/text.dxf \ examples_dxf/text_negative_extrusion.dxf
-# qtviewer.py is not exectuable and is not script-like (no main routine or +# qtviewer.py is not executable and is not script-like (no main routine or # useful side effects), so it does not need a shebang sed -r -i '1{/^#!/d}' src/ezdxf/addons/drawing/qtviewer.py
@@ -128,10 +155,17 @@ sed -r -i '1{/^#!/d}' src/ezdxf/addons/drawing/qtviewer.py # be corrected. %py3_shebang_fix examples
+# We don’t need to run typecheckers, and we must build documentation with +# whichever sphinx-rtd-theme version we have. +sed -r \ + -e 's/^(typing_extensions%{?!with_qt6:|pyside6})\b/# \1/' \ + -e 's/^(sphinx-rtd-theme)<.*$/\1/' \ + requirements-dev.txt | tee requirements-dev-filtered.txt +
%generate_buildrequires # Note extra “all” is “draw”+“dev”+“test”, and “all5” is “draw5”+“dev”+“test”. -%pyproject_buildrequires -x all%{?!with_qt6:5} +%pyproject_buildrequires -x all%{?!with_qt6:5} requirements-dev-filtered.txt
%build @@ -148,8 +182,8 @@ find docs/source -type f -exec \ gawk '/.svg/ { print FILENAME; nextfile }' '{}' '+' | xargs -r -t sed -r -i 's/.svg/.pdf/g'
-PYTHONPATH="%{pyproject_build_lib}" %make_build -C docs latex \ - SPHINXOPTS='%{?_smp_mflags}' SPHINXBUILD='sphinx-build-3' +PYTHONPATH="%{pyproject_build_lib}" \ + %make_build -C docs -f Makefile.linux latex SPHINXOPTS='%{?_smp_mflags}' %make_build -C docs/build/latex LATEXMKOPTS='-quiet' %endif
@@ -168,7 +202,49 @@ install -t '%{buildroot}%{_mandir}/man1' -D -p -m 0644 \ # available (and are presumably not freely distributable). This is fine; it # just means a few tests are automatically skipped.
+%ifnarch %{x86} x86_64 +# Two test failures on non-x86 architectures +# https://github.com/mozman/ezdxf/issues/713 +# +# =================================== FAILURES =================================== +# ___________________________ test_circle_outside_rect ___________________________ +# rect = [(-1, -1), (1, -1), (1, 1), (-1, 1)] +# def test_circle_outside_rect(rect): +# c = circle(16, 3) +# result = clip_polygon_2d(rect, c, ccw_check=False) +# assert len(result) == 4 +# for v in rect: +# > assert v in result +# E assert (-1, -1) in [Vec2(1.0, -0.9999999999999999), Vec2(1.0, 1.0), Vec2(-1.0, 0.9999999999999999), Vec2(-1.0, -0.9999999999999998)] +# tests/test_06_math/test_618_clipping.py:64: AssertionError +# _____________________ test_mapbox_earcut[issue142-Cython] ______________________ +# filename = PosixPath('/builddir/build/BUILD/ezdxf-0.18/integration_tests/mapbox-test-data/issue142.json') +# earcut = functools.partial(<function earcut_driver at 0xffffa8c0f380>, func=<built-in function earcut>) +# @pytest.mark.parametrize( +# "earcut", [py_earcut, cy_earcut], ids=("CPython", CYTHON) +# ) +# def test_mapbox_earcut(filename: Path, earcut): +# name = filename.stem +# with filename.open("rt") as fp: +# data = json.load(fp) +# shape = data[0] +# holes = data[1:] +# triangles = earcut(shape, holes) +# > assert len(triangles) == EXPECTED[name], f"{name}.json failed" +# E AssertionError: issue142.json failed +# E assert 7 == 4 +# E + where 7 = len([(Vec2(5.62675358811389, 31.94879819160804), Vec2(-16.369709114391867, 28.341954255099814), Vec2(5.62675358811389, 31.... 1.1716264034331543), Vec2(-8.602352370111433, 2.142874784407777), Vec2(-6.833718161055838, -0.6655405509524673)), ...]) +# integration_tests/test_mapbox_earcut.py:110: AssertionError +# =========================== short test summary info ============================ +# FAILED tests/test_06_math/test_618_clipping.py::test_circle_outside_rect - as... +# FAILED integration_tests/test_mapbox_earcut.py::test_mapbox_earcut[issue142-Cython] +# ============ 2 failed, 6823 passed, 31 skipped in 83.09s (0:01:23) ============= +k="${k-}${k+ and }not test_circle_outside_rect" +k="${k-}${k+ and }not test_mapbox_earcut[issue142-Cython]" +%endif + # See tox-extras.ini: +# Note: It is NOT safe to parallelize these tests with pytest-xdist! %pytest -k "${k-}" tests integration_tests
# Since the user can disable the C extensions, test the pure-Python diff --git a/sources b/sources index e903ca0..a078a46 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (ezdxf-0.17.2.tar.gz) = 1d7ba62388cfe61cf26deda2d2366151ca407b196259164526c9bfa67d0abaa5c3bd2e9c301a7fb7a383a307d77c84f76482d480368f501ce28fe887a44667f9 +SHA512 (ezdxf-0.18.tar.gz) = 9125685680afa0d68c1270f4dd55b33781219005e1ac6ed24ba1f8b8c1e21bb7c54ef258ec6c0e9d41707e0347767b4ef55d0b81801b1184cdbd6effd926c38d
commit 57e1112f1bd23247f943252d7d65ef9b03c9bd7e Author: Benjamin A. Beasley code@musicinmybrain.net Date: Fri Jul 29 09:17:31 2022 -0400
Drop “all”/“all5” extras metapackages
Note extra “all” is “draw”+“dev”+“test”, and “all5” is “draw5”+“dev”+“test”. Since it does not really make sense to package extras metapackages for dev and test dependencies, we omit these two extras as well.
diff --git a/python-ezdxf.spec b/python-ezdxf.spec index f7df881..f7dadb8 100644 --- a/python-ezdxf.spec +++ b/python-ezdxf.spec @@ -81,10 +81,17 @@ Requires: font(liberationsans) Requires: font(liberationsansnarrow) Requires: font(liberationserif)
+# See the note above the %%pyproject_extras_subpkg invocation. +Obsoletes: python3-ezdxf+all < 0.17.2-7 +Obsoletes: python3-ezdxf+all < 0.17.2-7 + %description -n python3-ezdxf %{common_description}
-%pyproject_extras_subpkg -n python3-ezdxf %{?with_qt6:all,draw},all5,draw5 +# Note extra “all” is “draw”+“dev”+“test”, and “all5” is “draw5”+“dev”+“test”. +# Since it does not really make sense to package extras metapackages for dev +# and test dependencies, we omit these two extras as well. +%pyproject_extras_subpkg -n python3-ezdxf %{?with_qt6:draw},draw5
%package doc
arch-excludes@lists.fedoraproject.org