provide tools without .py extension if python3 [release 0.19-2mamba;Tue Aug 16 2022]
This commit is contained in:
parent
6166550c93
commit
f74c9cb29c
@ -1,6 +1,6 @@
|
|||||||
Name: python-docutils
|
Name: python-docutils
|
||||||
Version: 0.19
|
Version: 0.19
|
||||||
Release: 1mamba
|
Release: 2mamba
|
||||||
Summary: Python Documentation Utilities
|
Summary: Python Documentation Utilities
|
||||||
Group: System/Libraries/Python
|
Group: System/Libraries/Python
|
||||||
Vendor: openmamba
|
Vendor: openmamba
|
||||||
@ -13,18 +13,16 @@ License: Python, BSD, GPL, public domain
|
|||||||
BuildRequires: libpython3-devel
|
BuildRequires: libpython3-devel
|
||||||
BuildRequires: python3.7dist(setuptools)
|
BuildRequires: python3.7dist(setuptools)
|
||||||
## AUTOBUILDREQ-END
|
## AUTOBUILDREQ-END
|
||||||
BuildRequires: python-setuptools
|
|
||||||
Requires: python >= %python_version
|
|
||||||
BuildArch: noarch
|
BuildArch: noarch
|
||||||
|
|
||||||
%description
|
%description
|
||||||
Docutils is an open-source text processing system for processing plaintext documentation into useful formats, such as HTML or LaTeX.
|
Docutils is an open-source text processing system for processing plaintext documentation into useful formats, such as HTML or LaTeX.
|
||||||
It includes reStructuredText, the easy to read, easy to use, what-you-see-is-what-you-get plaintext markup language.
|
It includes reStructuredText, the easy to read, easy to use, what-you-see-is-what-you-get plaintext markup language.
|
||||||
|
|
||||||
%if "%{?with_pyver}"
|
%if "0%{?with_pyver}" == "03"
|
||||||
%define py_requires_append \
|
%define py_requires_append \
|
||||||
Provides: python-docutils
|
Provides: python-docutils \
|
||||||
Obsoletes: python-docutils
|
Obsoletes: python-docutils < 0.19-2mamba
|
||||||
%pyver_package
|
%pyver_package
|
||||||
%endif
|
%endif
|
||||||
|
|
||||||
@ -45,14 +43,18 @@ CFLAGS="%{optflags}" %{__python} setup.py build
|
|||||||
|
|
||||||
sed -i "\,\.egg-info/,d;s,.*/man/.*,&.gz," %{name}.filelist
|
sed -i "\,\.egg-info/,d;s,.*/man/.*,&.gz," %{name}.filelist
|
||||||
|
|
||||||
## remove .py extension for executable
|
# symlink without .py extension if py_ver==3 or rename to avoid conflicts
|
||||||
#for file in %{buildroot}%{_bindir}/*.py; do
|
for f in %{buildroot}%{_bindir}/*.py; do
|
||||||
#%if "%{?pyappend}" == "py3"
|
%if "0%{?with_pyver}" == "03"
|
||||||
# mv $file %{buildroot}%{_bindir}/$(basename $file .py)
|
ln -s "$(basename $f)" %{buildroot}%{_bindir}/$(basename $f .py)
|
||||||
#%else
|
%else
|
||||||
# mv $file %{buildroot}%{_bindir}/$(basename $file .py)%{?pyappend:-%pyappend}
|
mv $f %{buildroot}%{_bindir}/$(basename $file .py)%{?pyappend:-%pyappend}
|
||||||
#%endif
|
%endif
|
||||||
#done
|
done
|
||||||
|
sed -i "\,%{_bindir},d" %{name}.filelist
|
||||||
|
%if "0%{?with_pyver}" != "03"
|
||||||
|
mv %{buildroot}%{_bindir}/docutils %{buildroot}%{_bindir}/docutils-py%{%pyappend}
|
||||||
|
%endif
|
||||||
|
|
||||||
# remove no license file
|
# remove no license file
|
||||||
rm -f licenses/docutils.conf
|
rm -f licenses/docutils.conf
|
||||||
@ -62,11 +64,14 @@ rm -f licenses/docutils.conf
|
|||||||
|
|
||||||
%files %{?pyappend} -f %{name}.filelist
|
%files %{?pyappend} -f %{name}.filelist
|
||||||
%defattr(-,root,root)
|
%defattr(-,root,root)
|
||||||
#%{_bindir}/rst*
|
%{_bindir}/*
|
||||||
%dir %{python_sitearch}/docutils-%{version}-py*.egg-info
|
%dir %{python_sitearch}/docutils-%{version}-py*.egg-info
|
||||||
%{python_sitearch}/docutils-%{version}-py*.egg-info/*
|
%{python_sitearch}/docutils-%{version}-py*.egg-info/*
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Tue Aug 16 2022 Silvan Calarco <silvan.calarco@mambasoft.it> 0.19-2mamba
|
||||||
|
- provide tools without .py extension if python3
|
||||||
|
|
||||||
* Fri Jul 08 2022 Automatic Build System <autodist@mambasoft.it> 0.19-1mamba
|
* Fri Jul 08 2022 Automatic Build System <autodist@mambasoft.it> 0.19-1mamba
|
||||||
- automatic version update by autodist
|
- automatic version update by autodist
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user