diff --git a/python-cheetah.spec b/python-cheetah.spec index 52560a2..7018561 100644 --- a/python-cheetah.spec +++ b/python-cheetah.spec @@ -11,6 +11,7 @@ Source: https://github.com/CheetahTemplate3/cheetah3/archive/%{version}/ Patch: 0001-Tests-tox-Add-Python-3.10-to-tox.ini.patch BuildRequires: gcc +BuildRequires: python3-devel %global _description %{expand: Cheetah3 is a free and open source template engine and code generation tool. @@ -23,15 +24,10 @@ code.} %package -n python3-cheetah -Summary: %summary -%{?python_provide:%python_provide python3-cheetah} +Summary: %{summary} -BuildRequires: python3-devel -BuildRequires: python3-setuptools -BuildRequires: python3-markdown -BuildRequires: python3-pygments -%description -n python3-cheetah %_description +%description -n python3-cheetah %{_description} %prep @@ -44,31 +40,35 @@ sed -e 's|, < 3.2||' -i tox.ini find Cheetah -type f -name '*.py' -print0 | xargs -0 sed -i -e '1 {/^#!/d}' +%generate_buildrequires +%pyproject_buildrequires -t + + %build -%py3_build +%pyproject_wheel + %install -%py3_install +%pyproject_install +%pyproject_save_files Cheetah %check -export PATH="%{buildroot}/%{_bindir}:$PATH" -export PYTHONPATH="%{buildroot}/%{python3_sitearch}" -%{buildroot}/%{_bindir}/cheetah test +# changing this in %%prep would cause an rpmlint error (rpm-buildroot-usage), +# so do it here instead +sed -e 's|{envsitepackagesdir}|%{buildroot}%{python3_sitearch}|' -i tox.ini +%tox -%files -n python3-cheetah -%license LICENSE +%files -n python3-cheetah -f %{pyproject_files} %doc ANNOUNCE.rst README.rst TODO BUGS - %{_bindir}/cheetah* -%{python3_sitearch}/Cheetah -%{python3_sitearch}/Cheetah*.egg-info %changelog * Thu Apr 07 2022 Carl George - 3.2.6.post1-1 - Update to 3.2.6.post1 +- Convert to pyproject macros * Fri Jan 21 2022 Fedora Release Engineering - 3.2.4-9 - Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild