Expand %{pypi_name}

[skip changelog]
This commit is contained in:
Miro Hrončok 2025-05-18 22:00:16 +02:00
commit e682be4cf8

View file

@ -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