From 5f0ce633e86437dc19b6a5c44edd9bab1c804eed Mon Sep 17 00:00:00 2001 From: Karolina Surma Date: Oct 20 2022 14:24:20 +0000 Subject: Build package using pyproject-rpm-macros --- diff --git a/python-numpy-stl.spec b/python-numpy-stl.spec index 7654bea..8caecff 100644 --- a/python-numpy-stl.spec +++ b/python-numpy-stl.spec @@ -13,12 +13,8 @@ BuildRequires: gcc BuildRequires: python3-devel BuildRequires: python3-Cython -BuildRequires: python3-numpy BuildRequires: python3-pytest -BuildRequires: python3-pytest-runner -BuildRequires: python3-setuptools BuildRequires: python3-sphinx -BuildRequires: python3-utils >= 1.6.2 %ifnarch armv7hl # the test is optional based on the presence of PyQt5 @@ -27,8 +23,6 @@ BuildRequires: python3-PyQt5 BuildRequires: /usr/bin/xvfb-run %endif -%?python_enable_dependency_generator - %description Simple library to make working with STL files (and 3D objects in general) fast and easy. Due to all operations heavily relying on numpy this is one of the @@ -36,10 +30,6 @@ fastest STL editing libraries for Python available. %package -n python3-%{pypi_name} Summary: %{summary} -%{?python_provide:%python_provide python3-%{pypi_name}} - -# for entrypoints -Requires: %{py3_dist setuptools} %description -n python3-%{pypi_name} Simple library to make working with STL files (and 3D objects in general) fast @@ -55,32 +45,30 @@ Documentation for %{name}. %prep %autosetup -n %{pypi_name}-%{version} -p1 -# Remove bundled egg-info -rm -rf %{pypi_name}.egg-info + +%generate_buildrequires +%pyproject_buildrequires %build -%py3_build +%pyproject_wheel # generate html docs sphinx-build-3 docs html # remove the sphinx-build leftovers rm -rf html/.{doctrees,buildinfo} %install -%py3_install - +%pyproject_install +%pyproject_save_files stl %check -%{__python3} setup.py pytest --addopts -v +%pytest -v -%files -n python3-%{pypi_name} -%license LICENSE +%files -n python3-%{pypi_name} -f %{pyproject_files} %doc README.rst %{_bindir}/stl %{_bindir}/stl2bin %{_bindir}/stl2ascii -%{python3_sitearch}/stl -%{python3_sitearch}/numpy_stl-%{version}-py%{python3_version}.egg-info %files doc %doc html