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
|
BuildArch: noarch
|
||||||
|
|
||||||
|
BuildRequires: pyproject-rpm-macros
|
||||||
BuildRequires: python%{python3_pkgversion}-devel
|
BuildRequires: python%{python3_pkgversion}-devel
|
||||||
BuildRequires: python%{python3_pkgversion}-setuptools
|
|
||||||
|
|
||||||
%global _description %{expand:
|
%global _description %{expand:
|
||||||
The Docutils project specifies a plaintext markup language, reStructuredText,
|
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
|
rm -f licenses/docutils.conf
|
||||||
|
|
||||||
|
|
||||||
|
%generate_buildrequires
|
||||||
|
%pyproject_buildrequires -r
|
||||||
|
|
||||||
|
|
||||||
%build
|
%build
|
||||||
%py3_build
|
%pyproject_wheel
|
||||||
|
|
||||||
|
|
||||||
%install
|
%install
|
||||||
%py3_install
|
%pyproject_install
|
||||||
|
%pyproject_save_files docutils
|
||||||
|
|
||||||
for file in %{buildroot}/%{_bindir}/*.py; do
|
for file in %{buildroot}/%{_bindir}/*.py; do
|
||||||
mv $file `dirname $file`/`basename $file .py`
|
mv $file `dirname $file`/`basename $file .py`
|
||||||
@ -56,14 +61,13 @@ done
|
|||||||
|
|
||||||
|
|
||||||
%check
|
%check
|
||||||
|
export PYTHONPATH=%{buildroot}%{python3_sitelib}
|
||||||
%{python3} test/alltests.py
|
%{python3} test/alltests.py
|
||||||
|
|
||||||
|
|
||||||
%files -n python%{python3_pkgversion}-docutils
|
%files -n python%{python3_pkgversion}-docutils -f %{pyproject_files}
|
||||||
%license COPYING.txt licenses/*
|
%license COPYING.txt licenses/*
|
||||||
%doc BUGS.txt FAQ.txt HISTORY.txt README.txt RELEASE-NOTES.txt THANKS.txt
|
%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*
|
%{_bindir}/rst*
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user