Compare commits

..

No commits in common. 'c9' and 'c8-stream-3.6' have entirely different histories.

2
.gitignore vendored

@ -1 +1 @@
SOURCES/docutils-0.16.tar.gz SOURCES/docutils-0.14.tar.gz

@ -1 +1 @@
89cc4c2e81f7fc907359b9fa71f78117cde90ed1 SOURCES/docutils-0.16.tar.gz 32cefb69ac3dab5b04c4d150776f35419cc4c863 SOURCES/docutils-0.14.tar.gz

@ -1,21 +1,67 @@
%if 0%{?fedora} || 0%{?rhel} > 7
%bcond_without python3
%endif
%bcond_with python36_module
# python2X and python3X are built form the same module, so we need a conditional for python2 bits
# the state of the conditional is not important in the spec, it is set in modulemd
%bcond_with python2
%global srcname docutils %global srcname docutils
Name: python-%{srcname} Name: python-%{srcname}
Version: 0.16 Version: 0.14
Release: 6%{?dist} Release: 12%{?dist}
Summary: System for processing plaintext documentation Summary: System for processing plaintext documentation
Group: Development/Languages
# See COPYING.txt for information # See COPYING.txt for information
License: Public Domain and BSD and Python and GPLv3+ License: Public Domain and BSD and Python and GPLv3+
URL: http://docutils.sourceforge.net URL: http://docutils.sourceforge.net
Source0: https://sourceforge.net/projects/%{srcname}/files/%{srcname}/%{version}/%{srcname}-%{version}.tar.gz #Source0: http://downloads.sourceforge.net/docutils/%%{srcname}-%%{version}.tar.gz
# Sometimes we need snapshots. Instructions below:
# svn co -r 7687 svn://svn.code.sf.net/p/docutils/code/trunk/docutils
# cd docutils
# python setup.py sdist
# The tarball is in dist/docutils-VERSION.tar.gz
Source0: %{srcname}-%{version}.tar.gz
BuildArch: noarch
%if %{with python2}
BuildRequires: python2-devel
BuildRequires: python2-setuptools
%endif
%if %{with python3}
%if %{with python36_module}
BuildRequires: python36-devel
BuildRequires: python36-rpm-macros
%else
BuildRequires: python3-devel
%endif
%endif
%description
The Docutils project specifies a plaintext markup language, reStructuredText,
which is easy to read and quick to write. The project includes a python
library to parse rST files and transform them into other useful formats such
as HTML, XML, and TeX as well as commandline tools that give the enduser
access to this functionality.
BuildArch: noarch Currently, the library supports parsing rST that is in standalone files and
PEPs (Python Enhancement Proposals). Work is underway to parse rST from
Python inline documentation modules and packages.
BuildRequires: python%{python3_pkgversion}-devel %if %{with python2}
BuildRequires: python%{python3_pkgversion}-setuptools %package -n python2-%{srcname}
Summary: System for processing plaintext documentation for python2
%{?python_provide:%python_provide python2-%{srcname}}
Obsoletes: docutils < %{version}-%{release}
%global _description %{expand: %description -n python2-%{srcname}
The Docutils project specifies a plaintext markup language, reStructuredText, The Docutils project specifies a plaintext markup language, reStructuredText,
which is easy to read and quick to write. The project includes a python which is easy to read and quick to write. The project includes a python
library to parse rST files and transform them into other useful formats such library to parse rST files and transform them into other useful formats such
@ -24,111 +70,149 @@ access to this functionality.
Currently, the library supports parsing rST that is in standalone files and Currently, the library supports parsing rST that is in standalone files and
PEPs (Python Enhancement Proposals). Work is underway to parse rST from PEPs (Python Enhancement Proposals). Work is underway to parse rST from
Python inline documentation modules and packages.} Python inline documentation modules and packages.
%endif
%description %_description %if %{with python3}
%package -n python3-%{srcname}
Summary: System for processing plaintext documentation for python3
%{?python_provide:%python_provide python3-%{srcname}}
Group: Development/Languages
%description -n python3-%{srcname}
The Docutils project specifies a plaintext markup language, reStructuredText,
which is easy to read and quick to write. The project includes a python
library to parse rST files and transform them into other useful formats such
as HTML, XML, and TeX as well as commandline tools that give the enduser
access to this functionality.
%package -n python%{python3_pkgversion}-%{srcname} Currently, the library supports parsing rST that is in standalone files and
Summary: %{summary} PEPs (Python Enhancement Proposals). Work is underway to parse rST from
Python inline documentation modules and packages.
%description -n python%{python3_pkgversion}-%{srcname} %_description
This package contains the module, ported to run under python3.
%endif # with python3
%prep %prep
%autosetup -n %{srcname}-%{version} %setup -q -n %{srcname}-%{version}
# Remove shebang from library files # Remove shebang from library files
sed -i -e '/#! *\/usr\/bin\/.*/{1D}' $(grep -Erl '^#!.+python' %{srcname}) for file in docutils/utils/{code_analyzer.py,punctuation_chars.py,error_reporting.py,smartquotes.py} docutils/utils/math/{latex2mathml.py,math2html.py} docutils/writers/xetex/__init__.py; do
sed -i -e '/#! *\/usr\/bin\/.*/{1D}' $file
done
iconv -f ISO88592 -t UTF8 tools/editors/emacs/IDEAS.rst > tmp iconv -f ISO88592 -t UTF8 tools/editors/emacs/IDEAS.rst > tmp
mv tmp tools/editors/emacs/IDEAS.rst mv tmp tools/editors/emacs/IDEAS.rst
# We want the licenses but don't need this build file %if %{with python3}
rm -f licenses/docutils.conf rm -rf %{py3dir}
cp -a . %{py3dir}
# https://bugzilla.redhat.com/show_bug.cgi?id=1687377 %endif
rm test/test_writers/test_odt.py
%build %build
%{?with_python2:%py2_build}
%if %{with python3}
pushd %{py3dir}
%py3_build %py3_build
popd
%endif # with python3
%install %install
%py3_install
%if %{with python2}
%py2_install
# We only want to ship the Python 3 executables, delete these
rm -f %{buildroot}/%{_bindir}/*.py
%endif
# We want the licenses but don't need this build file
rm -f licenses/docutils.conf
# Flash file is used for testing docutils but shouldn't be in the installed package.
mv docs/user/rst/images/biohazard.swf ./biohazard.swf mv docs/user/rst/images/biohazard.swf ./biohazard.swf
%if %{with python3}
pushd %{py3dir}
%py3_install
# docutils setup.py runs 2to3 on a copy of the tests and puts it in sitelib. # docutils setup.py runs 2to3 on a copy of the tests and puts it in sitelib.
rm -rf %{buildroot}%{python3_sitelib}/test rm -rf %{buildroot}%{python3_sitelib}/test
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`
done done
# Flash file is used for testing docutils but shouldn't be in the installed package.
mv docs/user/rst/images/biohazard.swf ./biohazard.swf
popd
%endif # with python3
%check %check
mv biohazard.swf docs/user/rst/images/biohazard.swf mv biohazard.swf docs/user/rst/images/biohazard.swf
%{python3} test/alltests.py %{?with_python2:%{__python2} test/alltests.py}
rm docs/user/rst/images/biohazard.swf rm docs/user/rst/images/biohazard.swf
%if %{with python3}
pushd %{py3dir}
mv biohazard.swf docs/user/rst/images/biohazard.swf
%{__python3} test3/alltests.py
rm docs/user/rst/images/biohazard.swf
popd
%endif
%files -n python%{python3_pkgversion}-%{srcname} %if %{with python2}
%files -n python2-%{srcname}
%license COPYING.txt licenses/* %license COPYING.txt licenses/*
%doc BUGS.txt FAQ.txt HISTORY.txt README.txt RELEASE-NOTES.txt %doc BUGS.txt COPYING.txt FAQ.txt HISTORY.txt README.txt RELEASE-NOTES.txt
%doc THANKS.txt docs tools/editors %doc THANKS.txt docs tools/editors
%{python3_sitelib}/%{srcname}/ %{python2_sitelib}/*
%{python3_sitelib}/%{srcname}-%{version}-py%{python3_version}.egg-info/ %endif
%{_bindir}/rst*
%if %{with python3}
%files -n python3-%{srcname}
%license COPYING.txt licenses/*
%doc BUGS.txt FAQ.txt HISTORY.txt README.txt RELEASE-NOTES.txt
%doc THANKS.txt docs tools/editors
%{_bindir}/*
%{python3_sitelib}/*
%endif
%changelog %changelog
* Tue Aug 10 2021 Mohan Boddu <mboddu@redhat.com> - 0.16-6 * Thu Apr 25 2019 Tomas Orsava <torsava@redhat.com> - 0.14-12
- Rebuilt for IMA sigs, glibc 2.34, aarch64 flags - Bumping due to problems with modular RPM upgrade path
Related: rhbz#1991688 - Resolves: rhbz#1695587
* Fri Apr 16 2021 Mohan Boddu <mboddu@redhat.com> - 0.16-5
- Rebuilt for RHEL 9 BETA on Apr 15th 2021. Related: rhbz#1947937
* Wed Jan 27 2021 Fedora Release Engineering <releng@fedoraproject.org> - 0.16-4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild
* Wed Jul 29 2020 Fedora Release Engineering <releng@fedoraproject.org> - 0.16-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild
* Fri May 22 2020 Miro Hrončok <mhroncok@redhat.com> - 0.16-2
- Rebuilt for Python 3.9
* Mon Apr 06 2020 siddharthvipul <siddharthvipul1@gmail.com> - 0.16-1
- Update to 0.16
* Sat Apr 04 2020 siddharthvipul <siddharthvipul1@gmail.com> - 0.15.2-5 * Tue Dec 11 2018 Tomas Orsava <torsava@redhat.com> - 0.14-11
- Remove python2 subpackage - Remove python2 executables - they are functionally identical to the python3
executables, so we're only going to ship them in the python3 subpackage
- Resolves: rhbz#1656477
* Thu Jan 30 2020 Fedora Release Engineering <releng@fedoraproject.org> - 0.15.2-4 * Tue Oct 09 2018 Lumír Balhar <lbalhar@redhat.com> - 0.14-10
- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild - Remove unversioned provides
- Resolves: rhbz#1628242
* Thu Oct 03 2019 Miro Hrončok <mhroncok@redhat.com> - 0.15.2-3 * Thu Aug 02 2018 Charalampos Stratakis <cstratak@redhat.com> - 0.14-9
- Rebuilt for Python 3.8.0rc1 (#1748018) - Change the binaries to python3 as default
* Thu Aug 15 2019 Miro Hrončok <mhroncok@redhat.com> - 0.15.2-2 * Tue Jul 31 2018 Lumír Balhar <lbalhar@redhat.com> - 0.14-8
- Rebuilt for Python 3.8 - Switch python3 coditions to bcond
* Fri Aug 02 2019 Kevin Fenzi <kevin@scrye.com> - 0.15.2-1 * Wed Jul 18 2018 Tomas Orsava <torsava@redhat.com> - 0.14-7
- Update to 0.15.2 - BuildRequire also python36-rpm-macros as part of the python36 module build
* Fri Jul 26 2019 Fedora Release Engineering <releng@fedoraproject.org> - 0.14-7 * Wed Jul 04 2018 Miro Hrončok <mhroncok@redhat.com> - 0.14-6
- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild - Add a bcond for python2
* Sat Feb 02 2019 Fedora Release Engineering <releng@fedoraproject.org> - 0.14-6 * Mon Jun 25 2018 Tomas Orsava <torsava@redhat.com> - 0.14-5
- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild - Fix the invocation of Python
* Thu Jul 12 2018 Miro Hrončok <mhroncok@redhat.com> - 0.14-5 * Mon Apr 30 2018 Tomas Orsava <torsava@redhat.com> - 0.14-4
- Only ship one version of the rst2* executables - Require the python36-devel package when building for the python36 module
- Invoke python2 with python2 in %%check
* Thu Jun 14 2018 Miro Hrončok <mhroncok@redhat.com> - 0.14-4
- Rebuilt for Python 3.7
* Fri Feb 09 2018 Fedora Release Engineering <releng@fedoraproject.org> - 0.14-3 * Fri Feb 09 2018 Fedora Release Engineering <releng@fedoraproject.org> - 0.14-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild - Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild
@ -322,16 +406,16 @@ rm docs/user/rst/images/biohazard.swf
- Bump for FC6 rebuild. - Bump for FC6 rebuild.
- Remove python byte compilation as this is handled automatically in FC4+. - Remove python byte compilation as this is handled automatically in FC4+.
- No longer %%ghost .pyo files. - No longer %%ghost .pyo files.
* Thu Feb 16 2006 Toshio Kuratomi <toshio-tiki-lounge.com> 0.4-2 * Thu Feb 16 2006 Toshio Kuratomi <toshio-tiki-lounge.com> 0.4-2
- Bump and rebuild for FC5. - Bump and rebuild for FC5.
* Sun Jan 15 2006 Toshio Kuratomi <toshio-tiki-lounge.com> 0.4-1 * Sun Jan 15 2006 Toshio Kuratomi <toshio-tiki-lounge.com> 0.4-1
- Update to 0.4. - Update to 0.4.
- Scripted the listing of files in the python module. - Scripted the listing of files in the python module.
- Add a missingok requirement on python-imaging as docutils can make use of - Add a missingok requirement on python-imaging as docutils can make use of
it when converting to formats that have images. it when converting to formats that have images.
* Tue Jun 7 2005 Toshio Kuratomi <toshio-tiki-lounge.com> 0.3.9-1 * Tue Jun 7 2005 Toshio Kuratomi <toshio-tiki-lounge.com> 0.3.9-1
- Update to version 0.3.9. - Update to version 0.3.9.
- Use a dist tag as there aren't any differences between supported fc - Use a dist tag as there aren't any differences between supported fc
@ -362,7 +446,7 @@ rm docs/user/rst/images/biohazard.swf
from another package.... Lesser of two evils here. from another package.... Lesser of two evils here.
- Provide python-docutils in case that package were preinstalled from - Provide python-docutils in case that package were preinstalled from
another repository. another repository.
* Fri Dec 31 2004 Toshio Kuratomi <toshio.tiki-lounge.com> 0:0.3.7-0.fdr.1 * Fri Dec 31 2004 Toshio Kuratomi <toshio.tiki-lounge.com> 0:0.3.7-0.fdr.1
- Update to 0.3.7 - Update to 0.3.7
- Rename from python-docutils to docutils. - Rename from python-docutils to docutils.
@ -370,7 +454,7 @@ rm docs/user/rst/images/biohazard.swf
included. In FC3, this won't. included. In FC3, this won't.
- BuildConflict with self since the docutils build detects the presence - BuildConflict with self since the docutils build detects the presence
of roman.py and doesn't reinstall itself. of roman.py and doesn't reinstall itself.
* Mon Aug 9 2004 Toshio Kuratomi <toshio.tiki-lounge.com> 0:0.3.5-0.fdr.1 * Mon Aug 9 2004 Toshio Kuratomi <toshio.tiki-lounge.com> 0:0.3.5-0.fdr.1
- Update to 0.3.5. - Update to 0.3.5.
- Update spec style to latest fedora-rpmdevtools. - Update spec style to latest fedora-rpmdevtools.

Loading…
Cancel
Save