From ff18e845dab096279c88f0a41f63489dc8214ff6 Mon Sep 17 00:00:00 2001 From: Petr Lautrbach Date: Fri, 11 Oct 2024 09:05:31 +0200 Subject: [PATCH] pyprojectize spec file The old %py3_build and %py3_install macros (201x-era) as documented in [1] use a deprecated feature of setuptools. It is highly recommended to use the current %pyproject macros instead as documented in [2] and [3] sooner than it becomes necessary. [1]: https://docs.fedoraproject.org/en-US/packaging-guidelines/Python_201x/ [2]: https://docs.fedoraproject.org/en-US/packaging-guidelines/Python/ [3]: https://src.fedoraproject.org/rpms/pyproject-rpm-macros/blob/rawhide/f/README.md https://lists.fedoraproject.org/archives/list/devel@lists.fedoraproject.org/message/RFHSXAU2D4PEN2KHZCBUGP6MEGTUOUD2/ Resolves: RHEL-115363 --- setools.spec | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/setools.spec b/setools.spec index 9514214..64c9fc5 100644 --- a/setools.spec +++ b/setools.spec @@ -19,7 +19,6 @@ BuildRequires: libsepol-devel >= %{sepol_ver}, libsepol-static >= %{sepol_ver} BuildRequires: swig BuildRequires: python3-Cython BuildRequires: python3-devel -BuildRequires: python3-setuptools BuildRequires: libselinux-devel Requires: %{name}-console = %{version}-%{release} @@ -68,7 +67,6 @@ This package includes the following console tools: Summary: Policy analysis tools for SELinux License: LGPL-2.1-only Obsoletes: setools-libs < 4.0.0 -%{?python_provide:%python_provide python3-setools} Requires: python3-setuptools %description -n python3-setools @@ -92,12 +90,16 @@ Python modules designed to facilitate SELinux policy analysis. %autosetup -p 1 -S git -n setools-%{version} +%generate_buildrequires +%pyproject_buildrequires + + %build -%py3_build +%pyproject_wheel %install -%py3_install +%pyproject_install %check %if %{?_with_check:1}%{!?_with_check:0}