Compare commits
No commits in common. "imports/c9/python-sphinx-3.4.3-7.el9" and "c8" have entirely different histories.
imports/c9
...
c8
2
.gitignore
vendored
2
.gitignore
vendored
@ -1 +1 @@
|
||||
SOURCES/Sphinx-3.4.3.tar.gz
|
||||
SOURCES/Sphinx-1.7.6.tar.gz
|
||||
|
||||
@ -1 +1 @@
|
||||
e72412976b8b47cb5a55cc1cb5ec2fdfe358ed7c SOURCES/Sphinx-3.4.3.tar.gz
|
||||
3caa8c2d3f9b283e32df259baee885c0340c5d02 SOURCES/Sphinx-1.7.6.tar.gz
|
||||
|
||||
149
SOURCES/fix-build-under-fips.patch
Normal file
149
SOURCES/fix-build-under-fips.patch
Normal file
@ -0,0 +1,149 @@
|
||||
diff --git a/sphinx/builders/html.py b/sphinx/builders/html.py
|
||||
index 8b63352..1a95c77 100644
|
||||
--- a/sphinx/builders/html.py
|
||||
+++ b/sphinx/builders/html.py
|
||||
@@ -14,7 +14,6 @@ import posixpath
|
||||
import re
|
||||
import sys
|
||||
import warnings
|
||||
-from hashlib import md5
|
||||
from os import path
|
||||
|
||||
import docutils
|
||||
@@ -40,7 +39,7 @@ from sphinx.highlighting import PygmentsBridge
|
||||
from sphinx.locale import _, __, l_
|
||||
from sphinx.search import js_index
|
||||
from sphinx.theming import HTMLThemeFactory
|
||||
-from sphinx.util import jsonimpl, logging, status_iterator
|
||||
+from sphinx.util import jsonimpl, logging, status_iterator, md5
|
||||
from sphinx.util.console import bold, darkgreen # type: ignore
|
||||
from sphinx.util.docutils import is_html5_writer_available, new_document
|
||||
from sphinx.util.fileutil import copy_asset
|
||||
diff --git a/sphinx/ext/graphviz.py b/sphinx/ext/graphviz.py
|
||||
index 08707b7..9d53a0e 100644
|
||||
--- a/sphinx/ext/graphviz.py
|
||||
+++ b/sphinx/ext/graphviz.py
|
||||
@@ -13,7 +13,6 @@
|
||||
import codecs
|
||||
import posixpath
|
||||
import re
|
||||
-from hashlib import sha1
|
||||
from os import path
|
||||
from subprocess import Popen, PIPE
|
||||
|
||||
@@ -25,7 +24,7 @@ from six import text_type
|
||||
import sphinx
|
||||
from sphinx.errors import SphinxError
|
||||
from sphinx.locale import _, __
|
||||
-from sphinx.util import logging
|
||||
+from sphinx.util import logging, sha1
|
||||
from sphinx.util.i18n import search_image_for_language
|
||||
from sphinx.util.osutil import ensuredir, ENOENT, EPIPE, EINVAL
|
||||
|
||||
diff --git a/sphinx/ext/imgmath.py b/sphinx/ext/imgmath.py
|
||||
index 5f9d7a1..23f89ed 100644
|
||||
--- a/sphinx/ext/imgmath.py
|
||||
+++ b/sphinx/ext/imgmath.py
|
||||
@@ -14,7 +14,6 @@ import posixpath
|
||||
import re
|
||||
import shutil
|
||||
import tempfile
|
||||
-from hashlib import sha1
|
||||
from os import path
|
||||
from subprocess import Popen, PIPE
|
||||
|
||||
@@ -26,7 +25,7 @@ from sphinx.errors import SphinxError, ExtensionError
|
||||
from sphinx.ext.mathbase import get_node_equation_number
|
||||
from sphinx.ext.mathbase import setup_math as mathbase_setup, wrap_displaymath
|
||||
from sphinx.locale import _
|
||||
-from sphinx.util import logging
|
||||
+from sphinx.util import logging, sha1
|
||||
from sphinx.util.osutil import ensuredir, ENOENT, cd
|
||||
from sphinx.util.png import read_png_depth, write_png_depth
|
||||
from sphinx.util.pycompat import sys_encoding
|
||||
diff --git a/sphinx/ext/inheritance_diagram.py b/sphinx/ext/inheritance_diagram.py
|
||||
index 14593ac..9576d07 100644
|
||||
--- a/sphinx/ext/inheritance_diagram.py
|
||||
+++ b/sphinx/ext/inheritance_diagram.py
|
||||
@@ -39,7 +39,6 @@ r"""
|
||||
import inspect
|
||||
import re
|
||||
import sys
|
||||
-from hashlib import md5
|
||||
|
||||
from docutils import nodes
|
||||
from docutils.parsers.rst import Directive, directives
|
||||
@@ -50,7 +49,7 @@ import sphinx
|
||||
from sphinx.ext.graphviz import render_dot_html, render_dot_latex, \
|
||||
render_dot_texinfo, figure_wrapper
|
||||
from sphinx.pycode import ModuleAnalyzer
|
||||
-from sphinx.util import force_decode
|
||||
+from sphinx.util import force_decode, md5
|
||||
|
||||
if False:
|
||||
# For type annotation
|
||||
diff --git a/sphinx/transforms/post_transforms/images.py b/sphinx/transforms/post_transforms/images.py
|
||||
index 6dd135e..d1c50bd 100644
|
||||
--- a/sphinx/transforms/post_transforms/images.py
|
||||
+++ b/sphinx/transforms/post_transforms/images.py
|
||||
@@ -10,14 +10,13 @@
|
||||
"""
|
||||
|
||||
import os
|
||||
-from hashlib import sha1
|
||||
from math import ceil
|
||||
|
||||
from docutils import nodes
|
||||
from six import text_type
|
||||
|
||||
from sphinx.transforms import SphinxTransform
|
||||
-from sphinx.util import epoch_to_rfc1123, rfc1123_to_epoch
|
||||
+from sphinx.util import epoch_to_rfc1123, rfc1123_to_epoch, sha1
|
||||
from sphinx.util import logging, requests
|
||||
from sphinx.util.images import guess_mimetype, get_image_extension, parse_data_uri
|
||||
from sphinx.util.osutil import ensuredir, movefile
|
||||
diff --git a/sphinx/util/__init__.py b/sphinx/util/__init__.py
|
||||
index dda3fb0..9c1c441 100644
|
||||
--- a/sphinx/util/__init__.py
|
||||
+++ b/sphinx/util/__init__.py
|
||||
@@ -11,6 +11,7 @@
|
||||
from __future__ import absolute_import
|
||||
|
||||
import fnmatch
|
||||
+import hashlib
|
||||
import os
|
||||
import posixpath
|
||||
import re
|
||||
@@ -164,6 +165,32 @@ class FilenameUniqDict(dict):
|
||||
# type: (Set[unicode]) -> None
|
||||
self._existing = state
|
||||
|
||||
+def md5(data=b'', **kwargs):
|
||||
+ """Wrapper around hashlib.md5
|
||||
+ Attempt call with 'usedforsecurity=False' if we get a ValueError, which happens when
|
||||
+ OpenSSL FIPS mode is enabled:
|
||||
+ ValueError: error:060800A3:digital envelope routines:EVP_DigestInit_ex:disabled for fips
|
||||
+ See: https://github.com/sphinx-doc/sphinx/issues/7611
|
||||
+ """
|
||||
+
|
||||
+ try:
|
||||
+ return hashlib.md5(data, **kwargs) # type: ignore
|
||||
+ except ValueError:
|
||||
+ return hashlib.md5(data, **kwargs, usedforsecurity=False) # type: ignore
|
||||
+
|
||||
+
|
||||
+def sha1(data=b'', **kwargs):
|
||||
+ """Wrapper around hashlib.sha1
|
||||
+ Attempt call with 'usedforsecurity=False' if we get a ValueError
|
||||
+ See: https://github.com/sphinx-doc/sphinx/issues/7611
|
||||
+ """
|
||||
+
|
||||
+ try:
|
||||
+ return hashlib.sha1(data, **kwargs) # type: ignore
|
||||
+ except ValueError:
|
||||
+ return hashlib.sha1(data, **kwargs, usedforsecurity=False) # type: ignore
|
||||
+
|
||||
+
|
||||
|
||||
def copy_static_entry(source, targetdir, builder, context={},
|
||||
exclude_matchers=(), level=0):
|
||||
@ -1,12 +0,0 @@
|
||||
diff -ru Sphinx-1.7.6/tests/test_theming.py Sphinx-1.7.6_patched/tests/test_theming.py
|
||||
--- Sphinx-1.7.6/tests/test_theming.py 2018-07-16 11:24:40.000000000 +0200
|
||||
+++ Sphinx-1.7.6_patched/tests/test_theming.py 2018-07-20 15:17:35.049263077 +0200
|
||||
@@ -31,7 +31,7 @@
|
||||
themes.append('alabaster')
|
||||
|
||||
# test Theme class API
|
||||
- assert set(app.html_themes.keys()) == set(themes)
|
||||
+ assert set(app.html_themes.keys()) >= set(themes)
|
||||
assert app.html_themes['test-theme'] == app.srcdir / 'test_theme' / 'test-theme'
|
||||
assert app.html_themes['ziptheme'] == app.srcdir / 'ziptheme.zip'
|
||||
assert app.html_themes['staticfiles'] == app.srcdir / 'test_theme' / 'staticfiles'
|
||||
13
SOURCES/xfail-test_latex_remote_images.patch
Normal file
13
SOURCES/xfail-test_latex_remote_images.patch
Normal file
@ -0,0 +1,13 @@
|
||||
diff --git a/tests/test_build_latex.py b/tests/test_build_latex.py
|
||||
index 55f48cd..78ccecd 100644
|
||||
--- a/tests/test_build_latex.py
|
||||
+++ b/tests/test_build_latex.py
|
||||
@@ -1009,7 +1009,7 @@ def test_latex_raw_directive(app, status, warning):
|
||||
assert 'HTML: abc ghi' in result
|
||||
assert 'LaTeX: abc def ghi' in result
|
||||
|
||||
-
|
||||
+@pytest.mark.xfail(reason="this test requires internet connection")
|
||||
@pytest.mark.sphinx('latex', testroot='images')
|
||||
def test_latex_remote_images(app, status, warning):
|
||||
app.builder.build_all()
|
||||
@ -1,108 +1,99 @@
|
||||
# When bootstrapping sphinx, we don't yet have sphinxcontrib-websupport
|
||||
# Without it we have warnings in docs, but it's not a hard dependency
|
||||
%bcond_without websupport
|
||||
# Also, we don't have all the tests requirements
|
||||
%bcond_without tests
|
||||
|
||||
# Unset -s on python shebang to allow RPM-installed sphinx to be used
|
||||
# with user-installed modules (#1903763)
|
||||
%global py3_shebang_flags %nil
|
||||
|
||||
# No internet in Koji
|
||||
%bcond_with internet
|
||||
|
||||
%if 0%{?rhel} > 7
|
||||
# Build without BuildRequires ImageMagick, to skip imgconverter tests
|
||||
%bcond_with imagemagick_tests
|
||||
%else
|
||||
%bcond_without imagemagick_tests
|
||||
%endif
|
||||
|
||||
# During texlive updates, sometimes the latex environment is unstable
|
||||
%bcond_without latex_tests
|
||||
|
||||
%global upstream_name Sphinx
|
||||
|
||||
Name: python-sphinx
|
||||
%global general_version 3.4.3
|
||||
#global prerel ...
|
||||
%global upstream_version %{general_version}%{?prerel}
|
||||
Version: %{general_version}%{?prerel:~%{prerel}}
|
||||
Release: 7%{?dist}
|
||||
Version: 1.7.6
|
||||
Release: 3%{?dist}
|
||||
Epoch: 1
|
||||
Summary: Python documentation generator
|
||||
|
||||
# Unless otherwise noted, the license for code is BSD
|
||||
# sphinx/util/inspect.py has bits licensed with PSF license v2 (Python)
|
||||
# sphinx/themes/haiku/static/haiku.css_t has bits licensed with MIT
|
||||
# JS: JQuery, Underscore, css3-mediaqueries are available under MIT
|
||||
License: BSD and Python and MIT
|
||||
# sphinx/util/stemmer.py Public Domain
|
||||
# sphinx/pycode/pgen2 Python
|
||||
# jquery (MIT or GPLv2)
|
||||
License: BSD and Public Domain and Python and (MIT or GPLv2)
|
||||
URL: http://sphinx-doc.org/
|
||||
Source0: https://files.pythonhosted.org/packages/source/S/%{upstream_name}/%{upstream_name}-%{version}.tar.gz
|
||||
|
||||
URL: https://www.sphinx-doc.org/
|
||||
Source0: %{pypi_source %{upstream_name} %{upstream_version}}
|
||||
# Make the test_latex_remote_images an expected failure
|
||||
# since it requires an active internet connection
|
||||
# to fetch images, which is not possible in koji or mock.
|
||||
Patch0: xfail-test_latex_remote_images.patch
|
||||
|
||||
# Allow extra themes to exist. We pull in python3-sphinx-theme-alabaster
|
||||
# which causes that test to fail.
|
||||
Patch1: sphinx-test_theming.diff
|
||||
# Building the documentation of other projects under FIPS mode
|
||||
# might fail in some cases due to the md5 algorithm being disabled.
|
||||
# Backport an upstream fix to resolve that:
|
||||
# https://github.com/sphinx-doc/sphinx/pull/7614
|
||||
Patch1: fix-build-under-fips.patch
|
||||
|
||||
BuildArch: noarch
|
||||
|
||||
BuildRequires: make
|
||||
BuildRequires: python%{python3_pkgversion}-devel
|
||||
BuildRequires: pyproject-rpm-macros
|
||||
|
||||
%if %{with websupport}
|
||||
BuildRequires: python%{python3_pkgversion}-sphinxcontrib-websupport
|
||||
%endif
|
||||
|
||||
# for fixes
|
||||
BuildRequires: dos2unix
|
||||
|
||||
%if %{with tests}
|
||||
# tests import _testcapi
|
||||
BuildRequires: python%{python3_pkgversion}-test
|
||||
|
||||
BuildRequires: gcc
|
||||
# for testing
|
||||
BuildRequires: gettext
|
||||
BuildRequires: graphviz
|
||||
BuildRequires: texinfo
|
||||
|
||||
BuildRequires: graphviz
|
||||
%if %{with imagemagick_tests}
|
||||
BuildRequires: ImageMagick
|
||||
%endif
|
||||
|
||||
%if %{with latex_tests}
|
||||
BuildRequires: texlive-collection-fontsrecommended
|
||||
BuildRequires: texlive-collection-latex
|
||||
BuildRequires: texlive-dvipng
|
||||
BuildRequires: texlive-dvisvgm
|
||||
BuildRequires: texlive-ucs
|
||||
BuildRequires: tex(cmap.sty)
|
||||
BuildRequires: tex(ecrm1000.tfm)
|
||||
BuildRequires: tex(footnote.sty)
|
||||
BuildRequires: tex(framed.sty)
|
||||
BuildRequires: tex(multirow.sty)
|
||||
BuildRequires: tex(parskip.sty)
|
||||
BuildRequires: tex(titlesec.sty)
|
||||
BuildRequires: tex(threeparttable.sty)
|
||||
BuildRequires: tex(upquote.sty)
|
||||
BuildRequires: tex(wrapfig.sty)
|
||||
BuildRequires: tex(capt-of.sty)
|
||||
BuildRequires: tex(needspace.sty)
|
||||
BuildRequires: tex(eqparbox.sty)
|
||||
BuildRequires: tex(amsmath.sty)
|
||||
BuildRequires: tex(amsthm.sty)
|
||||
BuildRequires: tex(amssymb.sty)
|
||||
BuildRequires: tex(amsfonts.sty)
|
||||
BuildRequires: tex(bm.sty)
|
||||
BuildRequires: tex(palatino.sty)
|
||||
BuildRequires: tex(multirow.sty)
|
||||
BuildRequires: tex(eqparbox.sty)
|
||||
BuildRequires: tex(atbegshi.sty)
|
||||
BuildRequires: tex(anyfontsize.sty)
|
||||
BuildRequires: tex(article.cls)
|
||||
BuildRequires: tex(capt-of.sty)
|
||||
BuildRequires: tex(cmap.sty)
|
||||
BuildRequires: tex(color.sty)
|
||||
BuildRequires: tex(ctablestack.sty)
|
||||
BuildRequires: tex(fancyhdr.sty)
|
||||
BuildRequires: tex(fancyvrb.sty)
|
||||
BuildRequires: tex(fncychap.sty)
|
||||
BuildRequires: tex(framed.sty)
|
||||
BuildRequires: tex(FreeSerif.otf)
|
||||
BuildRequires: tex(geometry.sty)
|
||||
BuildRequires: tex(hyperref.sty)
|
||||
BuildRequires: tex(kvoptions.sty)
|
||||
BuildRequires: tex(luatex85.sty)
|
||||
BuildRequires: tex(needspace.sty)
|
||||
BuildRequires: tex(parskip.sty)
|
||||
BuildRequires: tex(polyglossia.sty)
|
||||
BuildRequires: tex(fncychap.sty)
|
||||
BuildRequires: tex(tabulary.sty)
|
||||
BuildRequires: tex(titlesec.sty)
|
||||
BuildRequires: tex(upquote.sty)
|
||||
BuildRequires: tex(utf8x.def)
|
||||
BuildRequires: tex(wrapfig.sty)
|
||||
%endif
|
||||
%endif
|
||||
BuildRequires: tex(polyglossia.sty)
|
||||
BuildRequires: tex(ctablestack.sty)
|
||||
BuildRequires: tex(eu1enc.def)
|
||||
|
||||
BuildRequires: python3-devel
|
||||
BuildRequires: python3-babel
|
||||
BuildRequires: python3-setuptools
|
||||
BuildRequires: python3-docutils
|
||||
BuildRequires: python3-jinja2
|
||||
BuildRequires: python3-pygments
|
||||
BuildRequires: python3-nose
|
||||
BuildRequires: python3-pytest
|
||||
BuildRequires: python3-mock
|
||||
BuildRequires: python3-html5lib
|
||||
BuildRequires: python3-whoosh
|
||||
BuildRequires: python3-snowballstemmer
|
||||
BuildRequires: python3-six
|
||||
BuildRequires: python3-sphinx_rtd_theme
|
||||
BuildRequires: python3-sphinx-theme-alabaster
|
||||
BuildRequires: python3-sphinxcontrib-websupport
|
||||
BuildRequires: python3-packaging
|
||||
BuildRequires: python3-imagesize
|
||||
BuildRequires: python3-requests
|
||||
|
||||
|
||||
%description
|
||||
@ -134,22 +125,38 @@ the Python docs:
|
||||
snippets and inclusion of appropriately formatted docstrings.
|
||||
|
||||
|
||||
%package -n python%{python3_pkgversion}-sphinx
|
||||
%package -n python2-sphinx
|
||||
Summary: Python documentation generator
|
||||
|
||||
Requires: python-sphinx-locale = %{?epoch}:%{version}-%{release}
|
||||
Requires: python2-babel
|
||||
Requires: python2-docutils
|
||||
Requires: python2-jinja2
|
||||
Requires: python2-pygments
|
||||
Requires: python2-mock
|
||||
Requires: python2-snowballstemmer
|
||||
Requires: python2-sphinx_rtd_theme
|
||||
Requires: python2-six
|
||||
Requires: python2-sphinx-theme-alabaster
|
||||
Requires: python2-imagesize
|
||||
Requires: python2-requests
|
||||
Requires: python2-packaging
|
||||
Requires: python2-typing
|
||||
Requires: environment(modules)
|
||||
# Needed to get rid of the alternatives config installed in f24 and f25
|
||||
# versions of the package
|
||||
Requires(pre): /usr/sbin/alternatives
|
||||
Recommends: graphviz
|
||||
Recommends: ImageMagick
|
||||
Obsoletes: python-sphinx <= 1.2.3
|
||||
Obsoletes: python-sphinxcontrib-napoleon < 0.5
|
||||
Provides: python-sphinxcontrib-napoleon = %{?epoch}:%{version}-%{release}
|
||||
Obsoletes: python2-Sphinx <= 1.3.1-4
|
||||
Provides: python2-Sphinx = %{?epoch}:%{version}-%{release}
|
||||
Provides: python(Sphinx) = %{?epoch}:%{version}-%{release}
|
||||
%{?python_provide:%python_provide python2-sphinx}
|
||||
Conflicts: python3-sphinx < %{?epoch}:%{version}-%{release}
|
||||
|
||||
# Bundled JavaScript
|
||||
Provides: bundled(jquery) = 3.5.1
|
||||
Provides: bundled(underscore) = 1.3.1
|
||||
Provides: bundled(css3-mediaqueries) = 1.0
|
||||
|
||||
# Obsolete and provide the locale package for a clean upgrade path from RHEL 8->9
|
||||
Obsoletes: python-sphinx-locale < 1:2
|
||||
Provides: python-sphinx-locale = %{epoch}:%{version}-%{release}
|
||||
|
||||
%description -n python%{python3_pkgversion}-sphinx
|
||||
%description -n python2-sphinx
|
||||
Sphinx is a tool that makes it easy to create intelligent and
|
||||
beautiful documentation for Python projects (or other documents
|
||||
consisting of multiple reStructuredText sources), written by Georg
|
||||
@ -178,44 +185,46 @@ the Python docs:
|
||||
snippets and inclusion of appropriately formatted docstrings.
|
||||
|
||||
|
||||
%package -n python%{python3_pkgversion}-sphinx-latex
|
||||
Summary: LaTeX builder dependencies for python%{python3_pkgversion}-sphinx
|
||||
|
||||
Requires: python%{python3_pkgversion}-sphinx = %{epoch}:%{version}-%{release}
|
||||
%package latex
|
||||
Summary: LaTeX builder dependencies for %{name}
|
||||
Requires: python(Sphinx) = %{?epoch}:%{version}-%{release}
|
||||
Requires: texlive-collection-fontsrecommended
|
||||
Requires: texlive-collection-latex
|
||||
Requires: texlive-dvipng
|
||||
Requires: texlive-dvisvgm
|
||||
Requires: texlive-ucs
|
||||
Requires: tex(cmap.sty)
|
||||
Requires: tex(ecrm1000.tfm)
|
||||
Requires: tex(footnote.sty)
|
||||
Requires: tex(framed.sty)
|
||||
Requires: tex(multirow.sty)
|
||||
Requires: tex(parskip.sty)
|
||||
Requires: tex(titlesec.sty)
|
||||
Requires: tex(threeparttable.sty)
|
||||
Requires: tex(upquote.sty)
|
||||
Requires: tex(wrapfig.sty)
|
||||
Requires: tex(capt-of.sty)
|
||||
Requires: tex(needspace.sty)
|
||||
Requires: tex(eqparbox.sty)
|
||||
Requires: tex(amsmath.sty)
|
||||
Requires: tex(amsthm.sty)
|
||||
Requires: tex(amssymb.sty)
|
||||
Requires: tex(amsfonts.sty)
|
||||
Requires: tex(bm.sty)
|
||||
Requires: tex(palatino.sty)
|
||||
Requires: tex(multirow.sty)
|
||||
Requires: tex(eqparbox.sty)
|
||||
Requires: tex(atbegshi.sty)
|
||||
Requires: tex(anyfontsize.sty)
|
||||
Requires: tex(article.cls)
|
||||
Requires: tex(capt-of.sty)
|
||||
Requires: tex(cmap.sty)
|
||||
Requires: tex(color.sty)
|
||||
Requires: tex(ctablestack.sty)
|
||||
Requires: tex(fancyhdr.sty)
|
||||
Requires: tex(fancyvrb.sty)
|
||||
Requires: tex(fncychap.sty)
|
||||
Requires: tex(framed.sty)
|
||||
Requires: tex(FreeSerif.otf)
|
||||
Requires: tex(geometry.sty)
|
||||
Requires: tex(hyperref.sty)
|
||||
Requires: tex(kvoptions.sty)
|
||||
Requires: tex(luatex85.sty)
|
||||
Requires: tex(needspace.sty)
|
||||
Requires: tex(parskip.sty)
|
||||
Requires: tex(polyglossia.sty)
|
||||
Requires: tex(fncychap.sty)
|
||||
Requires: tex(tabulary.sty)
|
||||
Requires: tex(titlesec.sty)
|
||||
Requires: tex(upquote.sty)
|
||||
Requires: tex(utf8x.def)
|
||||
Requires: tex(wrapfig.sty)
|
||||
Requires: tex(polyglossia.sty)
|
||||
Requires: tex(ctablestack.sty)
|
||||
Requires: tex(eu1enc.def)
|
||||
Obsoletes: python3-sphinx-latex < 1.4.4-2
|
||||
|
||||
# No files in this package, automatic provides don't work:
|
||||
%py_provides python%{python3_pkgversion}-sphinx-latex
|
||||
|
||||
%description -n python%{python3_pkgversion}-sphinx-latex
|
||||
%description latex
|
||||
Sphinx is a tool that makes it easy to create intelligent and
|
||||
beautiful documentation for Python projects (or other documents
|
||||
consisting of multiple reStructuredText sources), written by Georg
|
||||
@ -227,10 +236,69 @@ This package pulls in the TeX dependencies needed by Sphinx's LaTeX
|
||||
builder.
|
||||
|
||||
|
||||
%package -n python3-sphinx
|
||||
Summary: Python documentation generator
|
||||
Group: Development/Tools
|
||||
Requires: python-sphinx-locale = %{?epoch}:%{version}-%{release}
|
||||
Requires: python3-babel
|
||||
Requires: python3-docutils
|
||||
Requires: python3-jinja2
|
||||
Requires: python3-pygments
|
||||
Requires: python3-mock
|
||||
Requires: python3-snowballstemmer
|
||||
Requires: python3-sphinx_rtd_theme
|
||||
Requires: python3-sphinx-theme-alabaster
|
||||
Requires: python3-sphinxcontrib-websupport
|
||||
Requires: python3-imagesize
|
||||
Requires: python3-requests
|
||||
Requires: python3-six
|
||||
Requires: python3-packaging
|
||||
Recommends: graphviz
|
||||
Recommends: ImageMagick
|
||||
Requires: environment(modules)
|
||||
# Needed to get rid of the alternatives config installed in f24 and f25
|
||||
# versions of the package
|
||||
Requires(pre): /usr/sbin/alternatives
|
||||
Obsoletes: python3-sphinxcontrib-napoleon < 0.3.0
|
||||
Provides: python3-sphinxcontrib-napoleon = %{?epoch}:%{version}-%{release}
|
||||
Provides: python(Sphinx) = %{?epoch}:%{version}-%{release}
|
||||
%{?python_provide:%python_provide python3-sphinx}
|
||||
Conflicts: python2-Sphinx < %{?epoch}:%{version}-%{release}
|
||||
|
||||
%description -n python3-sphinx
|
||||
Sphinx is a tool that makes it easy to create intelligent and
|
||||
beautiful documentation for Python projects (or other documents
|
||||
consisting of multiple reStructuredText sources), written by Georg
|
||||
Brandl. It was originally created to translate the new Python
|
||||
documentation, but has now been cleaned up in the hope that it will be
|
||||
useful to many other projects.
|
||||
|
||||
Sphinx uses reStructuredText as its markup language, and many of its
|
||||
strengths come from the power and straightforwardness of
|
||||
reStructuredText and its parsing and translating suite, the Docutils.
|
||||
|
||||
Although it is still under constant development, the following
|
||||
features are already present, work fine and can be seen "in action" in
|
||||
the Python docs:
|
||||
|
||||
* Output formats: HTML (including Windows HTML Help) and LaTeX,
|
||||
for printable PDF versions
|
||||
* Extensive cross-references: semantic markup and automatic links
|
||||
for functions, classes, glossary terms and similar pieces of
|
||||
information
|
||||
* Hierarchical structure: easy definition of a document tree, with
|
||||
automatic links to siblings, parents and children
|
||||
* Automatic indices: general index as well as a module index
|
||||
* Code handling: automatic highlighting using the Pygments highlighter
|
||||
* Various extensions are available, e.g. for automatic testing of
|
||||
snippets and inclusion of appropriately formatted docstrings.
|
||||
|
||||
|
||||
%package doc
|
||||
Summary: Documentation for %{name}
|
||||
Group: Documentation
|
||||
License: BSD
|
||||
Recommends: python%{python3_pkgversion}-sphinx = %{epoch}:%{version}-%{release}
|
||||
Recommends: python(Sphinx) = %{?epoch}:%{version}-%{release}
|
||||
|
||||
%description doc
|
||||
Sphinx is a tool that makes it easy to create intelligent and
|
||||
@ -243,37 +311,37 @@ useful to many other projects.
|
||||
This package contains documentation in reST and HTML formats.
|
||||
|
||||
|
||||
%package locale
|
||||
Summary: Locale files for %{name}
|
||||
Group: Development/Tools
|
||||
License: BSD
|
||||
|
||||
%description locale
|
||||
Sphinx is a tool that makes it easy to create intelligent and
|
||||
beautiful documentation for Python projects (or other documents
|
||||
consisting of multiple reStructuredText sources), written by Georg
|
||||
Brandl. It was originally created to translate the new Python
|
||||
documentation, but has now been cleaned up in the hope that it will be
|
||||
useful to many other projects.
|
||||
|
||||
This package contains locale files for Sphinx
|
||||
|
||||
%prep
|
||||
%autosetup -n %{upstream_name}-%{upstream_version} -p1
|
||||
%autosetup -n %{upstream_name}-%{version}%{?prerel} -p1
|
||||
|
||||
# fix line encoding of bundled jquery.js
|
||||
dos2unix -k ./sphinx/themes/basic/static/jquery.js
|
||||
|
||||
%if %{without imagemagick_tests}
|
||||
%if ! %{with imagemagick_tests}
|
||||
rm tests/test_ext_imgconverter.py
|
||||
%endif
|
||||
|
||||
# Don't measure coverage:
|
||||
sed -i '/pytest-cov/d' setup.py
|
||||
# Not needed on recent Pythons, https://github.com/sphinx-doc/sphinx/pull/8483
|
||||
sed -i '/typed_ast/d' setup.py
|
||||
# unwanted dependency in RHEL, https://bugzilla.redhat.com/show_bug.cgi?id=1945182
|
||||
sed -i '/html5lib/d' setup.py
|
||||
|
||||
# Fix broken links in the bundled underscore.js library
|
||||
sed -i 's|http://documentcloud.github.com/underscore|https://underscorejs.org|' \
|
||||
./sphinx/themes/basic/static/underscore*
|
||||
|
||||
%generate_buildrequires
|
||||
%pyproject_buildrequires %{?with_tests:-x test}
|
||||
|
||||
|
||||
%build
|
||||
%pyproject_wheel
|
||||
%py3_build
|
||||
|
||||
export PYTHONPATH=$PWD
|
||||
pushd doc
|
||||
export SPHINXBUILD="%{python3} ../sphinx/cmd/build.py"
|
||||
export SPHINXBUILD="%{__python3} ../sphinx/cmd/build.py"
|
||||
make html SPHINXBUILD="$SPHINXBUILD"
|
||||
make man SPHINXBUILD="$SPHINXBUILD"
|
||||
rm -rf _build/html/.buildinfo
|
||||
@ -282,18 +350,16 @@ popd
|
||||
|
||||
|
||||
%install
|
||||
%pyproject_install
|
||||
%py3_install
|
||||
|
||||
# For backwards compatibility. Remove with care, if at all
|
||||
# we keep this for backwards compatibility with Fedora:
|
||||
install -d %{buildroot}%{_libexecdir}/python3-sphinx
|
||||
for i in sphinx-{apidoc,autogen,build,quickstart}; do
|
||||
ln -s %{_bindir}/$i %{buildroot}%{_bindir}/$i-%{python3_version}
|
||||
ln -s %{_bindir}/$i %{buildroot}%{_bindir}/$i-3
|
||||
ln -s $i %{buildroot}%{_bindir}/$i-%{python3_version}
|
||||
ln -s $i %{buildroot}%{_bindir}/$i-3
|
||||
ln -s %{_bindir}/$i %{buildroot}%{_libexecdir}/python3-sphinx/$i
|
||||
done
|
||||
|
||||
# Clean up non-python files
|
||||
rm -f %{buildroot}%{python3_sitelib}/sphinx/locale/.DS_Store
|
||||
rm -rf %{buildroot}%{python3_sitelib}/sphinx/locale/.tx
|
||||
|
||||
pushd doc
|
||||
# Deliver man pages
|
||||
install -d %{buildroot}%{_mandir}/man1
|
||||
@ -303,19 +369,21 @@ do
|
||||
done
|
||||
popd
|
||||
|
||||
rm -f %{buildroot}%{python3_sitelib}/sphinx/locale/.DS_Store
|
||||
rm -rf %{buildroot}%{python3_sitelib}/sphinx/locale/.tx
|
||||
|
||||
# Deliver rst files
|
||||
rm -rf doc/_build
|
||||
sed -i 's|python ../sphinx-build.py|/usr/bin/sphinx-build|' doc/Makefile
|
||||
mv doc reST
|
||||
rm reST/make.bat
|
||||
|
||||
# Move language files to /usr/share;
|
||||
# patch to support this incorporated in 0.6.6
|
||||
pushd %{buildroot}%{python3_sitelib}
|
||||
|
||||
for lang in `find sphinx/locale -maxdepth 1 -mindepth 1 -type d -not -path '*/\.*' -printf "%f "`;
|
||||
|
||||
for lang in `find sphinx/locale -maxdepth 1 -mindepth 1 -type d -not -path '*/\.*' -not -name __pycache__ -printf "%f "`;
|
||||
do
|
||||
test $lang == __pycache__ && continue
|
||||
install -d %{buildroot}%{_datadir}/sphinx/locale/$lang
|
||||
install -d %{buildroot}%{_datadir}/locale/$lang/LC_MESSAGES
|
||||
mv sphinx/locale/$lang/LC_MESSAGES/sphinx.js \
|
||||
@ -326,10 +394,6 @@ do
|
||||
done
|
||||
popd
|
||||
|
||||
# Create the sphinxcontrib directory, so we can own it
|
||||
# See https://bugzilla.redhat.com/show_bug.cgi?id=1669790 for rationale
|
||||
mkdir %{buildroot}%{python3_sitelib}/sphinxcontrib
|
||||
|
||||
%find_lang sphinx
|
||||
|
||||
# Language files; Since these are javascript, it's not immediately obvious to
|
||||
@ -338,180 +402,63 @@ mkdir %{buildroot}%{python3_sitelib}/sphinxcontrib
|
||||
's:\(.*/locale/\)\([^/_]\+\)\(.*\.js$\):%lang(\2) \1\2\3:' \
|
||||
>> sphinx.lang
|
||||
|
||||
|
||||
%if %{with tests}
|
||||
%check
|
||||
# Currently, all linkcheck tests and test_latex_images need internet
|
||||
# Ignored files use html5lib
|
||||
%pytest \
|
||||
--ignore tests/test_build_html.py \
|
||||
--ignore tests/test_build_latex.py \
|
||||
--ignore tests/test_build_texinfo.py \
|
||||
--ignore tests/test_domain_std.py \
|
||||
%if %{without internet}
|
||||
-k "not linkcheck and not test_latex_images" \
|
||||
%endif
|
||||
;
|
||||
%endif
|
||||
# Currently, all linkcheck tests hit external websites. Since network access
|
||||
# is disabled in koji, we have to disable these.
|
||||
rm tests/test_build_linkcheck.py
|
||||
PYTHON=python3 make test
|
||||
|
||||
|
||||
%files -n python%{python3_pkgversion}-sphinx -f sphinx.lang
|
||||
%files latex
|
||||
%license LICENSE
|
||||
|
||||
%files locale -f sphinx.lang
|
||||
%license LICENSE
|
||||
%dir %{_datadir}/sphinx/
|
||||
%dir %{_datadir}/sphinx/locale
|
||||
%dir %{_datadir}/sphinx/locale/*
|
||||
|
||||
%files -n python3-sphinx
|
||||
%license LICENSE
|
||||
%doc AUTHORS CHANGES EXAMPLES README.rst
|
||||
%{_bindir}/sphinx-*
|
||||
%{python3_sitelib}/sphinx/
|
||||
%dir %{python3_sitelib}/sphinxcontrib/
|
||||
%{python3_sitelib}/Sphinx-%{upstream_version}.dist-info/
|
||||
%dir %{_datadir}/sphinx/
|
||||
%dir %{_datadir}/sphinx/locale
|
||||
%dir %{_datadir}/sphinx/locale/*
|
||||
%{_mandir}/man1/sphinx-*
|
||||
|
||||
|
||||
%files -n python%{python3_pkgversion}-sphinx-latex
|
||||
# empty, this is a metapackage
|
||||
|
||||
%{python3_sitelib}/Sphinx-%{version}-py%{python3_version}.egg-info/
|
||||
%{_libexecdir}/python3-sphinx/
|
||||
%{_mandir}/man1/sphinx-*.1*
|
||||
|
||||
%files doc
|
||||
%license LICENSE
|
||||
%doc html reST
|
||||
|
||||
|
||||
%changelog
|
||||
* Fri Oct 08 2021 Charalampos Stratakis <cstratak@redhat.com> - 1:3.4.3-7
|
||||
- Obsolete and provide the python-sphinx-locale package to fix the upgrade path
|
||||
Related: rhbz#1985219
|
||||
* Tue Jul 26 2022 Tomas Orsava <torsava@redhat.com> - 1.7.6-3
|
||||
- Rebuild to include the python-sphinx-latex package in the CodeReady Linux
|
||||
Builder (CRB) repository
|
||||
Resolves: rhbz#2081785
|
||||
|
||||
* Wed Oct 06 2021 Charalampos Stratakis <cstratak@redhat.com> - 1:3.4.3-6
|
||||
- Fix broken links in the bundled underscore.js library
|
||||
Resolves: rhbz#1985219
|
||||
* Wed Oct 14 2020 Charalampos Stratakis <cstratak@redhat.com> - 1:1.7.6-2
|
||||
- Fix documentation build under FIPS mode
|
||||
Resolves: rhbz#1749346
|
||||
|
||||
* Tue Aug 10 2021 Mohan Boddu <mboddu@redhat.com> - 1:3.4.3-5
|
||||
- Rebuilt for IMA sigs, glibc 2.34, aarch64 flags
|
||||
Related: rhbz#1991688
|
||||
|
||||
* Fri Apr 16 2021 Mohan Boddu <mboddu@redhat.com> - 1:3.4.3-4
|
||||
- Rebuilt for RHEL 9 BETA on Apr 15th 2021. Related: rhbz#1947937
|
||||
|
||||
* Wed Mar 31 2021 Miro Hrončok <mhroncok@redhat.com> - 1:3.4.3-3
|
||||
- Remove a dependency on html5lib
|
||||
Resolves: rhbz#1945182
|
||||
|
||||
* Wed Jan 27 2021 Fedora Release Engineering <releng@fedoraproject.org> - 1:3.4.3-2
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild
|
||||
|
||||
* Tue Jan 19 2021 Charalampos Stratakis <cstratak@redhat.com> - 1:3.4.3-1
|
||||
- Update to 3.4.3
|
||||
- Fixes rhbz#1909494
|
||||
|
||||
* Sat Dec 05 2020 Mattia Verga <mattia.verga@protonmail.com> - 1:3.3.1-2
|
||||
- Unset -s from python shebang
|
||||
- Fixes: rhbz#1903763
|
||||
|
||||
* Mon Nov 23 2020 Miro Hrončok <mhroncok@redhat.com> - 1:3.3.1-1
|
||||
- Update to 3.3.1
|
||||
- Fixes: rhbz#1893752
|
||||
|
||||
* Wed Oct 14 2020 Tomas Hrnciar <thrnciar@redhat.com> - 1:3.2.1-2
|
||||
- Backport commit to fix python-sphinx with python-pygments v2.7.1
|
||||
|
||||
* Tue Aug 18 2020 Miro Hrončok <mhroncok@redhat.com> - 1:3.2.1-1
|
||||
- Update to 3.2.1
|
||||
- Remove compatibility symbolic links from /usr/libexec/
|
||||
- Fixes rhbz#1867294
|
||||
|
||||
* Fri Aug 07 2020 Miro Hrončok <mhroncok@redhat.com> - 1:3.1.2-1
|
||||
- Update to 3.1.2
|
||||
- Fixes rhbz#1853901
|
||||
|
||||
* Wed Jul 29 2020 Fedora Release Engineering <releng@fedoraproject.org> - 1:3.1.1-2
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild
|
||||
|
||||
* Tue Jun 30 2020 Charalampos Stratakis <cstratak@redhat.com> - 1:3.1.1-1
|
||||
- Update to 3.1.1 (#1783776)
|
||||
|
||||
* Sat May 23 2020 Miro Hrončok <mhroncok@redhat.com> - 1:2.2.2-4
|
||||
- Rebuilt for Python 3.9
|
||||
|
||||
* Fri May 22 2020 Miro Hrončok <mhroncok@redhat.com> - 1:2.2.2-3
|
||||
- Bootstrap for Python 3.9
|
||||
|
||||
* Thu Jan 30 2020 Fedora Release Engineering <releng@fedoraproject.org> - 1:2.2.2-2
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild
|
||||
|
||||
* Tue Dec 10 2019 Miro Hrončok <mhroncok@redhat.com> - 1:2.2.2-1
|
||||
- Update to 2.2.2 (rhbz#1743018)
|
||||
|
||||
* Thu Oct 03 2019 Miro Hrončok <mhroncok@redhat.com> - 1:2.1.2-6
|
||||
- Rebuilt for Python 3.8.0rc1 (#1748018)
|
||||
|
||||
* Fri Aug 16 2019 Miro Hrončok <mhroncok@redhat.com> - 1:2.1.2-5
|
||||
- Rebuilt for Python 3.8
|
||||
|
||||
* Thu Aug 15 2019 Miro Hrončok <mhroncok@redhat.com> - 1:2.1.2-4
|
||||
- Bootstrap for Python 3.8
|
||||
|
||||
* Thu Aug 15 2019 Richard Shaw <hobbes1069@gmail.com> - 1:2.1.2-3
|
||||
- Rebuild for Python 3.8.
|
||||
|
||||
* Fri Jul 26 2019 Fedora Release Engineering <releng@fedoraproject.org> - 1:2.1.2-2
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild
|
||||
|
||||
* Sun Jun 23 2019 Miro Hrončok <mhroncok@redhat.com> - 1:2.1.2-1
|
||||
- Update to 2.1.2 (#1716158)
|
||||
|
||||
* Wed Apr 10 2019 Miro Hrončok <mhroncok@redhat.com> - 1:2.0.1-1
|
||||
- Update to 2.0.1 (#1697544)
|
||||
- Own the sphinxcontrib directory (#1669790)
|
||||
|
||||
* Wed Mar 27 2019 Charalampos Stratakis <cstratak@redhat.com> - 1:2.0.0~b2-1
|
||||
- Update to 2.0.0b2
|
||||
|
||||
* Wed Feb 27 2019 Miro Hrončok <mhroncok@redhat.com> - 1:2.0.0~b1-1
|
||||
- Update to 2.0.0b1
|
||||
- Drop Python 2 package
|
||||
- https://fedoraproject.org/wiki/Changes/Sphinx2
|
||||
|
||||
* Thu Feb 07 2019 Alfredo Moralejo <amoralej@redhat.com> - 1:1.8.4-1
|
||||
- Update to 1.8.4.
|
||||
|
||||
* Sat Feb 02 2019 Fedora Release Engineering <releng@fedoraproject.org> - 1:1.7.6-3
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild
|
||||
|
||||
* Sun Nov 18 2018 Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> - 1:1.7.6-2
|
||||
- Drop explicit locale setting for python3, use C.UTF-8 for python2
|
||||
See https://fedoraproject.org/wiki/Changes/Remove_glibc-langpacks-all_from_buildroot
|
||||
|
||||
* Mon Jul 23 2018 Marcel Plch <mplch@redhat.com> - 1:1.7.6-1
|
||||
* Thu Jul 19 2018 Charalampos Stratakis <cstratak@redhat.com> - 1:1.7.6-1
|
||||
- Update to 1.7.6
|
||||
|
||||
* Fri Jul 13 2018 Miro Hrončok <mhroncok@redhat.com> - 1:1.7.5-6
|
||||
- Remove unused dependencies on xapian and simplejson
|
||||
|
||||
* Thu Jul 5 2018 Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> - 1:1.7.5-5
|
||||
- Add patch to fix build if alabaster theme is installed
|
||||
- Add patch for #1589868
|
||||
|
||||
* Mon Jul 02 2018 Miro Hrončok <mhroncok@redhat.com> - 1:1.7.5-4
|
||||
- Enable tests
|
||||
|
||||
* Mon Jul 02 2018 Miro Hrončok <mhroncok@redhat.com> - 1:1.7.5-3
|
||||
- Enable websupport
|
||||
|
||||
* Mon Jul 02 2018 Miro Hrončok <mhroncok@redhat.com> - 1:1.7.5-2
|
||||
- Rebuilt for Python 3.7
|
||||
* Wed Jun 20 2018 Petr Viktorin <pviktori@redhat.com> - 1:1.7.5-1
|
||||
- Remove unused simplejson dependency
|
||||
|
||||
* Tue Jun 19 2018 Charalampos Stratakis <cstratak@redhat.com> - 1:1.7.5-1
|
||||
- Update to 1.7.5 (bz#1570451)
|
||||
|
||||
* Mon Jun 18 2018 Miro Hrončok <mhroncok@redhat.com> - 1:1.7.2-5
|
||||
- Rebuilt for Python 3.7
|
||||
* Tue Jun 19 2018 Charalampos Stratakis <cstratak@redhat.com> - 1:1.7.2-5
|
||||
- Remove the python-pytest-cov dependency
|
||||
|
||||
* Fri Jun 15 2018 Miro Hrončok <mhroncok@redhat.com> - 1:1.7.2-4
|
||||
- Bootstrap for Python 3.7
|
||||
* Wed Jun 13 2018 Miro Hrončok <mhroncok@redhat.com> - 1:1.7.2-4
|
||||
- Remove python2 subpackage
|
||||
- Require python3-sphinxcontrib-websupport
|
||||
|
||||
* Thu Jun 14 2018 Miro Hrončok <mhroncok@redhat.com> - 1:1.7.2-3
|
||||
- Bootstrap for Python 3.7
|
||||
* Thu Jun 07 2018 Petr Viktorin <pviktori@redhat.com> - 1:1.7.2-3
|
||||
- Remove hard dependencies on sphinxcontrib-websupport and sqlalchemy
|
||||
|
||||
* Wed Apr 11 2018 Petr Viktorin <pviktori@redhat.com> - 1:1.7.2-2
|
||||
- Conditionalize the ImageMagick build dependency & tests
|
||||
|
||||
Loading…
Reference in New Issue
Block a user