Convert to pyproject-rpm-macros
This commit is contained in:
parent
526d5f95b9
commit
ead4789c87
@ -10,8 +10,8 @@ Source0: https://sourceforge.net/projects/docutils/files/docutils/%{versi
|
||||
|
||||
BuildArch: noarch
|
||||
|
||||
BuildRequires: pyproject-rpm-macros
|
||||
BuildRequires: python%{python3_pkgversion}-devel
|
||||
BuildRequires: python%{python3_pkgversion}-setuptools
|
||||
|
||||
%global _description %{expand:
|
||||
The Docutils project specifies a plaintext markup language, reStructuredText,
|
||||
@ -43,12 +43,17 @@ sed -i -e '/#! *\/usr\/bin\/.*/{1D}' $(grep -Erl '^#!.+python' docutils)
|
||||
rm -f licenses/docutils.conf
|
||||
|
||||
|
||||
%generate_buildrequires
|
||||
%pyproject_buildrequires -r
|
||||
|
||||
|
||||
%build
|
||||
%py3_build
|
||||
%pyproject_wheel
|
||||
|
||||
|
||||
%install
|
||||
%py3_install
|
||||
%pyproject_install
|
||||
%pyproject_save_files docutils
|
||||
|
||||
for file in %{buildroot}/%{_bindir}/*.py; do
|
||||
mv $file `dirname $file`/`basename $file .py`
|
||||
@ -56,14 +61,13 @@ done
|
||||
|
||||
|
||||
%check
|
||||
export PYTHONPATH=%{buildroot}%{python3_sitelib}
|
||||
%{python3} test/alltests.py
|
||||
|
||||
|
||||
%files -n python%{python3_pkgversion}-docutils
|
||||
%files -n python%{python3_pkgversion}-docutils -f %{pyproject_files}
|
||||
%license COPYING.txt licenses/*
|
||||
%doc BUGS.txt FAQ.txt HISTORY.txt README.txt RELEASE-NOTES.txt THANKS.txt
|
||||
%{python3_sitelib}/docutils/
|
||||
%{python3_sitelib}/docutils-%{version}-py%{python3_version}.egg-info/
|
||||
%{_bindir}/rst*
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user