Compare commits

...

No commits in common. "c8" and "c10s" have entirely different histories.
c8 ... c10s

8 changed files with 175 additions and 167 deletions

1
.fmf/version Normal file
View File

@ -0,0 +1 @@
1

17
.gitignore vendored
View File

@ -1 +1,16 @@
SOURCES/docutils-0.14.tar.gz docutils-0.7.tar.gz
/docutils-0.8.tar.gz
/docutils-0.8.1.tar.gz
/docutils-0.9.1.tar.gz
/docutils-0.10.tar.gz
/docutils-0.11.tar.gz
/docutils-0.12.tar.gz
/docutils-0.13.1.tar.gz
/docutils-0.14.tar.gz
/docutils-0.15.2.tar.gz
/docutils-0.16.tar.gz
/docutils-0.17.1.tar.gz
/docutils-0.18.1.tar.gz
/docutils-0.19.tar.gz
/docutils-0.20.tar.gz
/docutils-0.20.1.tar.gz

View File

@ -1 +0,0 @@
32cefb69ac3dab5b04c4d150776f35419cc4c863 SOURCES/docutils-0.14.tar.gz

5
gating.yaml Normal file
View File

@ -0,0 +1,5 @@
--- !Policy
decision_context: osci_compose_gate
rules:
- !PassingTestCaseRule {test_case_name: osci.brew-build.tier0.functional}

9
plan.fmf Normal file
View File

@ -0,0 +1,9 @@
discover:
how: shell
tests:
- name: import test
test: python3 -c 'import docutils'
require:
- python3-docutils
execute:
how: tmt

View File

