#8 Update to 2.0.0b1 and remove pyton2-sphinx
Merged a year ago by churchyard. Opened a year ago by churchyard.
rpms/ churchyard/python-sphinx 2  into  master

file modified
+1

@@ -16,3 +16,4 @@ 

  /Sphinx-1.7.5.tar.gz

  /Sphinx-1.7.6.tar.gz

  /Sphinx-1.8.4.tar.gz

+ /Sphinx-2.0.0b1.tar.gz

file removed
-27

@@ -1,27 +0,0 @@ 

- Sphinx with autodoc is sensitive to whether it is run via Python2 or Python3

- as it uses the Python version that it is invoked with to parse the source

- files for docstrings.  Unfortunately, there's no logic to detect this within

- the sphinx commands and the standard Makefiles generated by sphinx-quickstart

- don't give the user any hint that it might be a problem.

- 

- The Fedora package tries to mitigate this problem by allowing the user to

- switch between the Python2 and Python3 versions using environment-modules.  To

- switch to the Python3 commands, use::

- 

-     module swap python-sphinx/python3-sphinx

- 

- To switch to the Python2 version, use::

- 

-     module swap python-sphinx/python2-sphinx

- 

- The default install uses the python2 version of the modules.

- If the system administrator wishes to change the default, edit the

- /etc/profile.d/zz-modules-python-sphinx.sh and

- /etc/profile.d/zz-modules-python-sphinx.csh files to specify a specific

- alternative to use.  For instance, to make the python3 version the default,

- modify it like so::

- 

-     @@ -1,2 +1,2 @@

-      # Add path to the default python-sphinx scripts on this version of Fedora

-     -module load python-sphinx

-     +module load python-sphinx/python3-sphinx

@@ -1,2 +0,0 @@ 

- #%Module1.0

- set ModuleVersion  "python@PYTHONVER@-sphinx"

file modified
+155 -387

@@ -1,8 +1,12 @@ 

- %if 0%{?fedora} || 0%{?rhel} > 7

- %global with_python3 1

- %else

- %{!?python_sitelib: %global python_sitelib %(%{__python} -c "from distutils.sysconfig import get_python_lib; print (get_python_lib())")}

- %endif

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

+ 

+ 

+ # No internet in Koji

+ %bcond_with internet

  

  %if 0%{?rhel} > 7

  # Build without BuildRequires ImageMagick, to skip imgconverter tests

@@ -11,154 +15,103 @@ 

  %bcond_without imagemagick_tests

  %endif

  

- # When bootstrapping sphinx, we don't yet have sphinxcontrib-websupport

- %bcond_without websupport

- # Also, we don't have all the tests requirements

- %bcond_without tests

- 

- # Currently, python2 version is always the default: https://fedoraproject.org/wiki/Packaging:Python#Naming

- %if 1

- %global py3_default 0

- %else

- %global py3_default 1

- %endif

  

  %global upstream_name Sphinx

  

  Name:       python-sphinx

- Version:    1.8.4

+ %global     general_version 2.0.0

+ %global     prerel b1

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

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

  Release:    1%{?dist}

  Epoch:      1

  Summary:    Python documentation generator

  

- 

  # Unless otherwise noted, the license for code is BSD

- # 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

- Source1:    python2-sphinx

- Source2:    python3-sphinx

- Source3:    zz-modules-python-sphinx.sh

- Source4:    zz-modules-python-sphinx.csh

- Source5:    README.fedora

- # environment-modules file to select whether the py2 or py3 version of

- # python-sphinx execuitables is default

- Source6:    default-sphinx-command.in

- 

- # 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 python[23]-sphinx-theme-alabaster

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

+ 

+ URL:        https://www.sphinx-doc.org/

+ Source0:    %{pypi_source %{upstream_name} %{upstream_version}}

+ 

+ # Allow extra themes to exist. We pull in python3-sphinx-theme-alabaster

  # which causes that test to fail.

- Patch1: sphinx-test_theming.diff

+ Patch1:     sphinx-test_theming.diff

  

  BuildArch:     noarch

- BuildRequires: python2-devel >= 2.4

- BuildRequires: python2-babel

- BuildRequires: python2-setuptools

- BuildRequires: python2-docutils

- BuildRequires: python2-jinja2

- BuildRequires: python2-pygments >= 2.0

- BuildRequires: python2-six

- BuildRequires: python2-sphinx_rtd_theme

