Stop shipping the entire docs sources, reduce the package size significantly

That is, from 6249115 to 4021694 bytes, i.e. ~35% smaller
This commit is contained in:
Miro Hrončok 2021-06-09 11:14:39 +00:00
parent 3f80496a25
commit 526d5f95b9

View File

@ -1,6 +1,6 @@
Name: python-docutils Name: python-docutils
Version: 0.16 Version: 0.16
Release: 5%{?dist} Release: 6%{?dist}
Summary: System for processing plaintext documentation Summary: System for processing plaintext documentation
# See COPYING.txt for information # See COPYING.txt for information
@ -39,9 +39,6 @@ Summary: %{summary}
# Remove shebang from library files # Remove shebang from library files
sed -i -e '/#! *\/usr\/bin\/.*/{1D}' $(grep -Erl '^#!.+python' docutils) sed -i -e '/#! *\/usr\/bin\/.*/{1D}' $(grep -Erl '^#!.+python' docutils)
iconv -f ISO88592 -t UTF8 tools/editors/emacs/IDEAS.rst > tmp
mv tmp tools/editors/emacs/IDEAS.rst
# We want the licenses but don't need this build file # We want the licenses but don't need this build file
rm -f licenses/docutils.conf rm -f licenses/docutils.conf
@ -52,7 +49,6 @@ rm -f licenses/docutils.conf
%install %install
%py3_install %py3_install
mv docs/user/rst/images/biohazard.swf ./biohazard.swf
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`
@ -60,21 +56,21 @@ done
%check %check
mv biohazard.swf docs/user/rst/images/biohazard.swf
%{python3} test/alltests.py %{python3} test/alltests.py
rm docs/user/rst/images/biohazard.swf
%files -n python%{python3_pkgversion}-docutils %files -n python%{python3_pkgversion}-docutils
%license COPYING.txt licenses/* %license COPYING.txt licenses/*
%doc BUGS.txt FAQ.txt HISTORY.txt README.txt RELEASE-NOTES.txt %doc BUGS.txt FAQ.txt HISTORY.txt README.txt RELEASE-NOTES.txt THANKS.txt
%doc THANKS.txt docs tools/editors
%{python3_sitelib}/docutils/ %{python3_sitelib}/docutils/
%{python3_sitelib}/docutils-%{version}-py%{python3_version}.egg-info/ %{python3_sitelib}/docutils-%{version}-py%{python3_version}.egg-info/
%{_bindir}/rst* %{_bindir}/rst*
%changelog %changelog
* Tue Jun 22 2021 Miro Hrončok <mhroncok@redhat.com> - 0.16-6
- Stop shipping the entire docs sources, reduce the package size significantly
* Wed Jun 02 2021 Python Maint <python-maint@redhat.com> - 0.16-5 * Wed Jun 02 2021 Python Maint <python-maint@redhat.com> - 0.16-5
- Rebuilt for Python 3.10 - Rebuilt for Python 3.10