@ -1,45 +1,22 @@
%if 0%{?fedora} || 0%{?rhel} > 7 Name: python-docutils
%global with_python3 0%{!?_without_python3:1} Version: 0.20.1
%endif Release: 5%{?dist}
%if 0%{?rhel} > 7
# Disable python2 build by default
%bcond_with python2
%else
%bcond_without python2
%endif
%global srcname docutils
Name: python-%{srcname}
Version: 0.14
Release: 7%{?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+ # PSF-2.0 was chosen for the SPDX identifier as it's the spirit of the original
URL: http://docutils.sourceforge.net # author's notice, even though the shipped license text is copied from Python 2.1.1
#Source0: http://downloads.sourceforge.net/docutils/%%{srcname}-%%{version}.tar.gz # See: https://gitlab.com/fedora/legal/fedora-license-data/-/issues/216
# Sometimes we need snapshots. Instructions below: License: LicenseRef-Fedora-Public-Domain AND BSD-2-Clause AND BSD-3-Clause AND PSF-2.0 AND GPL-3.0-or-later
# svn co -r 7687 svn://svn.code.sf.net/p/docutils/code/trunk/docutils URL: https://docutils.sourceforge.net
# cd docutils Source0: https://sourceforge.net/projects/docutils/files/docutils/%{version}/docutils-%{version}.tar.gz
# python setup.py sdist
# The tarball is in dist/docutils-VERSION.tar.gz
Source0: %{srcname}-%{version}.tar.gz
BuildArch: noarch BuildArch: noarch
%if %{with python2} BuildRequires: pyproject-rpm-macros
BuildRequires: python2-devel BuildRequires: python%{python3_pkgversion}-devel
BuildRequires: python2-setuptools
%endif # with python2
%if 0%{?with_python3}
BuildRequires: python3-devel
BuildRequires: python3-setuptools
%endif
%description %global _description %{expand:
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
@ -48,159 +25,156 @@ 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.}
%if %{with python2} %description %_description
%package -n python2-%{srcname}
Summary: System for processing plaintext documentation for python2
%{?python_provide:%python_provide python2-%{srcname}}
Provides: docutils = %{version}-%{release}
Obsoletes: docutils < %{version}-%{release}
%description -n python2-%{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.
Currently, the library supports parsing rST that is in standalone files and %package -n python%{python3_pkgversion}-docutils
PEPs (Python Enhancement Proposals). Work is underway to parse rST from Summary: %{summary}
Python inline documentation modules and packages.
%endif # with python2
%if 0%{?with_python3} %description -n python%{python3_pkgversion}-docutils %_description
%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.
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.
This package contains the module, ported to run under python3.
%endif # with_python3
%prep %prep
%setup -q -n %{srcname}-%{version} %autosetup -p1 -n docutils-%{version}
# Remove shebang from library files # Remove shebang from library files
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}' $(grep -Erl '^#!.+python' docutils)
sed -i -e '/#! *\/usr\/bin\/.*/{1D}' $file
done
iconv -f ISO88592 -t UTF8 tools/editors/emacs/IDEAS.rst > tmp
mv tmp tools/editors/emacs/IDEAS.rst
%if 0%{?with_python3}
rm -rf %{py3dir}
cp -a . %{py3dir}
%endif
%build
%if %{with python2}
%py2_build
%endif # with python2
%if 0%{?with_python3}
pushd %{py3dir}
%py3_build
popd
%endif # with_python3
%install
%if %{with python2}
%py2_install
for file in %{buildroot}/%{_bindir}/*.py; do
mv $file `dirname $file`/`basename $file .py`-2
done
# 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
# Flash file is used for testing docutils but shouldn't be in the installed package.
mv docs/user/rst/images/biohazard.swf ./biohazard.swf
%endif # with python2
# Must do the python3 install first because the scripts in /usr/bin are %generate_buildrequires
# overwritten by setup.py install (and we want the python2 version to be the %pyproject_buildrequires -r
# default for now).
%if 0%{?with_python3}
pushd %{py3dir}
%py3_install
# docutils setup.py runs 2to3 on a copy of the tests and puts it in sitelib.
rm -rf %{buildroot}%{python3_sitelib}/test
for file in %{buildroot}/%{_bindir}/*.py; do %build
mv $file `dirname $file`/`basename $file .py` %pyproject_wheel
%install
%pyproject_install
%pyproject_save_files docutils
for file in %{buildroot}%{_bindir}/*.py; do
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
%if %{with python2} export PYTHONPATH=%{buildroot}%{python3_sitelib}
mv biohazard.swf docs/user/rst/images/biohazard.swf %{python3} test/alltests.py
%{__python2} test/alltests.py
rm docs/user/rst/images/biohazard.swf
%endif # with python2
%if 0%{?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
%if %{with python2} %files -n python%{python3_pkgversion}-docutils -f %{pyproject_files}
%files -n python2-%{srcname}
%license COPYING.txt licenses/* %license COPYING.txt licenses/*
%doc BUGS.txt COPYING.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 %{_bindir}/rst*
%{_bindir}/*-2 %{_bindir}/docutils
%{python2_sitelib}/*
%endif # with python2
%if 0%{?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}/*[!'-2']
%{python3_sitelib}/*
%endif
%changelog %changelog
* Sun Jul 22 2018 Charalampos Stratakis <cstratak@redhat.com> - 0.14-7 * Tue Oct 29 2024 Troy Dawson <tdawson@redhat.com> - 0.20.1-5
- Conditionalize the python2 subpackage - Bump release for October 2024 mass rebuild:
Resolves: RHEL-64018
* Tue Jul 10 2018 Charalampos Stratakis <cstratak@redhat.com> - 0.14-6 * Mon Jun 24 2024 Troy Dawson <tdawson@redhat.com> - 0.20.1-4
- Change the binaries to python3 as default - Bump release for June 2024 mass rebuild
* Mon Jun 25 2018 Petr Viktorin <pviktori@redhat.com> - 0.14-5 * Fri Jan 26 2024 Fedora Release Engineering <releng@fedoraproject.org> - 0.20.1-3
- Fix specfile typos and oversights - Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild
- Fix python3-setuptools dependency
- Export RHEL workaround variables
- Use {__python2} as RPM macro, not shell variable
* Mon Jun 25 2018 Petr Viktorin <pviktori@redhat.com> - 0.14-4 * Mon Jan 22 2024 Fedora Release Engineering <releng@fedoraproject.org> - 0.20.1-2
- Allow Python 2 for build - Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild
* Fri Aug 11 2023 Karolina Surma <ksurma@redhat.com> - 0.20.1-1
- Update to 0.20.1
Resolves: rhbz#2207802
* Wed Aug 09 2023 Karolina Surma <ksurma@redhat.com> - 0.19-5
- Declare the license as an SPDX expression
* Fri Jul 21 2023 Fedora Release Engineering <releng@fedoraproject.org> - 0.19-4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild
* Tue Jun 13 2023 Python Maint <python-maint@redhat.com> - 0.19-3
- Rebuilt for Python 3.12
* Fri Jan 20 2023 Fedora Release Engineering <releng@fedoraproject.org> - 0.19-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild
* Mon Oct 24 2022 Karolina Surma <ksurma@redhat.com> - 0.19-1
- Update to 0.19
Resolves: rhbz#2099884
* Fri Jul 22 2022 Fedora Release Engineering <releng@fedoraproject.org> - 0.18.1-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild
* Tue Jun 21 2022 Karolina Surma <ksurma@redhat.com> - 0.18.1-1
- Update to 0.18.1
Resolves: rhbz#2011077
* Mon Jun 13 2022 Python Maint <python-maint@redhat.com> - 0.17.1-3
- Rebuilt for Python 3.11
* Fri Jan 21 2022 Fedora Release Engineering <releng@fedoraproject.org> - 0.17.1-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild
* Fri Sep 17 2021 Karolina Surma <ksurma@redhat.com> - 0.17.1-1
- Update to 0.17.1
Resolves: rhbz#1927513
* Tue Jul 27 2021 Fedora Release Engineering <releng@fedoraproject.org> - 0.16-7
- Second attempt - Rebuilt for
https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild
* 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
- Rebuilt for Python 3.10
* 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
- Remove python2 subpackage
* Thu Jan 30 2020 Fedora Release Engineering <releng@fedoraproject.org> - 0.15.2-4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild
* Thu Oct 03 2019 Miro Hrončok <mhroncok@redhat.com> - 0.15.2-3
- Rebuilt for Python 3.8.0rc1 (#1748018)
* Thu Aug 15 2019 Miro Hrončok <mhroncok@redhat.com> - 0.15.2-2
- Rebuilt for Python 3.8
* Fri Aug 02 2019 Kevin Fenzi <kevin@scrye.com> - 0.15.2-1
- Update to 0.15.2
* Fri Jul 26 2019 Fedora Release Engineering <releng@fedoraproject.org> - 0.14-7
- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild
* Sat Feb 02 2019 Fedora Release Engineering <releng@fedoraproject.org> - 0.14-6
- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild
* Thu Jul 12 2018 Miro Hrončok <mhroncok@redhat.com> - 0.14-5
- Only ship one version of the rst2* executables
- 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
@ -394,16 +368,16 @@ popd
- 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
@ -434,7 +408,7 @@ popd
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.
@ -442,7 +416,7 @@ popd
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.

4
rpminspect.yaml Normal file
View File

@ -0,0 +1,4 @@
# exclude XML template (not always valid) from XML validity check:
xml:
ignore:
- /usr/lib/python*/site-packages/docutils/writers/pep_html/template.txt

1
sources Normal file
View File

@ -0,0 +1 @@
SHA512 (docutils-0.20.1.tar.gz) = a0ddca315d03677003036d6a8052ac96fbd3fcc4508564938ea684d79bedb4d322d83449c7b26e55b19b0aadd6e46ca9ac409bb16279a20f06c70e9c15ef5eb0