From 9233071456c12eb7ee7b6c5b74ccf88a7fc72b88 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miro=20Hron=C4=8Dok?= Date: Tue, 28 Feb 2023 16:40:24 +0100 Subject: [PATCH] Use %pyproject RPM macros --- babel.spec | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/babel.spec b/babel.spec index 40b4f2a..c8206c0 100644 --- a/babel.spec +++ b/babel.spec @@ -25,7 +25,6 @@ Source0: %{pypi_source Babel} BuildArch: noarch BuildRequires: python3-devel -BuildRequires: python3-setuptools %if %{without bootstrap} BuildRequires: coreutils @@ -76,8 +75,11 @@ Documentation for Babel %prep %autosetup -p1 -n Babel-%{version} +%generate_buildrequires +%pyproject_buildrequires + %build -%py3_build +%pyproject_wheel BUILDDIR="$PWD/built-docs" rm -rf "$BUILDDIR" @@ -93,7 +95,8 @@ rm -f "$BUILDDIR/html/.buildinfo" %endif %install -%py3_install +%pyproject_install +%pyproject_save_files babel %if %{without bootstrap} install -D -m 0644 built-docs/man/babel.1 %{buildroot}%{_mandir}/man1/pybabel.1 @@ -101,6 +104,7 @@ install -D -m 0644 built-docs/man/babel.1 %{buildroot}%{_mandir}/man1/pybabel.1 %check export TZ=UTC +%pyproject_check_import %if %{without bootstrap} %pytest %endif @@ -114,9 +118,7 @@ export TZ=UTC %{_mandir}/man1/pybabel.1* %endif -%files -n python3-babel -%{python3_sitelib}/Babel-%{version}-py*.egg-info/ -%{python3_sitelib}/babel/ +%files -n python3-babel -f %{pyproject_files} %if %{without bootstrap} %files doc