- BuildRequires: python2-sphinx-theme-alabaster

- BuildRequires: python2-imagesize

- BuildRequires: python2-requests

- BuildRequires: python2-packaging

- BuildRequires: python2-typing

+ 

+ BuildRequires: python3-devel

+ BuildRequires: python3-setuptools

+ 

+ BuildRequires: python3-babel

+ BuildRequires: python3-docutils

+ BuildRequires: python3-imagesize

+ BuildRequires: python3-jinja2

+ BuildRequires: python3-packaging

+ BuildRequires: python3-pygments

+ BuildRequires: python3-requests

+ BuildRequires: python3-sphinxcontrib-applehelp

+ BuildRequires: python3-sphinxcontrib-devhelp

+ BuildRequires: python3-sphinxcontrib-htmlhelp

+ BuildRequires: python3-sphinxcontrib-jsmath

+ BuildRequires: python3-sphinxcontrib-qthelp

+ BuildRequires: python3-sphinxcontrib-serializinghtml

+ BuildRequires: python3-sphinx-theme-alabaster

+ 

  %if %{with websupport}

- BuildRequires: python2-sphinxcontrib-websupport

+ BuildRequires: python3-sphinxcontrib-websupport

  %endif

- BuildRequires: environment(modules)

  

  # for fixes

  BuildRequires: dos2unix

  

  %if %{with tests}

- BuildRequires: python2-nose

- BuildRequires: python2-pytest

- BuildRequires: python2-pytest-cov

+ BuildRequires: python3-html5lib

+ BuildRequires: python3-mock

+ BuildRequires: python3-pytest

+ BuildRequires: python3-snowballstemmer

+ 

  BuildRequires: gettext

- BuildRequires: texinfo

  BuildRequires: graphviz

- BuildRequires: python2-sqlalchemy

- BuildRequires: python2-mock

- BuildRequires: python2-html5lib

- BuildRequires: python2-whoosh

- BuildRequires: python2-snowballstemmer

- BuildRequires: python2-enum34

+ BuildRequires: texinfo

+ 

  %if %{with imagemagick_tests}

  BuildRequires: ImageMagick

  %endif

+ 

  BuildRequires: texlive-collection-fontsrecommended

  BuildRequires: texlive-collection-latex

  BuildRequires: texlive-dvipng

  BuildRequires: texlive-dvisvgm

- BuildRequires: texlive-ucs

+ BuildRequires: tex(amsmath.sty)

+ BuildRequires: tex(amsthm.sty)

+ BuildRequires: tex(anyfontsize.sty)

+ BuildRequires: tex(article.cls)

+ BuildRequires: tex(capt-of.sty)

  BuildRequires: tex(cmap.sty)

- BuildRequires: tex(ecrm1000.tfm)

