Compare commits

..

7 commits

Author SHA1 Message Date
Fedora Release Engineering
0cfa05858b Rebuilt for https://fedoraproject.org/wiki/Fedora_43_Mass_Rebuild 2025-07-25 06:33:06 +00:00
Python Maint
0e5da8e293 Rebuilt for Python 3.14 2025-06-02 22:44:09 +02:00
Benjamin A. Beasley
9f0a77cc6b Remove dependency on deprecated python-pytest-runner 2025-05-27 08:37:50 -04:00
Miro Hrončok
30d68123bc Remove no-longer-needed Obsoletes 2025-05-18 22:01:19 +02:00
Miro Hrončok
6526d2573c Review the SPDX license
[skip changelog]
2025-05-18 22:00:53 +02:00
Miro Hrončok
e682be4cf8 Expand %{pypi_name}
[skip changelog]
2025-05-18 22:00:16 +02:00
Miro Hrončok
76bad0c2c8 Convert to %pyproject macros
[skip changelog]
2025-05-18 21:59:13 +02:00
2 changed files with 58 additions and 26 deletions

39
17.patch Normal file
View file

@ -0,0 +1,39 @@
From 52a68f3d1dd3568dd399ec10b1e5029d0889397d Mon Sep 17 00:00:00 2001
From: "Benjamin A. Beasley" <code@musicinmybrain.net>
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

View file

@ -1,18 +1,20 @@
%global pypi_name admesh Name: python-admesh
Name: python-%{pypi_name}
Version: 0.98.9 Version: 0.98.9
Release: %autorelease Release: %autorelease
Summary: Python bindings for ADMesh, STL manipulation library Summary: Python bindings for ADMesh, STL manipulation library
# Automatically converted from old format: GPLv2+ - review is highly recommended.
License: GPL-2.0-or-later License: GPL-2.0-or-later
URL: https://github.com/admesh/python-admesh 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 # https://github.com/admesh/python-admesh/issues/15
Source1: %{url}/raw/v%{version}/test/utils.py 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 # https://fedoraproject.org/wiki/Changes/EncourageI686LeafRemoval
%if 0%{?fedora} >= 42 || 0%{?rhel} >= 11 %if 0%{?fedora} >= 42 || 0%{?rhel} >= 11
ExcludeArch: %{ix86} ExcludeArch: %{ix86}
@ -23,51 +25,42 @@ BuildRequires: gcc
BuildRequires: admesh-devel >= 0.98 BuildRequires: admesh-devel >= 0.98
BuildRequires: python3-devel BuildRequires: python3-devel
BuildRequires: python3-pytest
BuildRequires: python3-setuptools
BuildRequires: python3-Cython
BuildRequires: python3-pytest-runner
%description %description
This module provides bindings for the ADMesh library. This module provides bindings for the ADMesh library.
It lets you manipulate 3D models in binary or ASCII STL It lets you manipulate 3D models in binary or ASCII STL
format and partially repair them if necessary. 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 Summary: Python 3 bindings for ADMesh, STL manipulation library
%{?python_provide:%python_provide python3-%{pypi_name}}
Obsoletes: python2-%{pypi_name} < 0.98.8-2 %description -n python3-admesh
Obsoletes: python-%{pypi_name} < 0.98.8-2
%description -n python3-%{pypi_name}
This module provides bindings for the ADMesh library. This module provides bindings for the ADMesh library.
It lets you manipulate 3D models in binary or ASCII STL It lets you manipulate 3D models in binary or ASCII STL
format and partially repair them if necessary. format and partially repair them if necessary.
%prep %prep
%setup -q -n %{pypi_name}-%{version} %autosetup -n admesh-%{version} -p1
cp %{SOURCE1} test/ cp %{SOURCE1} test/
%generate_buildrequires
%pyproject_buildrequires -x test
%build %build
%py3_build %pyproject_wheel
%install %install
%py3_install %pyproject_install
%pyproject_save_files -l admesh
%check %check
PYTHONPATH=%{buildroot}%{python3_sitearch} py.test-3 -v \ %pyproject_check_import
%ifarch ppc64 %pytest -v
-k "not test_saved_equals_original_binary" # likely a bug in admesh itself
%endif
%files -n python3-%{pypi_name} %files -n python3-admesh -f %{pyproject_files}
%doc README.rst %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 %changelog