#24 Update to 3.3.1, Remove old Obsoletes, Provides and Conflicts, Convert to pyproject macros
Merged 3 years ago by churchyard. Opened 3 years ago by churchyard.
rpms/ churchyard/python-sphinx 3.3.1  into  master

file modified
+1
@@ -25,3 +25,4 @@ 

  /Sphinx-3.1.1.tar.gz

  /Sphinx-3.1.2.tar.gz

  /Sphinx-3.2.1.tar.gz

+ /Sphinx-3.3.1.tar.gz

@@ -1,36 +0,0 @@ 

- From 85b24a2e88ea71edc728aff3b078d34c2f374f06 Mon Sep 17 00:00:00 2001

- From: Takeshi KOMIYA <i.tkomiya@gmail.com>

- Date: Sun, 13 Sep 2020 09:16:32 +0900

- Subject: [PATCH] Fix our test failed with pygments-2.7.0

- 

- Since pygments-2.7.0, it has changed the style of output HTML.

- That makes our test broken.  This fixes it to pass with new pygments.

- ---

-  tests/test_build_html.py | 8 +++++++-

-  1 file changed, 7 insertions(+), 1 deletion(-)

- 

- diff --git a/tests/test_build_html.py b/tests/test_build_html.py

- index e949f11572..1efc6c14a6 100644

- --- a/tests/test_build_html.py

- +++ b/tests/test_build_html.py

- @@ -10,8 +10,10 @@

-  

-  import os

-  import re

- +from distutils.version import LooseVersion

-  from itertools import cycle, chain

-  

- +import pygments

-  import pytest

-  from html5lib import HTMLParser

-  

- @@ -1591,4 +1593,8 @@ def test_html_codeblock_linenos_style_inline(app):

-      app.build()

-      content = (app.outdir / 'index.html').read_text()

-  

- -    assert '<span class="lineno">1 </span>' in content

- +    pygments_version = tuple(LooseVersion(pygments.__version__).version)

- +    if pygments_version > (2, 7):

- +        assert '<span class="linenos">1</span>' in content

- +    else:

- +        assert '<span class="lineno">1 </span>' in content

file modified
+24 -48
@@ -21,11 +21,11 @@ 

  %global upstream_name Sphinx

  

  Name:       python-sphinx

- %global     general_version 3.2.1

+ %global     general_version 3.3.1

  #global     prerel ...

  %global     upstream_version %{general_version}%{?prerel}

  Version:    %{general_version}%{?prerel:~%{prerel}}

- Release:    2%{?dist}

+ Release:    1%{?dist}

  Epoch:      1

  Summary:    Python documentation generator

  
@@ -42,30 +42,10 @@ 

  # which causes that test to fail.

  Patch1:     sphinx-test_theming.diff

  

- # Latest version of python-pygments (2.7.1) breaks python-sphinx.

- # It is already fixed in upstream and this patch can be removed

- # once new version of python-sphinx is released.

- Patch2:     https://github.com/sphinx-doc/sphinx/commit/85b24a2e88ea71edc728aff3b078d34c2f374f06.patch

- 

  BuildArch:     noarch

  

  BuildRequires: python%{python3_pkgversion}-devel

- BuildRequires: python%{python3_pkgversion}-setuptools

- 

- BuildRequires: python%{python3_pkgversion}-babel

- BuildRequires: python%{python3_pkgversion}-docutils

- BuildRequires: python%{python3_pkgversion}-imagesize

- BuildRequires: python%{python3_pkgversion}-jinja2

- BuildRequires: python%{python3_pkgversion}-packaging

- BuildRequires: python%{python3_pkgversion}-pygments

- BuildRequires: python%{python3_pkgversion}-requests

- BuildRequires: python%{python3_pkgversion}-sphinxcontrib-applehelp

- BuildRequires: python%{python3_pkgversion}-sphinxcontrib-devhelp

- BuildRequires: python%{python3_pkgversion}-sphinxcontrib-htmlhelp

- BuildRequires: python%{python3_pkgversion}-sphinxcontrib-jsmath

- BuildRequires: python%{python3_pkgversion}-sphinxcontrib-qthelp

- BuildRequires: python%{python3_pkgversion}-sphinxcontrib-serializinghtml

- BuildRequires: python%{python3_pkgversion}-sphinx-theme-alabaster

+ BuildRequires: pyproject-rpm-macros

  

  %if %{with websupport}

  BuildRequires: python%{python3_pkgversion}-sphinxcontrib-websupport
