17
0

- Update to 0.22.1:

- Only documentation fixes.
    docutils/frontend.py, docutils/writers/
        More consistent and concise command line help.
    docutils/nodes.py
      - nodes.Element.section_hierarchy() now returns only
        elements with non-empty "parent" attribute.
    docutils/parsers/rst/states.py
      - Relax "section title" system messages from SEVERE to
        ERROR.
      - Fix behaviour with nested parsing into a detached node
        (cf. bugs #508 and #509).
      - New attribute NestedStateMachine.parent_state_machine.
        Use case: update the "current node" of parent state
        machine(s) after nested parsing.
      - Better error messages for grid table markup errors (bug
        #504), based on patch #214 by Jynn Nelson.
    docutils/transforms/references.py
      - Better error reports for hyperlinks with embedded URI or
        alias.
    docutils/writers/latex2e/__init__.py
      - Add cross-reference anchors (\phantomsection\label{...})
        for elements with IDs (fixes bug #503).
      - Fix cross-reference anchor placement in figures, images,
        literal-blocks, tables, and (sub)titles.
      - Simplify code for images nested in reference or figure
        elements.
- Update to 0.22.0:
    General
      - We have started to add type hints to Docutils

OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-docutils?expand=0&rev=99
This commit is contained in:
2025-09-17 20:17:24 +00:00
committed by Git OBS Bridge
parent aab7d8be3a
commit 39b4f2d5d7
4 changed files with 263 additions and 10 deletions

View File

@@ -1,7 +1,7 @@
#
# spec file for package python-docutils
#
# Copyright (c) 2025 SUSE LLC
# 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
@@ -33,7 +33,7 @@
%endif
Name: python-docutils%{psuffix}
Version: 0.21.2
Version: 0.22.1
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
@@ -62,7 +62,7 @@ BuildRequires: %{python_module docutils = %{version}}
BuildRequires: %{python_module packaging}
# BuildRequires: %%{python_module roman}
%endif
%if "%{python_flavor}" == "python3" || "%{?python_provides}" == "python3"
%if "%{python_flavor}" == "python3"
Provides: docutils = %{version}
Obsoletes: docutils < %{version}
%endif
@@ -84,10 +84,11 @@ find . -name \*.swp -delete
sed -i '1{/^#!/d}' \
docutils/__main__.py \
docutils/parsers/commonmark_wrapper.py \
docutils/parsers/docutils_xml.py \
docutils/parsers/recommonmark_wrapper.py \
docutils/utils/error_reporting.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 \
@@ -102,7 +103,9 @@ sed -i '1{/^#!/d}' \
for binary in docutils rst2html rst2latex rst2man rst2odt rst2pseudoxml rst2s5 rst2xetex rst2xml rst2html4 rst2html5 ; do
%python_clone -a %{buildroot}%{_bindir}/$binary
done
%python_expand %fdupes %{buildroot}%{$python_sitelib}
%{python_expand find %{buildroot}%{$python_sitelib} -name \*.py -executable -exec chmod -x '{}' \;
%fdupes %{buildroot}%{$python_sitelib}
}
%endif
%check
@@ -124,8 +127,8 @@ update-alternatives --query rst2html >/dev/null 2>&1 && update-alternatives --qu
%python_uninstall_alternative docutils
%files %{python_files}
%license COPYING.txt licenses/*.txt
%doc FAQ.txt HISTORY.txt README.txt THANKS.txt BUGS.txt docs/*
%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