python-admesh/python-admesh.spec
Miro Hrončok 76bad0c2c8 Convert to %pyproject macros
[skip changelog]
2025-05-18 21:59:13 +02:00

69 lines
1.7 KiB
RPMSpec

%global pypi_name admesh
Name: python-%{pypi_name}
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/%{pypi_name}/%{pypi_name}-%{version}.tar.gz
# https://github.com/admesh/python-admesh/issues/15
Source1: %{url}/raw/v%{version}/test/utils.py
# https://fedoraproject.org/wiki/Changes/EncourageI686LeafRemoval
%if 0%{?fedora} >= 42 || 0%{?rhel} >= 11
ExcludeArch: %{ix86}
%endif
BuildRequires: gcc
BuildRequires: admesh-devel >= 0.98
BuildRequires: python3-devel
BuildRequires: python3-pytest
%description
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}
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
%description -n python3-%{pypi_name}
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}
cp %{SOURCE1} test/
%generate_buildrequires
%pyproject_buildrequires
%build
%pyproject_wheel
%install
%pyproject_install
%pyproject_save_files -l %{pypi_name}
%check
%pyproject_check_import
%pytest -v
%files -n python3-%{pypi_name} -f %{pyproject_files}
%doc README.rst
%changelog
%autochangelog