## START: Set by rpmautospec ## (rpmautospec version 0.7.3) ## RPMAUTOSPEC: autorelease, autochangelog %define autorelease(e:s:pb:n) %{?-p:0.}%{lua: release_number = 34; base_release_number = tonumber(rpm.expand("%{?-b*}%{!?-b:1}")); print(release_number + base_release_number - 1); }%{?-e:.%{-e*}}%{?-s:.%{-s*}}%{!?-n:%{?dist}} ## END: Set by rpmautospec # Add a BuildRequires on vtk merely for smoke-testing imports of VTK # integration modules? This does not enable additional tests. %bcond vtk_dep 0 Name: python-geomdl Version: 5.3.1 Release: %autorelease Summary: Object-oriented pure Python B-Spline and NURBS library # From docs/citing.rst: # * Source code is released under the terms of the MIT License # * Examples are released under the terms of the MIT License # * Documentation is released under the terms of CC BY 4.0 # # The examples are maintained in a separate repository, # https://github.com/orbingol/geomdl-examples, which is not packaged here. # # While we no longer package a full Sphinx-generated manual, we consider the # documentation license to apply to files packaged as %%doc, *.md/*.rst. License: MIT AND CC-BY-4.0 URL: https://onurraufbingol.com/NURBS-Python/ %global forgeurl https://github.com/orbingol/NURBS-Python Source: %{forgeurl}/archive/v%{version}/NURBS-Python-%{version}.tar.gz # Upstream uses something like “setup.py bdist_wheel --use-cython” to turn on # the optional Cython-generated extensions. This doesn’t fit well with the # pyproject-rpm-macros approach (which uses “pip wheel …”), so we just patch # setup.py to unconditionally enable Cython. Patch: geomdl-5.3.1-unconditional-Cython.patch # Stop using deprecated/removed np.float/np.int # https://github.com/orbingol/NURBS-Python/pull/163 Patch: %{forgeurl}/pull/163.patch BuildSystem: pyproject BuildOption(install): -l geomdl BuildOption(generate_buildrequires): requirements.txt %if %{without vtk_dep} # Need python3dist(vtk) for geomdl.visualization.vtk_helpers, but it is not # worth adding the BuildRequires just for an import check. BuildOption(check): %{shrink: -e geomdl.visualization.vtk_helpers -e geomdl.visualization.VisVTK } %endif BuildRequires: gcc # Upstream uses weird tox environments for testing: # https://github.com/orbingol/NURBS-Python/blob/v5.3.1/tox.ini#L5 # The default py3X environment fails with InterpreterNotFound: # https://github.com/orbingol/NURBS-Python/pull/145 # And even when everything works, the tox environment builds the extension again. # It also measures coverage. # Instead, we BuildRequire the only remaining tests dependency manually: BuildRequires: %{py3_dist pytest} %if %{with vtk_dep} # Allow smoke-testing importability of VTK integration modules. BuildRequires: %{py3_dist vtk} %endif %global common_description %{expand: NURBS-Python (geomdl) is a pure Python, self-contained, object-oriented B-Spline and NURBS spline library for Python versions 2.7.x, 3.4.x and later. NURBS-Python (geomdl) provides convenient data structures and highly customizable API for rational and non-rational splines along with the efficient and extensible implementations of the following algorithms: • Spline evaluation • Derivative evaluation • Knot insertion • Knot removal • Knot vector refinement • Degree elevation • Degree reduction • Curve and surface fitting via interpolation and least squares approximation NURBS-Python (geomdl) also provides customizable visualization and animation options via Matplotlib, Plotly and VTK libraries. Please refer to the documentation (http://nurbs-python.readthedocs.io/) for more details.} %description %{common_description} %package -n python3-geomdl Summary: %{summary} # Removed for Fedora 43; we can drop the Obsoletes after Fedora 46 Obsoletes: python-geomdl-doc < 5.3.1-34 %description -n python3-geomdl %{common_description} %prep -a # Allow newer versions in cases where exact versions are pinned. sed -r -i 's/==/>=/' requirements.txt %check -a %pytest ${ignore-} %files -n python3-geomdl -f %{pyproject_files} # The LICENSE file is already handled in .dist-info, but citing.rst contains # important license information, too. %license docs/citing.rst %doc CHANGELOG.md %doc CONTRIBUTORS.rst %doc DESCRIPTION.rst %doc README.rst %changelog ## START: Generated by rpmautospec * Tue Apr 22 2025 Benjamin A. Beasley - 5.3.1-34 - F43+: Stop building a PDF manual; drop and Obsolete the -doc subpackage * Tue Apr 22 2025 Benjamin A. Beasley - 5.3.1-33 - F41+: Use the provisional pyproject declarative buildsystem - Since this is only for F41+, drop EPEL conditionals - Always run an import-only smoke test; add a bcond vtk_dep for optionally including VTK integration modules in this * Sat Jan 18 2025 Fedora Release Engineering - 5.3.1-32 - Rebuilt for https://fedoraproject.org/wiki/Fedora_42_Mass_Rebuild * Thu Dec 19 2024 Benjamin A. Beasley - 5.3.1-31 - De-conditionalize matplotlib; it is now in EPEL10 * Fri Dec 13 2024 Benjamin A. Beasley - 5.3.1-30 - Add a SourceLicense field * Sat Oct 12 2024 Benjamin A. Beasley - 5.3.1-29 - Conditionalize the matplotlib dependency, allowing EPEL backports * Sat Oct 12 2024 Benjamin A. Beasley - 5.3.1-28 - Restore plotly dependency for Python 3.13 (it installs now) * Fri Jul 19 2024 Fedora Release Engineering - 5.3.1-27 - Rebuilt for https://fedoraproject.org/wiki/Fedora_41_Mass_Rebuild * Sat Jun 15 2024 Benjamin A. Beasley - 5.3.1-26 - Temporarily drop plotly dependency for Python 3.13 (close RHBZ#2291716) * Fri Jan 26 2024 Fedora Release Engineering - 5.3.1-24 - Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild * Mon Jan 22 2024 Fedora Release Engineering - 5.3.1-23 - Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild * Mon Dec 18 2023 Benjamin A. Beasley - 5.3.1-22 - Assert that %%pyproject_files contains a license file * Mon Oct 30 2023 Benjamin A. Beasley - 5.3.1-21 - Add a build conditional for plotly * Fri Jul 21 2023 Fedora Release Engineering - 5.3.1-20 - Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild * Tue Jul 11 2023 Benjamin A. Beasley - 5.3.1-19 - When PDF docs are disabled, omit the -doc subpackage - Do not package CONTRIBUTING.md since it is mostly related to interacting with upstream rather than to using the package * Tue Jul 11 2023 Benjamin A. Beasley - 5.3.1-18 - Revert "Drop BR on python3-plotly while it FTI in Rawhide (close RHBZ#2220249)" * Mon Jul 10 2023 Benjamin A. Beasley - 5.3.1-17 - Drop BR on python3-plotly while it FTI in Rawhide (close RHBZ#2220249) * Tue Jun 20 2023 Benjamin A. Beasley - 5.3.1-16 - Use new (rpm 4.17.1+) bcond style * Fri Mar 17 2023 Benjamin A. Beasley - 5.3.1-14 - Don’t assume %%_smp_mflags is -j%%_smp_build_ncpus * Sat Mar 04 2023 Benjamin A. Beasley - 5.3.1-13 - Fix recent numpy compat. * Fri Jan 20 2023 Fedora Release Engineering - 5.3.1-12 - Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild * Fri Dec 09 2022 Miro Hrončok - 5.3.1-11 - Drop the remaining usage of tox for generating BuildRequires * Fri Dec 09 2022 Benjamin A. Beasley - 5.3.1-10 - Trivial spec file typo fix * Fri Dec 09 2022 Miro Hrončok - 5.3.1-9 - Fix running tests in %%check * Sat Oct 22 2022 Benjamin A. Beasley - 5.3.1-8 - Update License to SPDX * Fri Jul 22 2022 Fedora Release Engineering - 5.3.1-7 - Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild * Wed Jun 15 2022 Python Maint - 5.3.1-6 - Rebuilt for Python 3.11 * Wed Apr 20 2022 Benjamin A. Beasley - 5.3.1-5 - Build LaTeX more quietly * Wed Apr 20 2022 Benjamin A. Beasley - 5.3.1-4 - Drop “forge” macros, which aren’t doing much for us * Wed Apr 20 2022 Benjamin A. Beasley - 5.3.1-3 - Stop numbering patches * Fri Jan 21 2022 Fedora Release Engineering - 5.3.1-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild * Thu Jan 06 2022 Benjamin A. Beasley - 5.3.1-1 - Initial package (close RHBZ#2016661) ## END: Generated by rpmautospec