@@ -78,11 +58,7 @@ 

  # tests import _testcapi

  BuildRequires: python%{python3_pkgversion}-test

  

- BuildRequires: python%{python3_pkgversion}-html5lib

- BuildRequires: python%{python3_pkgversion}-mock

- BuildRequires: python%{python3_pkgversion}-pytest

- BuildRequires: python%{python3_pkgversion}-snowballstemmer

- 

+ BuildRequires: gcc

  BuildRequires: gettext

  BuildRequires: graphviz

  BuildRequires: texinfo
@@ -159,22 +135,12 @@ 

  

  Recommends:    graphviz

  Recommends:    ImageMagick

- %{?python_provide:%python_provide python%{python3_pkgversion}-sphinx}

  

  # Bundled JavaScript

- Provides:      bundled(jquery) = 3.2.1

+ Provides:      bundled(jquery) = 3.5.1

  Provides:      bundled(underscore) = 1.3.1

  Provides:      bundled(css3-mediaqueries) = 1.0

  

- # Remove in F33

- Obsoletes:     python-sphinx-locale < 1:2

- Provides:      python-sphinx-locale = %{epoch}:%{version}-%{release}

- Obsoletes:     python%{python3_pkgversion}-sphinxcontrib-napoleon < 0.3.0

- Provides:      python%{python3_pkgversion}-sphinxcontrib-napoleon = %{epoch}:%{version}-%{release}

- Conflicts:     python2-Sphinx < 1:2

- Conflicts:     python2-sphinx < 1:2

- Provides:      python(Sphinx) = %{epoch}:%{version}-%{release}

