14
0

- Update to 0.22.3:

- docutils/parsers/rst/directives/body.py, docutils/parsers/rst/directives/parts.py
        Do not flag uncategorized, auxiliary elements
        like sphinx.addnodes.only when testing for
        invalid parents of topics or sidebars (cf.
        https://github.com/sphinx-doc/sphinx/issues/14002).
  - docutils/parsers/rst/states.py
        More informative error messages when a substitution
        definition contains problematic or not supported content.
        Ignore combining characters when extracting a grid table block
  - docutils/parsers/rst/tableparser.py
        Ignore combining characters when parsing the grid table
        structure. Fixes bugs #128 and #512.
  - docutils/statemachine.py
        Fix handling of combining characters when extracting
        2d-block.
- Refactor pygments-2.14.patch to not use distutils.
  * reStructured text: Allow embedded colons in field list field
  * try local import of docutils components (reader, writer, parser,
  * Now, it is easy to add a custom stylesheet to Docutils' default
    stylesheet with, e.g.,
    English typographic ones. Activate the SmartQuotes transform if
    where stylesheets are found. Used by stylesheet_path when
- Replace rpmlint-non-executable-scripts.diff with sed in the spec
 * Fix [3541369] Relative __import__ also with Python 3.3
  * reStructuredText "code" role and directive with syntax
  * Fix [ 3402314 ] allow non-ASCII whitespace, punctuation
  * Fix [ 2971827 ] and [ 3442827 ] extras/roman.py moved to
  * docutils.utils is now a package (providing a place for
  * Record only files required to generate the LaTeX source as

OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-docutils?expand=0&rev=103
This commit is contained in:
2025-11-06 09:24:22 +00:00
committed by Git OBS Bridge
commit f24813225f
8 changed files with 1273 additions and 0 deletions

23
.gitattributes vendored Normal file
View File

@@ -0,0 +1,23 @@
## Default LFS
*.7z filter=lfs diff=lfs merge=lfs -text
*.bsp filter=lfs diff=lfs merge=lfs -text
*.bz2 filter=lfs diff=lfs merge=lfs -text
*.gem filter=lfs diff=lfs merge=lfs -text
*.gz filter=lfs diff=lfs merge=lfs -text
*.jar filter=lfs diff=lfs merge=lfs -text
*.lz filter=lfs diff=lfs merge=lfs -text
*.lzma filter=lfs diff=lfs merge=lfs -text
*.obscpio filter=lfs diff=lfs merge=lfs -text
*.oxt filter=lfs diff=lfs merge=lfs -text
*.pdf filter=lfs diff=lfs merge=lfs -text
*.png filter=lfs diff=lfs merge=lfs -text
*.rpm filter=lfs diff=lfs merge=lfs -text
*.tbz filter=lfs diff=lfs merge=lfs -text
*.tbz2 filter=lfs diff=lfs merge=lfs -text
*.tgz filter=lfs diff=lfs merge=lfs -text
*.ttf filter=lfs diff=lfs merge=lfs -text
*.txz filter=lfs diff=lfs merge=lfs -text
*.whl filter=lfs diff=lfs merge=lfs -text
*.xz filter=lfs diff=lfs merge=lfs -text
*.zip filter=lfs diff=lfs merge=lfs -text
*.zst filter=lfs diff=lfs merge=lfs -text

1
.gitignore vendored Normal file
View File

@@ -0,0 +1 @@
.osc

3
_multibuild Normal file
View File

@@ -0,0 +1,3 @@
<multibuild>
<package>test</package>
</multibuild>

3
docutils-0.22.2.tar.gz Normal file
View File

@@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:9fdb771707c8784c8f2728b67cb2c691305933d68137ef95a75db5f4dfbc213d
size 2289092

3
docutils-0.22.3.tar.gz Normal file
View File

@@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:21486ae730e4ca9f622677b1412b879af1791efcfba517e4c6f60be543fc8cdd
size 2290153

View File

@@ -0,0 +1 @@
# these can't be helped

1092
python-docutils.changes Normal file

File diff suppressed because it is too large Load Diff

147
python-docutils.spec Normal file
View File

@@ -0,0 +1,147 @@
#
# spec file for package python-docutils
#
# Copyright (c) 2025 SUSE LLC and contributors
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.
# Please submit bugfixes or comments via https://bugs.opensuse.org/
#
%{?sle15_python_module_pythons}
%global flavor @BUILD_FLAVOR@%{nil}
%if "%{flavor}" == "test"
%define psuffix -test
%bcond_without test
%else
%define psuffix %{nil}
%bcond_with test
%endif
%if 0%{?suse_version} > 1500
%bcond_without libalternatives
%else
%bcond_with libalternatives
%endif
Name: python-docutils%{psuffix}
Version: 0.22.3
Release: 0
Summary: Python Documentation Utilities
License: BSD-2-Clause AND Python-2.0 AND GPL-2.0-or-later AND GPL-3.0-or-later AND SUSE-Public-Domain
URL: https://pypi.python.org/pypi/docutils/
Source: https://files.pythonhosted.org/packages/source/d/docutils/docutils-%{version}.tar.gz
Source99: python-docutils-rpmlintrc
BuildRequires: %{python_module base >= 3.9}
BuildRequires: %{python_module flit-core}
BuildRequires: %{python_module pip}
BuildRequires: fdupes
BuildRequires: python-rpm-macros
%if %{with libalternatives}
Requires: alts
BuildRequires: alts
%else
Requires(pre): update-alternatives
Requires(post): update-alternatives
Requires(postun): update-alternatives
%endif
Recommends: python-Pillow
Recommends: python-Pygments
Recommends: python-roman
BuildArch: noarch
%if %{with test}
BuildRequires: %{python_module docutils = %{version}}
BuildRequires: %{python_module packaging}
# BuildRequires: %%{python_module roman}
%endif
%if "%{python_flavor}" == "python3" || "%{?python_provides}" == "python3"
Provides: docutils = %{version}
Obsoletes: docutils < %{version}
%endif
%python_subpackages
%description
Docutils is a modular system for processing documentation into useful formats,
such as HTML, XML, and LaTeX. For input Docutils supports reStructuredText, an
easy-to-read, what-you-see-is-what-you-get plaintext markup syntax.
%prep
%autosetup -p1 -n docutils-%{version}
# Remove useless ".py" ending from executables:
for i in tools/rst*; do mv "$i" "${i/.py}"; done
find . -name \*.mp4 -print -exec chmod -x '{}' \;
find . -name \*.swp -delete
# Remove shebang from non-executable files
sed -i '1{/^#!/d}' \
docutils/__main__.py \
docutils/parsers/commonmark_wrapper.py \
docutils/parsers/docutils_xml.py \
docutils/parsers/recommonmark_wrapper.py \
docutils/utils/math/math2html.py \
docutils/utils/math/tex2unichar.py \
docutils/utils/math/mathalphabet2unichar.py \
docutils/utils/smartquotes.py \
docutils/writers/_html_base.py \
docutils/writers/odf_odt/prepstyles.py \
docutils/writers/xetex/__init__.py
%build
%pyproject_wheel
%install
%if !%{with test}
%pyproject_install
for binary in docutils rst2html rst2latex rst2man rst2odt rst2pseudoxml rst2s5 rst2xetex rst2xml rst2html4 rst2html5 ; do
%python_clone -a %{buildroot}%{_bindir}/$binary
done
%{python_expand find %{buildroot}%{$python_sitelib} -name \*.py -executable -exec chmod -x '{}' \;
%fdupes %{buildroot}%{$python_sitelib}
}
%endif
%check
%if %{with test}
%python_exec test/alltests.py -v
%endif
%if !%{with test}
# sometime ago rst2html was the master which would let fail the upgrade with master docutils in post below
%pre
update-alternatives --query rst2html >/dev/null 2>&1 && update-alternatives --quiet --remove-all rst2html ||:
# If libalternatives is used: Removing old update-alternatives entries.
%python_libalternatives_reset_alternative docutils
%post
%python_install_alternative docutils rst2html rst2latex rst2man rst2odt rst2pseudoxml rst2s5 rst2xetex rst2xml rst2html4 rst2html5
%postun
%python_uninstall_alternative docutils
%files %{python_files}
%license COPYING.rst licenses/*.txt licenses/*.rst
%doc FAQ.rst HISTORY.rst README.rst THANKS.rst BUGS.rst docs/*
%python_alternative %{_bindir}/docutils
%python_alternative %{_bindir}/rst2html
%python_alternative %{_bindir}/rst2latex
%python_alternative %{_bindir}/rst2man
%python_alternative %{_bindir}/rst2odt
%python_alternative %{_bindir}/rst2pseudoxml
%python_alternative %{_bindir}/rst2s5
%python_alternative %{_bindir}/rst2xetex
%python_alternative %{_bindir}/rst2xml
%python_alternative %{_bindir}/rst2html4
%python_alternative %{_bindir}/rst2html5
%{python_sitelib}/docutils/
%{python_sitelib}/docutils-%{version}.dist-info
%endif
%changelog