From 76bad0c2c822c98e2854ea2453e50ef7ea6ea818 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miro=20Hron=C4=8Dok?= Date: Sun, 18 May 2025 21:59:13 +0200 Subject: [PATCH 1/7] Convert to %pyproject macros [skip changelog] --- python-admesh.spec | 23 +++++++++-------------- 1 file changed, 9 insertions(+), 14 deletions(-) diff --git a/python-admesh.spec b/python-admesh.spec index 6c2d557..c808633 100644 --- a/python-admesh.spec +++ b/python-admesh.spec @@ -24,9 +24,6 @@ BuildRequires: admesh-devel >= 0.98 BuildRequires: python3-devel BuildRequires: python3-pytest -BuildRequires: python3-setuptools -BuildRequires: python3-Cython -BuildRequires: python3-pytest-runner %description This module provides bindings for the ADMesh library. @@ -35,7 +32,6 @@ format and partially repair them if necessary. %package -n python3-%{pypi_name} Summary: Python 3 bindings for ADMesh, STL manipulation library -%{?python_provide:%python_provide python3-%{pypi_name}} Obsoletes: python2-%{pypi_name} < 0.98.8-2 Obsoletes: python-%{pypi_name} < 0.98.8-2 @@ -50,24 +46,23 @@ format and partially repair them if necessary. %setup -q -n %{pypi_name}-%{version} cp %{SOURCE1} test/ +%generate_buildrequires +%pyproject_buildrequires + %build -%py3_build +%pyproject_wheel %install -%py3_install +%pyproject_install +%pyproject_save_files -l %{pypi_name} %check -PYTHONPATH=%{buildroot}%{python3_sitearch} py.test-3 -v \ -%ifarch ppc64 - -k "not test_saved_equals_original_binary" # likely a bug in admesh itself -%endif +%pyproject_check_import +%pytest -v -%files -n python3-%{pypi_name} +%files -n python3-%{pypi_name} -f %{pyproject_files} %doc README.rst -%license COPYING -%attr(0755,root,root) %{python3_sitearch}/%{pypi_name}.*.so -%{python3_sitearch}/%{pypi_name}-%{version}-py%{python3_version}.egg-info %changelog From e682be4cf82fddd74b7f519ff50d6ebe74550875 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miro=20Hron=C4=8Dok?= Date: Sun, 18 May 2025 22:00:16 +0200 Subject: [PATCH 2/7] Expand %{pypi_name} [skip changelog] --- python-admesh.spec | 20 +++++++++----------- 1 file changed, 9 insertions(+), 11 deletions(-) diff --git a/python-admesh.spec b/python-admesh.spec index c808633..f19b572 100644 --- a/python-admesh.spec +++ b/python-admesh.spec @@ -1,6 +1,4 @@ -%global pypi_name admesh - -Name: python-%{pypi_name} +Name: python-admesh Version: 0.98.9 Release: %autorelease Summary: Python bindings for ADMesh, STL manipulation library @@ -8,7 +6,7 @@ Summary: Python bindings for ADMesh, STL manipulation library # Automatically converted from old format: GPLv2+ - review is highly recommended. License: GPL-2.0-or-later URL: https://github.com/admesh/python-admesh -Source0: https://files.pythonhosted.org/packages/source/a/%{pypi_name}/%{pypi_name}-%{version}.tar.gz +Source0: https://files.pythonhosted.org/packages/source/a/admesh/admesh-%{version}.tar.gz # https://github.com/admesh/python-admesh/issues/15 Source1: %{url}/raw/v%{version}/test/utils.py @@ -30,20 +28,20 @@ This module provides bindings for the ADMesh library. It lets you manipulate 3D models in binary or ASCII STL format and partially repair them if necessary. -%package -n python3-%{pypi_name} +%package -n python3-admesh Summary: Python 3 bindings for ADMesh, STL manipulation library -Obsoletes: python2-%{pypi_name} < 0.98.8-2 -Obsoletes: python-%{pypi_name} < 0.98.8-2 +Obsoletes: python2-admesh < 0.98.8-2 +Obsoletes: python-admesh < 0.98.8-2 -%description -n python3-%{pypi_name} +%description -n python3-admesh This module provides bindings for the ADMesh library. It lets you manipulate 3D models in binary or ASCII STL format and partially repair them if necessary. %prep -%setup -q -n %{pypi_name}-%{version} +%setup -q -n admesh-%{version} cp %{SOURCE1} test/ %generate_buildrequires @@ -55,13 +53,13 @@ cp %{SOURCE1} test/ %install %pyproject_install -%pyproject_save_files -l %{pypi_name} +%pyproject_save_files -l admesh %check %pyproject_check_import %pytest -v -%files -n python3-%{pypi_name} -f %{pyproject_files} +%files -n python3-admesh -f %{pyproject_files} %doc README.rst From 6526d2573cf83b00c1c30f031767f4decb1f3943 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miro=20Hron=C4=8Dok?= Date: Sun, 18 May 2025 22:00:53 +0200 Subject: [PATCH 3/7] Review the SPDX license [skip changelog] --- python-admesh.spec | 1 - 1 file changed, 1 deletion(-) diff --git a/python-admesh.spec b/python-admesh.spec index f19b572..a248a97 100644 --- a/python-admesh.spec +++ b/python-admesh.spec @@ -3,7 +3,6 @@ Version: 0.98.9 Release: %autorelease Summary: Python bindings for ADMesh, STL manipulation library -# Automatically converted from old format: GPLv2+ - review is highly recommended. License: GPL-2.0-or-later URL: https://github.com/admesh/python-admesh Source0: https://files.pythonhosted.org/packages/source/a/admesh/admesh-%{version}.tar.gz From 30d68123bcce8dfc97fe11f055ac2684600d179e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miro=20Hron=C4=8Dok?= Date: Sun, 18 May 2025 22:01:19 +0200 Subject: [PATCH 4/7] Remove no-longer-needed Obsoletes --- python-admesh.spec | 3 --- 1 file changed, 3 deletions(-) diff --git a/python-admesh.spec b/python-admesh.spec index a248a97..5bbf161 100644 --- a/python-admesh.spec +++ b/python-admesh.spec @@ -30,9 +30,6 @@ format and partially repair them if necessary. %package -n python3-admesh Summary: Python 3 bindings for ADMesh, STL manipulation library -Obsoletes: python2-admesh < 0.98.8-2 -Obsoletes: python-admesh < 0.98.8-2 - %description -n python3-admesh This module provides bindings for the ADMesh library. It lets you manipulate 3D models in binary or ASCII STL From 9f0a77cc6b95b3f90902cfa59eb2949549652d17 Mon Sep 17 00:00:00 2001 From: "Benjamin A. Beasley" Date: Tue, 27 May 2025 08:37:50 -0400 Subject: [PATCH 5/7] Remove dependency on deprecated python-pytest-runner --- 17.patch | 39 +++++++++++++++++++++++++++++++++++++++ python-admesh.spec | 10 +++++++--- 2 files changed, 46 insertions(+), 3 deletions(-) create mode 100644 17.patch diff --git a/17.patch b/17.patch new file mode 100644 index 0000000..3d82d9d --- /dev/null +++ b/17.patch @@ -0,0 +1,39 @@ +From 52a68f3d1dd3568dd399ec10b1e5029d0889397d Mon Sep 17 00:00:00 2001 +From: "Benjamin A. Beasley" +Date: Tue, 27 May 2025 08:33:05 -0400 +Subject: [PATCH] Drop pytest-runner and "setup.py test" support + +--- + setup.py | 4 ++-- + tox.ini | 3 ++- + 2 files changed, 4 insertions(+), 3 deletions(-) + +diff --git a/setup.py b/setup.py +index 0f003dd..9476806 100755 +--- a/setup.py ++++ b/setup.py +@@ -19,8 +19,8 @@ def _autogen(*args, **kwargs): + author_email='miro@hroncok.cz', + url='https://github.com/admesh/python-admesh', + license='GPLv2+', +- setup_requires=['Cython>=0.22', 'pytest-runner'], +- tests_require=['pytest'], ++ setup_requires=['Cython>=0.22'], ++ extras_require={'test': ['pytest']}, + packages=find_packages(), + cmdclass={'build_ext': _autogen}, + ext_modules=[Extension("admesh", ["admesh.pyx"], libraries=["admesh"])], +diff --git a/tox.ini b/tox.ini +index b41f291..3e0e723 100644 +--- a/tox.ini ++++ b/tox.ini +@@ -2,7 +2,8 @@ + envlist = py37,py36,py35,py34,py27,pypy3,pypy + [testenv] + deps=Cython +-commands=python setup.py test ++extras=test ++commands=pytest + passenv = + CFLAGS + LDFLAGS diff --git a/python-admesh.spec b/python-admesh.spec index 5bbf161..9c36a0d 100644 --- a/python-admesh.spec +++ b/python-admesh.spec @@ -10,6 +10,11 @@ Source0: https://files.pythonhosted.org/packages/source/a/admesh/admesh-% # https://github.com/admesh/python-admesh/issues/15 Source1: %{url}/raw/v%{version}/test/utils.py +# Drop pytest-runner and "setup.py test" support +# https://github.com/admesh/python-admesh/pull/17 +# https://fedoraproject.org/wiki/Changes/DeprecatePythonPytestRunner +Patch: %{url}/pull/17.patch + # https://fedoraproject.org/wiki/Changes/EncourageI686LeafRemoval %if 0%{?fedora} >= 42 || 0%{?rhel} >= 11 ExcludeArch: %{ix86} @@ -20,7 +25,6 @@ BuildRequires: gcc BuildRequires: admesh-devel >= 0.98 BuildRequires: python3-devel -BuildRequires: python3-pytest %description This module provides bindings for the ADMesh library. @@ -37,11 +41,11 @@ format and partially repair them if necessary. %prep -%setup -q -n admesh-%{version} +%autosetup -n admesh-%{version} -p1 cp %{SOURCE1} test/ %generate_buildrequires -%pyproject_buildrequires +%pyproject_buildrequires -x test %build %pyproject_wheel From 0e5da8e29375b30b29152161f69a67a06585dc34 Mon Sep 17 00:00:00 2001 From: Python Maint Date: Mon, 2 Jun 2025 22:44:09 +0200 Subject: [PATCH 6/7] Rebuilt for Python 3.14 From 0cfa05858be80b9833b48ea05a29b8e718a332d7 Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Fri, 25 Jul 2025 06:33:06 +0000 Subject: [PATCH 7/7] Rebuilt for https://fedoraproject.org/wiki/Fedora_43_Mass_Rebuild