From e595f10324cb52f12a85e2a0b54ed8ff0c3103d9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miro=20Hron=C4=8Dok?= Date: Tue, 21 Nov 2023 11:58:23 +0100 Subject: [PATCH] Convert to pyproject-rpm-macros --- python-psutil.spec | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) diff --git a/python-psutil.spec b/python-psutil.spec index 3cd9f21..e4f0fcb 100644 --- a/python-psutil.spec +++ b/python-psutil.spec @@ -26,7 +26,6 @@ BuildRequires: gcc BuildRequires: sed BuildRequires: make BuildRequires: python%{python3_pkgversion}-devel -BuildRequires: python%{python3_pkgversion}-setuptools # Test dependencies BuildRequires: procps-ng @@ -67,12 +66,18 @@ find psutil -name \*.py | while read file; do done +%generate_buildrequires +%pyproject_buildrequires + + %build -%py3_build +%pyproject_wheel %install -%py3_install +%pyproject_install +%pyproject_save_files psutil + # Ignore tests when building with flatpak-module-tools to avoid build failures # when building inside VMs or containers. Flatpaks would usually build this package @@ -87,11 +92,9 @@ done make test APPVEYOR=1 PYTHON=%{__python3} PYTHONPATH=%{buildroot}/%{python3_sitearch} %endif -%files -n python%{python3_pkgversion}-psutil -%license LICENSE + +%files -n python%{python3_pkgversion}-psutil -f %{pyproject_files} %doc CREDITS HISTORY.rst README.rst -%{python3_sitearch}/psutil/ -%{python3_sitearch}/psutil-%{version}-py%{python3_version}.egg-info/ %exclude %{python3_sitearch}/psutil/tests %files -n python%{python3_pkgversion}-psutil-tests