| |
@@ -4,18 +4,42 @@
|
| |
# 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/JavaScript/src/ss_tree
|
| |
+ # (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%{version}/ezdxf-%{version}.tar.gz
|
| |
+ %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.
|
| |
@@ -29,6 +53,16 @@
|
| |
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/b00d2533f97e1e7425ad4b3e4bde02668988a1db
|
| |
+ Patch: %{forgeurl}/commit/b00d2533f97e1e7425ad4b3e4bde02668988a1db.patch
|
| |
+ # disable test "issue142" because of issue #713
|
| |
+ # https://github.com/mozman/ezdxf/commit/f51566328e5c8a87a1188cd4dff1e4852b3f8533
|
| |
+ Patch: %{forgeurl}/commit/f51566328e5c8a87a1188cd4dff1e4852b3f8533.patch
|
| |
+
|
| |
BuildRequires: python3-devel
|
| |
BuildRequires: gcc-c++
|
| |
|
| |
@@ -50,8 +84,6 @@
|
| |
|
| |
%if %{with doc_pdf}
|
| |
BuildRequires: make
|
| |
- BuildRequires: python3dist(sphinx)
|
| |
- BuildRequires: python3dist(sphinx-rtd-theme)
|
| |
BuildRequires: python3-sphinx-latex
|
| |
BuildRequires: latexmk
|
| |
BuildRequires: /usr/bin/xindy
|
| |
@@ -81,10 +113,23 @@
|
| |
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
|
| |
+
|
| |
+ # 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}
|
| |
|
| |
|
| |
- %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
|
| |
@@ -96,7 +141,7 @@
|
| |
|
| |
|
| |
%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.
|
| |
|
| |
@@ -113,7 +158,7 @@
|
| |
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
|
| |
|
| |
@@ -121,10 +166,17 @@
|
| |
# 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
|
| |
@@ -141,8 +193,8 @@
|
| |
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
|
| |
|
| |
@@ -162,6 +214,7 @@
|
| |
# just means a few tests are automatically skipped.
|
| |
|
| |
# 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
|
| |
Upstream changelog: https://github.com/mozman/ezdxf/blob/v0.18/NEWS.md#version-018---2022-07-29
Upstream source diff (huge): https://github.com/mozman/ezdxf/compare/v0.17.2...v0.18
Announced 2022-07-30; merge and build NET 2022-08-06.