automatic version update by autodist [release 0.21.2-1mamba;Thu Apr 25 2024]

This commit is contained in:
Automatic Build System 2024-04-25 23:50:27 +02:00
parent a4652c32f9
commit 9a51b07ae8

View File

@ -1,5 +1,6 @@
%define pkgname %(echo %name | cut -d- -f2- | tr - _)
Name: python-docutils
Version: 0.20.1
Version: 0.21.2
Release: 1mamba
Summary: Python Documentation Utilities
Group: System/Libraries/Python
@ -11,7 +12,6 @@ Source: https://pypi.debian.net/docutils/docutils-%{version}.tar.gz
License: Python, BSD, GPL, public domain
## AUTOBUILDREQ-BEGIN
BuildRequires: libpython311-devel
BuildRequires: python3.11dist(setuptools)
## AUTOBUILDREQ-END
BuildRequires: python3-devel >= 3.11.5-3mamba
BuildArch: noarch
@ -33,47 +33,35 @@ Obsoletes: python-docutils < 0.19-2mamba
%setup -q -n docutils-%{version}
%build
CFLAGS="%{optflags}" %{__python} setup.py build
CFLAGS="%{optflags}" %{__python} -m build --no-isolation --wheel
%install
[ "%{buildroot}" != / ] && rm -rf "%{buildroot}"
%{__python} setup.py install \
-O1 --skip-build \
--root="%{buildroot}" \
--install-headers=%{_includedir}/python%{python_version} \
--install-lib=%{python_sitearch} \
--record=%{name}.filelist
%{__python} -m installer --destdir=%{buildroot} dist/*.whl
sed -i "\,\.egg-info/,d;s,.*/man/.*,&.gz," %{name}.filelist
# symlink without .py extension if py_ver==3 or rename to avoid conflicts
for f in %{buildroot}%{_bindir}/*.py; do
%if "0%{?with_pyver}" == "03"
ln -s "$(basename $f)" %{buildroot}%{_bindir}/$(basename $f .py)
%else
mv $f %{buildroot}%{_bindir}/$(basename $f .py)%{?pyappend:-%pyappend}
%endif
done
sed -i "\,%{_bindir},d" %{name}.filelist
%if "0%{?with_pyver}" != "03"
mv %{buildroot}%{_bindir}/docutils %{buildroot}%{_bindir}/docutils%{?pyappend:-%pyappend}
%endif
# remove no license file
rm -f licenses/docutils.conf
#%if "%{?with_pyver}" != "3"
## Rename any conflicting file outside of python site packages tree
#for f in %{_bindir}/pdm; do
# mv %{buildroot}${f}{,-%{?pyappend}}
#done
#%endif
%clean
[ "%{buildroot}" != / ] && rm -rf "%{buildroot}"
%files %{?pyappend} -f %{name}.filelist
%files %{?pyappend}
%defattr(-,root,root)
%{_bindir}/docutils*
%{_bindir}/rst*
%dir %{python_sitearch}/docutils-%{version}-py*.egg-info
%{python_sitearch}/docutils-%{version}-py*.egg-info/*
%dir %{python3_sitelib}/docutils-%{version}.dist-info
%{python3_sitelib}/docutils-%{version}.dist-info/*
%dir %{python3_sitelib}/%{pkgname}
%{python3_sitelib}/%{pkgname}/*
%changelog
* Thu Apr 25 2024 Automatic Build System <autodist@openmamba.org> 0.21.2-1mamba
- automatic version update by autodist
* Mon Oct 02 2023 Automatic Build System <autodist@mambasoft.it> 0.20.1-1mamba
- automatic version update by autodist