Use %pyproject RPM macros

This commit is contained in:
Miro Hrončok 2023-02-28 16:40:24 +01:00
parent a527705548
commit 9233071456

View File

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