- 

  %description -n python%{python3_pkgversion}-sphinx

  Sphinx is a tool that makes it easy to create intelligent and

  beautiful documentation for Python projects (or other documents
@@ -238,11 +204,8 @@ 

  Requires:      tex(utf8x.def)

  Requires:      tex(wrapfig.sty)

  

- %{?python_provide:%python_provide python%{python3_pkgversion}-sphinx-latex}

- 

- # Remove in F33

- Obsoletes:     python-sphinx-latex < 1:2

- Provides:      python-sphinx-latex = %{epoch}:%{version}-%{release}

+ # No files in this package, automatic provides don't work:

+ %py_provides   python%{python3_pkgversion}-sphinx-latex

  

  %description  -n python%{python3_pkgversion}-sphinx-latex

  Sphinx is a tool that makes it easy to create intelligent and
@@ -282,13 +245,22 @@ 

  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

+ 

+ 

+ %generate_buildrequires

+ %pyproject_buildrequires %{?with_tests:-x test}

+ 

  

  %build

- %py3_build

+ %pyproject_wheel

  

  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
@@ -297,7 +269,7 @@ 

  

  

  %install

- %py3_install

+ %pyproject_install

  

  # For backwards compatibility. Remove with care, if at all

  for i in sphinx-{apidoc,autogen,build,quickstart}; do
@@ -371,7 +343,7 @@ 

  %{_bindir}/sphinx-*

  %{python3_sitelib}/sphinx/

  %dir %{python3_sitelib}/sphinxcontrib/

- %{python3_sitelib}/Sphinx-%{upstream_version}-py%{python3_version}.egg-info/

+ %{python3_sitelib}/Sphinx-%{upstream_version}.dist-info/

  %dir %{_datadir}/sphinx/

  %dir %{_datadir}/sphinx/locale

  %dir %{_datadir}/sphinx/locale/*
@@ -388,6 +360,10 @@ 

  

  

  %changelog

+ * 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

  

file modified
+1 -1
@@ -1,1 +1,1 @@ 

- SHA512 (Sphinx-3.2.1.tar.gz) = 3f0f49036a44938abd470c2f825a0eeeeb818daf3dfbb3bc5c746b64305b5fe66c1c34d9703eb9420b2b347247c122825ddae1b6c28c88c249206151f39e3bdb

+ SHA512 (Sphinx-3.3.1.tar.gz) = bb1fb0780b741c0162ca014cb996dcdaac06985d14b6cc645a835679d7cf2680912784a815a027caf3fe902f721f9707bc9e9daaaf2c2d43051d31fe00584f78

charliecloud failed with:

checking whether sphinx-build executable path has been provided... /usr/bin/sphinx-build
checking if /usr/bin/sphinx-build is executable... ok
checking if /usr/bin/sphinx-build version >= 1.2.3... ok (3.3.1)
checking for sphinx-build Python...  /usr/bin/python3 -s
checking if " /usr/bin/python3 -s" starts with slash... no
configure: error: --with-sphinx-python: must start with slash

https://copr.fedorainfracloud.org/coprs/churchyard/sphinx-3.3/package/charliecloud/

This has to do with the shebang line which has been updated by pathfix here. It starts with #! /usr/... and something is trying to parse that (in a wrong way).

Reported to upstream: https://github.com/hpc/charliecloud/issues/909

cc @jogas

hypre failed becasue we no longer provide python-sphinx-latex. I'll fix that but @loveshack please use python3-sphinx-latex.

https://copr.fedorainfracloud.org/coprs/churchyard/sphinx-3.3/package/hypre/

python-migen also requires python-sphinx-latex. I'll fix that but @somlo please use python3-sphinx-latex.

https://copr.fedorainfracloud.org/coprs/churchyard/sphinx-3.3/package/python-migen/

rebase-helper failed with:

+ make SPHINXBUILD=sphinx-build-3 man
/usr/lib/python3.9/site-packages/setuptools_scm/version.py:202: UserWarning: meta invoked without explicit configuration, will use defaults where required.
  warnings.warn(
running build
running build_py
running egg_info
writing rebasehelper.egg-info/PKG-INFO
writing dependency_links to rebasehelper.egg-info/dependency_links.txt
writing entry points to rebasehelper.egg-info/entry_points.txt
writing requirements to rebasehelper.egg-info/requires.txt
writing top-level names to rebasehelper.egg-info/top_level.txt
reading manifest file 'rebasehelper.egg-info/SOURCES.txt'
reading manifest template 'MANIFEST.in'
warning: no previously-included files matching '*.pyc' found anywhere in distribution
writing manifest file 'rebasehelper.egg-info/SOURCES.txt'
make -C docs clean man
make[1]: Entering directory '/builddir/build/BUILD/rebase-helper-0.23.1/docs'
rm -rf ../build/*
sphinx-build-3 -b custom-man -d ../build/doctrees   . ../build/man
Running Sphinx v3.3.1
loading translations [en]... done

Exception occurred:
  File "/usr/lib/python3.9/site-packages/sphinx/registry.py", line 266, in add_source_parser
    for filetype in parser.supported:
AttributeError: 'str' object has no attribute 'supported'
The full traceback has been saved in /tmp/sphinx-err-5r8l6t_4.log, if you want to report the issue to the developers.
Please also report this if it was a user error, so that a better error message can be provided next time.
A bug report can be filed in the tracker at <https://github.com/sphinx-doc/sphinx/issues>. Thanks!
make[1]: *** [Makefile:131: man] Error 2
make[1]: Leaving directory '/builddir/build/BUILD/rebase-helper-0.23.1/docs'
make: *** [Makefile:56: man] Error 2
error: Bad exit status from /var/tmp/rpm-tmp.RAqB7w (%build)

https://copr.fedorainfracloud.org/coprs/churchyard/sphinx-3.3/package/rebase-helper/

cc @nforro

3 new commits added

  • Convert to pyproject macros
  • Remove old Obsoletes, Provides and Conflicts
  • Update to 3.3.1
3 years ago

python-migen also requires python-sphinx-latex. I'll fix that but @somlo please use python3-sphinx-latex.

@churchyard - I fixed python-migen here: https://bodhi.fedoraproject.org/updates/FEDORA-2020-5ecd9a7323

Thanks. I've also amended this PR to keep the old provide, so both python-migen and hypre are good.

charliecloud has an upstream PR: https://github.com/hpc/charliecloud/pull/910

The only remaining thing is rebase-helper. In https://github.com/sphinx-doc/sphinx/issues/8395 they discuss this problem for a different project, with a fix: https://github.com/CrossNox/m2r2/commit/484b792ffded6a0783a89c01dbff40ba53ffb541

rebase-helper failed with:

Fixed by rebasing python-m2r.

ACK, both the diff and the differences in RPMs look sane.

Indeed, rebase-helper is fixed: https://copr.fedorainfracloud.org/coprs/churchyard/sphinx-3.3/package/rebase-helper/ Thanks!

The only remaining breakage appears to be charliecloud, with a fix available.

We are good to ship this.

Pull-Request has been merged by churchyard

3 years ago