- BuildRequires: tex(footnote.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(multirow.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(tabulary.sty)

  BuildRequires: tex(titlesec.sty)

- BuildRequires: tex(threeparttable.sty)

  BuildRequires: tex(upquote.sty)

+ BuildRequires: tex(utf8x.def)

  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(luatex85.sty)

- BuildRequires: tex(fncychap.sty)

- BuildRequires: tex(tabulary.sty)

- BuildRequires: tex(polyglossia.sty)

- BuildRequires: tex(ctablestack.sty)

- BuildRequires: tex(eu1enc.def)

  %endif

  

- %if 0%{?with_python3}

- BuildRequires: python3-devel

- BuildRequires: python3-babel

- BuildRequires: python3-setuptools

- BuildRequires: python3-docutils

- BuildRequires: python3-jinja2

- BuildRequires: python3-pygments

- BuildRequires: python3-six

- BuildRequires: python3-sphinx_rtd_theme

- BuildRequires: python3-sphinx-theme-alabaster

- BuildRequires: python3-packaging

- BuildRequires: python3-imagesize

- BuildRequires: python3-requests

- %if %{with websupport}

- BuildRequires: python3-sphinxcontrib-websupport

- %endif

- %if %{with tests}

- BuildRequires: python3-nose

- BuildRequires: python3-pytest

- BuildRequires: python3-pytest-cov

- BuildRequires: python3-sqlalchemy

- BuildRequires: python3-mock

- BuildRequires: python3-html5lib

- BuildRequires: python3-whoosh

- BuildRequires: python3-snowballstemmer

- %endif

- %endif # with_python3

- 

  

  %description

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

@@ -189,41 +142,28 @@ 

        snippets and inclusion of appropriately formatted docstrings.

  

  

- %package -n    python2-sphinx

+ %package -n python3-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

- %if %{with websupport}

- Requires:      python2-sphinxcontrib-websupport

- %endif

- 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}

- 

- %description -n python2-sphinx

+ %{?python_provide:%python_provide python3-sphinx}

+ 

+ # Bundled JavaScript

+ Provides:      bundled(jquery) = 3.2.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:     python3-sphinxcontrib-napoleon < 0.3.0

+ Provides:      python3-sphinxcontrib-napoleon = %{epoch}:%{version}-%{release}

+ Conflicts:     python2-Sphinx < 1:2

+ Conflicts:     python2-sphinx < 1:2

+ Provides:      python(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

@@ -252,89 +192,47 @@ 

        snippets and inclusion of appropriately formatted docstrings.

  

  

- %package latex

- Summary:       LaTeX builder dependencies for %{name}

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

+ %package -n python3-sphinx-latex

+ Summary:       LaTeX builder dependencies for python3-sphinx

+ 

+ Requires:      python3-sphinx = %{epoch}:%{version}-%{release}

  Requires:      texlive-collection-fontsrecommended

  Requires:      texlive-collection-latex

  Requires:      texlive-dvipng

  Requires:      texlive-dvisvgm

- Requires:      texlive-ucs

+ Requires:      tex(amsmath.sty)

+ Requires:      tex(amsthm.sty)

+ Requires:      tex(anyfontsize.sty)

+ Requires:      tex(article.cls)

+ Requires:      tex(capt-of.sty)

  Requires:      tex(cmap.sty)

- Requires:      tex(ecrm1000.tfm)

- Requires:      tex(footnote.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(multirow.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(tabulary.sty)

  Requires:      tex(titlesec.sty)

- Requires:      tex(threeparttable.sty)

  Requires:      tex(upquote.sty)

+ Requires:      tex(utf8x.def)

  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(luatex85.sty)

- Requires:      tex(fncychap.sty)

- Requires:      tex(tabulary.sty)

- Requires:      tex(polyglossia.sty)

- Requires:      tex(ctablestack.sty)

- Requires:      tex(eu1enc.def)

- Obsoletes:     python3-sphinx-latex < 1.4.4-2

- 

- %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

- 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 pulls in the TeX dependencies needed by Sphinx's LaTeX

- builder.

+ %{?python_provide:%python_provide python3-sphinx-latex}

  

+ # Remove in F33

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

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

  

- %if 0%{?with_python3}

- %package -n python3-sphinx

- Summary:       Python documentation generator

- 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-imagesize

- Requires:      python3-requests

- Requires:      python3-six

- Requires:      python3-packaging

- %if %{with websupport}

- Requires:      python3-sphinxcontrib-websupport

- %endif

- 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

+ %description  -n python3-sphinx-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

@@ -342,32 +240,14 @@ 

  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.

- %endif # with_python3

+ This package pulls in the TeX dependencies needed by Sphinx's LaTeX

+ builder.

  

  

  %package doc

  Summary:       Documentation for %{name}

  License:       BSD

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

+ Recommends:    python3-sphinx = %{epoch}:%{version}-%{release}

  

  %description doc

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

@@ -380,24 +260,8 @@ 

  This package contains documentation in reST and HTML formats.

  

  

- %package locale

- Summary:       Locale files for %{name}

- 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}-%{version}%{?prerel} -p1

- 

- cp %{SOURCE5} .

+ %autosetup -n %{upstream_name}-%{upstream_version} -p1

  

  # fix line encoding of bundled jquery.js

  dos2unix -k ./sphinx/themes/basic/static/jquery.js

@@ -406,29 +270,13 @@ 

  rm tests/test_ext_imgconverter.py

  %endif

  

- %if %{without websupport}

- rm tests/test_websupport.py tests/test_api_translator.py

- %endif

- 

- %if 0%{?with_python3}

- rm -rf %{py3dir}

- cp -a . %{py3dir}

- %endif # with_python3

  

  %build

- %py2_build

- %if 0%{?with_python3}

  %py3_build

- %endif # with_python3

  

  export PYTHONPATH=$PWD

  pushd doc

- %if 0%{?with_python3}

  export SPHINXBUILD="%{__python3} ../sphinx/cmd/build.py"

- %else

- export SPHINXBUILD="%{__python2} ../sphinx/cmd/build.py"

- %endif

- 

  make html SPHINXBUILD="$SPHINXBUILD"

  make man SPHINXBUILD="$SPHINXBUILD"

  rm -rf _build/html/.buildinfo

@@ -437,58 +285,42 @@ 

  

  

  %install

- %if 0%{?with_python3}

  %py3_install

+ 

+ # For backwards compatibility. Remove around Fedora 33 (with care)

  install -d %{buildroot}%{_libexecdir}/python3-sphinx

  for i in sphinx-{apidoc,autogen,build,quickstart}; do

-     mv %{buildroot}%{_bindir}/$i %{buildroot}%{_bindir}/$i-%{python3_version}

-     ln -s $i-%{python3_version} %{buildroot}%{_bindir}/$i-3

-     ln -s %{_bindir}/$i-3 %{buildroot}%{_libexecdir}/python3-sphinx/$i

+     ln -s %{_bindir}/$i %{buildroot}%{_bindir}/$i-%{python3_version}

+     ln -s %{_bindir}/$i %{buildroot}%{_bindir}/$i-3

+     ln -s %{_bindir}/$i %{buildroot}%{_libexecdir}/python3-sphinx/$i

  done

- %endif # with_python3

  

- %py2_install

- install -d %{buildroot}%{_libexecdir}/python2-sphinx

- for i in sphinx-{apidoc,autogen,build,quickstart}; do

-     mv %{buildroot}%{_bindir}/$i %{buildroot}%{_bindir}/$i-%{python2_version}

-     ln -s $i-%{python2_version} %{buildroot}%{_bindir}/$i-2

-     ln -s %{_bindir}/$i-2 %{buildroot}%{_libexecdir}/python2-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

  for f in _build/man/sphinx-*.1;

  do

-     ### TODO: these are all the same.  Do we really need to ship them three

-     ### times or is it fine to just ship them as e.g. sphinx-build.1

      cp -p $f %{buildroot}%{_mandir}/man1/$(basename $f)

-     cp -p $f %{buildroot}%{_mandir}/man1/$(basename $f | sed -e "s|.1$|-%{python2_version}.1|")

-     cp -p $f %{buildroot}%{_mandir}/man1/$(basename $f | sed -e "s|.1$|-%{python3_version}.1|")

  done

- 

- # Remove language files, they're identical to the ones from the

- # Python 2 build that will be moved to /usr/share below

- find %{buildroot}%{python3_sitelib}/sphinx/locale -maxdepth 1 -mindepth 1 -type d -not -path '*/\.*' -exec rm -rf '{}' \;

  popd

  

- # Clean up non-python files

- rm -f %{buildroot}%{python2_sitelib}/sphinx/locale/.DS_Store

- rm -rf %{buildroot}%{python2_sitelib}/sphinx/locale/.tx

- 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}%{python2_sitelib}

+ pushd %{buildroot}%{python3_sitelib}

  

  for lang in `find sphinx/locale -maxdepth 1 -mindepth 1 -type d -not -path '*/\.*' -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 \

@@ -499,37 +331,6 @@ 

  done

  popd

  

- install -d %{buildroot}%{_modulesdir}/python-sphinx

- install -m 0644 %{SOURCE1} %{buildroot}%{_modulesdir}/python-sphinx/

- sed -i 's|@python2_sphinx_dir@|%{_libexecdir}/python2-sphinx|' %{buildroot}%{_modulesdir}/python-sphinx/python2-sphinx

- install -m 0644 %{SOURCE2} %{buildroot}%{_modulesdir}/python-sphinx/

- sed -i 's|@python3_sphinx_dir@|%{_libexecdir}/python3-sphinx|' %{buildroot}%{_modulesdir}/python-sphinx/python3-sphinx

- install -d %{buildroot}%{_sysconfdir}/profile.d

- install -m 0644 %{SOURCE3} %{buildroot}%{_sysconfdir}/profile.d/zz-modules-python-sphinx.sh

- install -m 0644 %{SOURCE4} %{buildroot}%{_sysconfdir}/profile.d/zz-modules-python-sphinx.csh

- 

- %if %{py3_default}

- sed 's/@PYTHONVER@/3/' < %{SOURCE6} > %{buildroot}%{_modulesdir}/python-sphinx/.version

- 

- # These symlinks establish a default for when a package is first installed (and

- # therefore, environment modules is not loaded).  The user can immediately

- # switch them by using module swap python-sphinx/python2-sphinx

- for filename in sphinx-{build,apidoc,autogen,quickstart} ; do

-   ln -s %{_libexecdir}/python3-sphinx/$filename %{buildroot}%{_bindir}/$filename

- done

- 

- %else

- sed 's/@PYTHONVER@/2/' < %{SOURCE6} > %{buildroot}%{_modulesdir}/python-sphinx/.version

- 

- # These symlinks establish a default for when a package is first installed (and

- # therefore, environment modules is not loaded).  The user can immediately

- # switch them by using module swap python-sphinx/python3-sphinx

- for filename in sphinx-{build,apidoc,autogen,quickstart} ; do

-   ln -s %{_libexecdir}/python2-sphinx/$filename %{buildroot}%{_bindir}/$filename

- done

- 

- %endif

- 

  %find_lang sphinx

  

  # Language files; Since these are javascript, it's not immediately obvious to

@@ -541,79 +342,46 @@ 

  

  %if %{with tests}

  %check

- export PYTHONPATH=$PWD

+ export PYTHONPATH=%{buildroot}%{python3_sitelib}

+ export PATH=%{buildroot}%{_bindir}:$PATH

  

- # 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

- 

- # Igoring test_api_translator for now as it fails on Fedora.

- # The issue has been reported upstream: https://github.com/sphinx-doc/sphinx/issues/4710

- LANG=C.UTF-8 pytest-2

- %if 0%{?with_python3}

- pushd %{py3dir}

- # 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

- pytest-3

- popd

- %endif # with_python3

+ # Currently, all linkcheck tests and test_latex_remote_images need internet

+ %{__python3} -m pytest \

+ %if %{without internet}

+     -k "not linkcheck and not latex_remote_images" \

+ %endif

+ ;

  %endif # with tests

  

  

- %files latex

- %license LICENSE

- 

- %files locale -f sphinx.lang

+ %files -n python3-sphinx -f sphinx.lang

  %license LICENSE

+ %doc AUTHORS CHANGES EXAMPLES README.rst

+ %{_bindir}/sphinx-*

+ %{python3_sitelib}/sphinx/

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

+ %{_libexecdir}/python3-sphinx/

  %dir %{_datadir}/sphinx/

  %dir %{_datadir}/sphinx/locale

  %dir %{_datadir}/sphinx/locale/*

+ %{_mandir}/man1/sphinx-*

  

- %files -n python2-sphinx

- %license LICENSE

- %doc AUTHORS CHANGES EXAMPLES README.rst README.fedora

- %{_bindir}/sphinx-*-2*

- %{_bindir}/sphinx-build

- %{_bindir}/sphinx-apidoc

- %{_bindir}/sphinx-autogen

- %{_bindir}/sphinx-quickstart

- %{python2_sitelib}/sphinx/

- %{python2_sitelib}/Sphinx-%{version}-py%{python2_version}.egg-info/

- %exclude %{_mandir}/man1/sphinx-*-%{python3_version}.1*

- %{_mandir}/man1/*

- %{_libexecdir}/python2-sphinx/

- %{_modulesdir}/python-sphinx/python2-sphinx

- %if !%{py3_default}

- %{_modulesdir}/python-sphinx/.version

- %endif

- %config(noreplace) %{_sysconfdir}/profile.d/zz-modules-python-sphinx.sh

- %config(noreplace) %{_sysconfdir}/profile.d/zz-modules-python-sphinx.csh

- 

- %if 0%{?with_python3}

  

- %files -n python3-sphinx

- %license LICENSE

- %doc AUTHORS CHANGES EXAMPLES README.rst README.fedora

- %{_bindir}/sphinx-*-3*

- %{python3_sitelib}/sphinx/

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

- %{_mandir}/man1/sphinx-*-%{python3_version}.1*

- %{_libexecdir}/python3-sphinx/

- %{_modulesdir}/python-sphinx/python3-sphinx

- %if %{py3_default}

- %{_modulesdir}/python-sphinx/.version

- %endif

- %config(noreplace) %{_sysconfdir}/profile.d/zz-modules-python-sphinx.sh

- %config(noreplace) %{_sysconfdir}/profile.d/zz-modules-python-sphinx.csh

+ %files -n python3-sphinx-latex

+ # empty, this is a metapackage

  

- %endif # with_python3

  

  %files doc

+ %license LICENSE

  %doc html reST

  

  

  %changelog

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

  

file removed
-6

@@ -1,6 +0,0 @@ 

- #%Module 1.0

- #

- #  python2-sphinx module for use with 'environment modules' package

- #

- conflict        python-sphinx

- prepend-path    PATH            @python2_sphinx_dir@

file removed
-6

@@ -1,6 +0,0 @@ 

- #%Module 1.0

- #

- #  python2-sphinx module for use with 'environment modules' package

- #

- conflict        python-sphinx

- prepend-path    PATH            @python3_sphinx_dir@

file modified
+1 -1

@@ -1,1 +1,1 @@ 

- SHA512 (Sphinx-1.8.4.tar.gz) = 6821bb56c30b52f357ae55f5db45f056883c457eae62a0751a2b654519a07bca9edccb7678b29fa380379f059c9d8899d9e7b06ceccca5ec26962e6f83bb8578

+ SHA512 (Sphinx-2.0.0b1.tar.gz) = 6f6e90a152c9ebf96f5ded2966b70e9bb203a1444ada8a0f31a71973d4f475b4dae891119752447f810837c91791c1325c5182d3608f089a09ce797d007c71ee

@@ -1,13 +0,0 @@ 

- 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,2 +0,0 @@ 

- # Add path to the default python-sphinx scripts on this version of Fedora

- module load python-sphinx >& /dev/null

@@ -1,2 +0,0 @@ 

- # Add path to the default python-sphinx scripts on this version of Fedora

- module load python-sphinx 2> /dev/null

This doesn't build, there are missing sphixncontrib dependencies:

  • sphinxcontrib-applehelp built
  • sphinxcontrib-devhelp built
  • sphinxcontrib-jsmath built
  • sphinxcontrib-htmlhelp built
  • sphinxcontrib-serializinghtml built
  • sphinxcontrib-qthelp built

Things left to be done:

  • Fedora change is not yet approved approved
  • add new BuildRequires done
  • remove no longer needed BuildRequires removed
  • see the Python dependency generator results and drop manual requires if possible done
  • see if we can bootstrap sphinxcontrib packages with automatic requires they don't require sphinx
  • fix build failures it builds
  • check the upgrade path

3 new commits added

  • Drop manual requires
  • Fix version in %files
  • Build without doc
a year ago

1 new commit added

  • Obsoletes and conflicts with epoch
a year ago

2 new commits added

  • Add internet bcond
  • Deselect tests instead of removing and patching
a year ago

1 new commit added

  • Add tests/doc BRs
a year ago

all dependencies need review. linked from the main comment above.

cc @pkopkan

2 new commits added

  • Remove Windows make.bat (wrong encoding, not useful for us)
  • Make the tests pass
a year ago

1 new commit added

  • We need websupport after all, but not RTD theme
a year ago

1 new commit added

  • --rebuilt--
a year ago

11 new commits added

  • We need websupport after all, but not RTD theme
  • Remove Windows make.bat (wrong encoding, not useful for us)
  • Make the tests pass
  • Add tests/doc BRs
  • Add internet bcond
  • Deselect tests instead of removing and patching
  • Obsoletes and conflicts with epoch
  • Drop manual requires
  • Fix version in %files
  • Build without doc
  • DO NOT MERGE WIP BLOCKED 2.0.0b2 BLOCKED WIP
a year ago

It builds. Also all the new dependencies pass their checks.

1 new commit added

  • Drop unneeded (B)Rs
a year ago

Ready for review. Will squash before merging, don't pay much attention to individual commits unless you want a field trip to my mind :)

2 new commits added

  • %python_provide python3-sphinx-latex
  • Sort stuff
a year ago

Nitpick: Use two sentences instead of comma. The removal won't be done for backwards compatibility.

Nitpick: Use two sentences instead of comma. The removal won't be done for backwards compatibility.

Done.

1 new commit added

  • The removal won't be done for backwards compatibility
a year ago

If I add another command after this, and run with internet, the new command becomes part of the pytest invocation.
Add a \ at the end of the -k line, and a . after the if?

Otherwise, this looks great! Unleash it on Rawhide when ready.

adding ;
running test builds with and without internet

1 new commit added

  • No whitespace trickery
a year ago

I plan to unleash this on Monday.

All in all it looks good to me. I'll provide a final ack on Monday.

rebased onto d1c43fc

a year ago

Everything looks good. Thanks for all that work! Merge at will and we'll be on standby for the potential fires :)

Pull-Request has been merged by churchyard

a year ago