From c14bc12e0ce7d1d751d7c554dd7ed255187fa270 Mon Sep 17 00:00:00 2001 From: Toshio Kuratomi Date: Wed, 18 Jan 2017 23:29:07 -0800 Subject: [PATCH 01/10] Revert "Add environment-module related files" This reverts commit 68944a5bb0c5f390b99b0389e7a809adb6c4032f. Aviso doesn't want to change technologies for switching in the middle of a stable release --- python2-sphinx | 6 ------ python3-sphinx | 6 ------ zz-modules-python-sphinx.csh | 2 -- zz-modules-python-sphinx.sh | 2 -- 4 files changed, 16 deletions(-) delete mode 100644 python2-sphinx delete mode 100644 python3-sphinx delete mode 100644 zz-modules-python-sphinx.csh delete mode 100644 zz-modules-python-sphinx.sh diff --git a/python2-sphinx b/python2-sphinx deleted file mode 100644 index e015ae6..0000000 --- a/python2-sphinx +++ /dev/null @@ -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@ diff --git a/python3-sphinx b/python3-sphinx deleted file mode 100644 index 6d79fad..0000000 --- a/python3-sphinx +++ /dev/null @@ -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@ diff --git a/zz-modules-python-sphinx.csh b/zz-modules-python-sphinx.csh deleted file mode 100644 index a0bc0b8..0000000 --- a/zz-modules-python-sphinx.csh +++ /dev/null @@ -1,2 +0,0 @@ -# Add path to the default python-sphinx scripts on this version of Fedora -module load python-sphinx diff --git a/zz-modules-python-sphinx.sh b/zz-modules-python-sphinx.sh deleted file mode 100644 index a0bc0b8..0000000 --- a/zz-modules-python-sphinx.sh +++ /dev/null @@ -1,2 +0,0 @@ -# Add path to the default python-sphinx scripts on this version of Fedora -module load python-sphinx From ad4e37d123515df7983a062a0f8b70dfd42a64c7 Mon Sep 17 00:00:00 2001 From: Toshio Kuratomi Date: Wed, 18 Jan 2017 23:29:44 -0800 Subject: [PATCH 02/10] Revert "Remove alternatives. Alternatives should only be used for a very small" This reverts commit ad8724f17a9ca2881833f17ba256ae0ec981d26e. aviso doesn't want to switch technologies in the middle of a stable release --- python-sphinx.spec | 176 +++++++++++++++++++++------------------------ 1 file changed, 82 insertions(+), 94 deletions(-) diff --git a/python-sphinx.spec b/python-sphinx.spec index 149a5e5..7ed2d16 100644 --- a/python-sphinx.spec +++ b/python-sphinx.spec @@ -4,18 +4,17 @@ %{!?python_sitelib: %global python_sitelib %(%{__python} -c "from distutils.sysconfig import get_python_lib; print (get_python_lib())")} %endif -# At some point, RHEL will need to be in here too -%if 0%{?fedora} && 0%{?fedora} > 24 -%global py3_default 1 -%else -%global py3_default 0 -%endif - %global upstream_name Sphinx +%if 0%{?fedora} > 24 +%global py3_alt_priority 500 +%else +%global py3_alt_priority 10 +%endif + Name: python-sphinx Version: 1.4.9 -Release: 2%{?dist} +Release: 1%{?dist} Summary: Python documentation generator Group: Development/Tools @@ -27,10 +26,6 @@ Group: Development/Tools 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 #Patch0: Sphinx-1.2.1-mantarget.patch BuildArch: noarch @@ -44,7 +39,6 @@ BuildRequires: python-six BuildRequires: python2-sphinx_rtd_theme BuildRequires: python2-sphinx-theme-alabaster BuildRequires: python2-imagesize -BuildRequires: environment(modules) # for fixes BuildRequires: dos2unix @@ -152,11 +146,9 @@ Requires: python2-sphinx_rtd_theme Requires: python2-six Requires: python2-sphinx-theme-alabaster Requires: python2-imagesize -Requires(posttrans): Lmod -# Needed to get rid of the alternatives config installed in f24 and f25 -# versions of the package -Requires(posttrans): /usr/sbin/alternatives Recommends: graphviz +Requires(post): %{_sbindir}/update-alternatives +Requires(postun): %{_sbindir}/update-alternatives Obsoletes: python-sphinx <= 1.2.3 Obsoletes: python-sphinxcontrib-napoleon < 0.5 Provides: python-sphinxcontrib-napoleon = %{version}-%{release} @@ -258,10 +250,8 @@ Requires: python3-sphinx-theme-alabaster Requires: python3-imagesize Requires: python3-six Recommends: graphviz -Requires(posttrans): Lmod -# Needed to get rid of the alternatives config installed in f24 and f25 -# versions of the package -Requires(posttrans): /usr/sbin/alternatives +Requires(post): %{_sbindir}/update-alternatives +Requires(postun): %{_sbindir}/update-alternatives Obsoletes: python3-sphinxcontrib-napoleon < 0.3.0 Provides: python3-sphinxcontrib-napoleon = %{version}-%{release} Provides: python(Sphinx) = %{version}-%{release} @@ -362,20 +352,20 @@ popd %install %if 0%{?with_python3} %py3_install -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 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 + +for i in sphinx-{apidoc,autogen,build,quickstart}; do + touch %{buildroot}%{_bindir}/$i done pushd doc @@ -383,9 +373,6 @@ pushd doc 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 @@ -415,38 +402,6 @@ do rm -rf sphinx/locale/$lang 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} -ln -s python3-sphinx %{buildroot}%{_modulesdir}/python-sphinx/default - -# 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 -ln -s python2-sphinx %{buildroot}%{_modulesdir}/python-sphinx/default - -# 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 @@ -464,19 +419,61 @@ LANG=en_US.UTF-8 PYTHON=python3 make test popd %endif # with_python3 +%post -n python2-sphinx -%pre -n python2-sphinx -# python-sphinx as shipped in an update to f24 and f25 used alternatives. So -# we need to clean up the alternatives configuration until at least f27 -%{_sbindir}/update-alternatives --remove sphinx-build %{_bindir}/sphinx-build-%{python2_version} || : +# Remove old versions of files so alternatives doesn't break +for filename in %{_mandir}/man1/sphinx-{all,apidoc,build,quickstart}.1.gz %{_bindir}/sphinx-{build,apidoc,autogen,quickstart} +do + if [ ! -L $filename ] + then + rm -f $filename + fi +done + +%{_sbindir}/update-alternatives --install %{_bindir}/sphinx-build \ + sphinx-build %{_bindir}/sphinx-build-%{python2_version} 100 \ + --slave %{_bindir}/sphinx-apidoc sphinx-apidoc %{_bindir}/sphinx-apidoc-%{python2_version} \ + --slave %{_bindir}/sphinx-autogen sphinx-autogen %{_bindir}/sphinx-autogen-%{python2_version} \ + --slave %{_bindir}/sphinx-quickstart sphinx-quickstart %{_bindir}/sphinx-quickstart-%{python2_version} \ + --slave %{_mandir}/man1/sphinx-all.1.gz sphinx-all.1.gz %{_mandir}/man1/sphinx-all-%{python2_version}.1.gz \ + --slave %{_mandir}/man1/sphinx-apidoc.1.gz sphinx-apidoc.1.gz %{_mandir}/man1/sphinx-apidoc-%{python2_version}.1.gz \ + --slave %{_mandir}/man1/sphinx-build.1.gz sphinx-build.1.gz %{_mandir}/man1/sphinx-build-%{python2_version}.1.gz \ + --slave %{_mandir}/man1/sphinx-quickstart.1.gz sphinx-quickstart.1.gz %{_mandir}/man1/sphinx-quickstart-%{python2_version}.1.gz %if 0%{?with_python3} -%pre -n python3-sphinx -# python-sphinx as shipped in an update to f24 and f25 used alternatives. So -# we need to clean up the alternatives configuration until at least f27 -%{_sbindir}/update-alternatives --remove sphinx-build %{_bindir}/sphinx-build-%{python3_version} || : +%post -n python3-sphinx + +# Remove old versions of files so alternatives doesn't break +for filename in %{_mandir}/man1/sphinx-{all,apidoc,build,quickstart}.1.gz %{_bindir}/sphinx-{build,apidoc,autogen,quickstart} +do + if [ ! -L $filename ] + then + rm -f $filename + fi +done + +%{_sbindir}/update-alternatives --install %{_bindir}/sphinx-build \ + sphinx-build %{_bindir}/sphinx-build-%{python3_version} %{py3_alt_priority} \ + --slave %{_bindir}/sphinx-apidoc sphinx-apidoc %{_bindir}/sphinx-apidoc-%{python3_version} \ + --slave %{_bindir}/sphinx-autogen sphinx-autogen %{_bindir}/sphinx-autogen-%{python3_version} \ + --slave %{_bindir}/sphinx-quickstart sphinx-quickstart %{_bindir}/sphinx-quickstart-%{python3_version} \ + --slave %{_mandir}/man1/sphinx-all.1.gz sphinx-all.1.gz %{_mandir}/man1/sphinx-all-%{python3_version}.1.gz \ + --slave %{_mandir}/man1/sphinx-apidoc.1.gz sphinx-apidoc.1.gz %{_mandir}/man1/sphinx-apidoc-%{python3_version}.1.gz \ + --slave %{_mandir}/man1/sphinx-build.1.gz sphinx-build.1.gz %{_mandir}/man1/sphinx-build-%{python3_version}.1.gz \ + --slave %{_mandir}/man1/sphinx-quickstart.1.gz sphinx-quickstart.1.gz %{_mandir}/man1/sphinx-quickstart-%{python3_version}.1.gz %endif # with_python3 +%postun -n python2-sphinx +if [ $1 -eq 0 ] ; then + %{_sbindir}/update-alternatives --remove sphinx-build %{_bindir}/sphinx-build-%{python2_version} +fi + +%if 0%{?with_python3} +%postun -n python3-sphinx +if [ $1 -eq 0 ] ; then + %{_sbindir}/update-alternatives --remove sphinx-build %{_bindir}/sphinx-build-%{python3_version} +fi +%endif # with_python3 %files latex %license LICENSE @@ -495,34 +492,33 @@ popd %{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/default -%endif -%{_sysconfdir}/profile.d/zz-modules-python-sphinx.sh -%{_sysconfdir}/profile.d/zz-modules-python-sphinx.csh +%ghost %{_bindir}/sphinx-apidoc +%ghost %{_bindir}/sphinx-autogen +%ghost %{_bindir}/sphinx-build +%ghost %{_bindir}/sphinx-quickstart +%ghost %{_mandir}/man1/sphinx-all.1.gz +%ghost %{_mandir}/man1/sphinx-apidoc.1.gz +%ghost %{_mandir}/man1/sphinx-build.1.gz +%ghost %{_mandir}/man1/sphinx-quickstart.1.gz %if 0%{?with_python3} %files -n python3-sphinx %license LICENSE %doc AUTHORS CHANGES EXAMPLES README.rst %{_bindir}/sphinx-*-3* -%{_bindir}/sphinx-build -%{_bindir}/sphinx-apidoc -%{_bindir}/sphinx-autogen -%{_bindir}/sphinx-quickstart %{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/default -%endif -%{_sysconfdir}/profile.d/zz-modules-python-sphinx.sh -%{_sysconfdir}/profile.d/zz-modules-python-sphinx.csh + +%ghost %{_bindir}/sphinx-apidoc +%ghost %{_bindir}/sphinx-autogen +%ghost %{_bindir}/sphinx-build +%ghost %{_bindir}/sphinx-quickstart +%ghost %{_mandir}/man1/sphinx-all.1.gz +%ghost %{_mandir}/man1/sphinx-apidoc.1.gz +%ghost %{_mandir}/man1/sphinx-build.1.gz +%ghost %{_mandir}/man1/sphinx-quickstart.1.gz %endif # with_python3 @@ -531,14 +527,6 @@ popd %changelog -* Fri Dec 30 2016 Toshio Kuratomi - 1.4.9-2 -- Remove alternatives. Alternatives should only be used for a very small - number of packages (system daemons which also have a compatible command line - interface). -- Use environment-modules to switch between the python2 and python3 packages - *but* be aware that no amount of manual switching can get this 100% right. - The code has to be fixed upstream, not in packaging. - * Tue Dec 13 2016 Charalampos Stratakis - 1.4.9-1 - Update to 1.4.9 - Enable python3 tests From 2cd4bbf695905ae2f7c82a20d3c9324f5a141074 Mon Sep 17 00:00:00 2001 From: Toshio Kuratomi Date: Wed, 18 Jan 2017 23:35:45 -0800 Subject: [PATCH 03/10] Change alternatives priority so that the python2 version gets the default to follow Fedora policy. --- python-sphinx.spec | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/python-sphinx.spec b/python-sphinx.spec index 7ed2d16..d7decb1 100644 --- a/python-sphinx.spec +++ b/python-sphinx.spec @@ -6,7 +6,8 @@ %global upstream_name Sphinx -%if 0%{?fedora} > 24 +# Currently Fedora policy is that the python2 version is the default version +%if 0 %global py3_alt_priority 500 %else %global py3_alt_priority 10 @@ -14,7 +15,7 @@ Name: python-sphinx Version: 1.4.9 -Release: 1%{?dist} +Release: 2%{?dist} Summary: Python documentation generator Group: Development/Tools @@ -527,6 +528,10 @@ fi %changelog +* Wed Jan 18 2017 Toshio Kuratomi - - 1.4.9-2 +- Change alternatives priority so that the python2 version gets the default to + follow Fedora policy. + * Tue Dec 13 2016 Charalampos Stratakis - 1.4.9-1 - Update to 1.4.9 - Enable python3 tests From 0389475b573cea7dc8aff00f8d6866d608730753 Mon Sep 17 00:00:00 2001 From: Toshio Kuratomi Date: Wed, 18 Jan 2017 23:36:46 -0800 Subject: [PATCH 04/10] Update release number. The reverts also changed the release number --- python-sphinx.spec | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/python-sphinx.spec b/python-sphinx.spec index d7decb1..a6bcb47 100644 --- a/python-sphinx.spec +++ b/python-sphinx.spec @@ -15,7 +15,7 @@ Name: python-sphinx Version: 1.4.9 -Release: 2%{?dist} +Release: 3%{?dist} Summary: Python documentation generator Group: Development/Tools @@ -528,7 +528,7 @@ fi %changelog -* Wed Jan 18 2017 Toshio Kuratomi - - 1.4.9-2 +* Wed Jan 18 2017 Toshio Kuratomi - - 1.4.9-3 - Change alternatives priority so that the python2 version gets the default to follow Fedora policy. From 7734c3da73df5cc38d27a6a405168c9e4c0e4441 Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Sat, 11 Feb 2017 10:32:17 +0000 Subject: [PATCH 05/10] - Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild (cherry picked from commit 9ea173bb1e9734dad36359dd4b3744f51846ad60) Update to 1.5.2 Remove a few latex dependencies that are no longer needed (cherry picked from commit 5bf198167c9bb5a0b1d3c493d40e7501a68bfa53) Remember to update the source tarball as well (cherry picked from commit 145cab2c327ae0aa3fb1204c47d455891ab2045a) Xapian patch no longer needed (cherry picked from commit b5d98f0f4d15b707fa0e28ec784e239c0d7e8670) Add more buildrequires for tests (cherry picked from commit f73229b3b1fb401947f46b29bce740f6bc4e74ab) Modify changelog dates for the merged revisions --- .gitignore | 8 +------- python-sphinx.spec | 41 +++++++++++++++++++++++++++++++++++------ sources | 2 +- 3 files changed, 37 insertions(+), 14 deletions(-) diff --git a/.gitignore b/.gitignore index 0134fae..b4b31fa 100644 --- a/.gitignore +++ b/.gitignore @@ -1,7 +1 @@ -/Sphinx-1.2.3.tar.gz -/Sphinx-1.3.1.tar.gz -/Sphinx-1.4.4.tar.gz -/Sphinx-1.4.5.tar.gz -/Sphinx-1.4.6.tar.gz -/Sphinx-1.4.8.tar.gz -/Sphinx-1.4.9.tar.gz +/Sphinx-1.5.2.tar.gz diff --git a/python-sphinx.spec b/python-sphinx.spec index a6bcb47..8b2c97a 100644 --- a/python-sphinx.spec +++ b/python-sphinx.spec @@ -14,8 +14,8 @@ %endif Name: python-sphinx -Version: 1.4.9 -Release: 3%{?dist} +Version: 1.5.2 +Release: 1%{?dist} Summary: Python documentation generator Group: Development/Tools @@ -27,7 +27,6 @@ Group: Development/Tools 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 -#Patch0: Sphinx-1.2.1-mantarget.patch BuildArch: noarch BuildRequires: python2-devel >= 2.4 @@ -40,19 +39,26 @@ BuildRequires: python-six BuildRequires: python2-sphinx_rtd_theme BuildRequires: python2-sphinx-theme-alabaster BuildRequires: python2-imagesize +BuildRequires: python2-requests +BuildRequires: environment(modules) # for fixes BuildRequires: dos2unix # for testing BuildRequires: python-nose +BuildRequires: python2-pytest +BuildRequires: python-pytest-cov BuildRequires: gettext BuildRequires: texinfo BuildRequires: graphviz BuildRequires: python-sqlalchemy BuildRequires: python2-mock +BuildRequires: python2-simplejson +BuildRequires: python-html5lib BuildRequires: python-whoosh BuildRequires: python2-snowballstemmer +BuildRequires: python-enum34 # note: no Python3 xapian binding yet BuildRequires: xapian-bindings-python BuildRequires: texlive-collection-fontsrecommended @@ -62,7 +68,6 @@ BuildRequires: texlive-dvisvgm BuildRequires: texlive-ucs BuildRequires: tex(cmap.sty) BuildRequires: tex(ecrm1000.tfm) -BuildRequires: tex(fancybox.sty) BuildRequires: tex(footnote.sty) BuildRequires: tex(framed.sty) BuildRequires: tex(multirow.sty) @@ -85,6 +90,10 @@ 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(eu1enc.def) %if 0%{?with_python3} BuildRequires: python3-devel @@ -94,14 +103,19 @@ BuildRequires: python3-docutils BuildRequires: python3-jinja2 BuildRequires: python3-pygments BuildRequires: python3-nose +BuildRequires: python3-pytest +BuildRequires: python3-pytest-cov BuildRequires: python3-sqlalchemy BuildRequires: python3-mock +BuildRequires: python3-simplejson +BuildRequires: python3-html5lib BuildRequires: python3-whoosh BuildRequires: python3-snowballstemmer BuildRequires: python3-six BuildRequires: python3-sphinx_rtd_theme BuildRequires: python3-sphinx-theme-alabaster BuildRequires: python3-imagesize +BuildRequires: python3-requests %endif # with_python3 @@ -147,6 +161,7 @@ Requires: python2-sphinx_rtd_theme Requires: python2-six Requires: python2-sphinx-theme-alabaster Requires: python2-imagesize +Requires: python2-requests Recommends: graphviz Requires(post): %{_sbindir}/update-alternatives Requires(postun): %{_sbindir}/update-alternatives @@ -198,7 +213,6 @@ Requires: texlive-dvisvgm Requires: texlive-ucs Requires: tex(cmap.sty) Requires: tex(ecrm1000.tfm) -Requires: tex(fancybox.sty) Requires: tex(footnote.sty) Requires: tex(framed.sty) Requires: tex(multirow.sty) @@ -221,6 +235,10 @@ 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(eu1enc.def) Obsoletes: python3-sphinx-latex < 1.4.4-2 %description latex @@ -249,6 +267,7 @@ Requires: python3-snowballstemmer Requires: python3-sphinx_rtd_theme Requires: python3-sphinx-theme-alabaster Requires: python3-imagesize +Requires: python3-requests Requires: python3-six Recommends: graphviz Requires(post): %{_sbindir}/update-alternatives @@ -258,7 +277,6 @@ Provides: python3-sphinxcontrib-napoleon = %{version}-%{release} Provides: python(Sphinx) = %{version}-%{release} %{?python_provide:%python_provide python3-sphinx} Conflicts: python2-Sphinx < %{version}-%{release} -Conflicts: python2-sphinx < %{version}-%{release} %description -n python3-sphinx Sphinx is a tool that makes it easy to create intelligent and @@ -528,6 +546,17 @@ fi %changelog +* Fri Feb 17 2017 Toshio Kuratomi - - 1.5.2-1 +- Update to 1.5.2 +- Remove a few latex dependencies that are no longer needed +- Remove xapian patch; now in upstream tarball + +* Fri Feb 17 2017 Fedora Release Engineering - 1.5.1-6 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild + +* Fri Feb 17 2017 Orion Poplawski - 1.5.1-1 +- Update to 1.5.1 + * Wed Jan 18 2017 Toshio Kuratomi - - 1.4.9-3 - Change alternatives priority so that the python2 version gets the default to follow Fedora policy. diff --git a/sources b/sources index 0eaf98a..a6650e7 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (Sphinx-1.4.9.tar.gz) = 8dd16fc947a59a1fadb0b00f0f6a83a4dd1321569cdb86a96d68f6f9c9acb85d5fa234ffde1a986b95346569b166a90647cc5e9b64516bc184ebad932b1c0156 +SHA512 (Sphinx-1.5.2.tar.gz) = 32c8fb98d72e998fcce8c46ceddcbb0a0776d0e9ce75dc96cef48139b8b47ebe9636243fb48b9e04c8e1d5c56e09fc4c60248fbbef810fba9813b83a3e6cbe88 From ddc17e4a627e8321a920b7df0f04c906d6e59651 Mon Sep 17 00:00:00 2001 From: Toshio Kuratomi Date: Fri, 17 Feb 2017 11:26:15 -0800 Subject: [PATCH 06/10] Disable checks. The tests require pytest >= 3.0 and we only have pytest-2.9.2 on F25 --- python-sphinx.spec | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/python-sphinx.spec b/python-sphinx.spec index 8b2c97a..b65cdcc 100644 --- a/python-sphinx.spec +++ b/python-sphinx.spec @@ -431,10 +431,14 @@ popd %check -LANG=en_US.UTF-8 make test + +# Hate to disable checks but they need pytest 3.0+ in order to function +# and we don't have that on F25. + +#LANG=en_US.UTF-8 make test %if 0%{?with_python3} pushd %{py3dir} -LANG=en_US.UTF-8 PYTHON=python3 make test +#LANG=en_US.UTF-8 PYTHON=python3 make test popd %endif # with_python3 @@ -550,6 +554,8 @@ fi - Update to 1.5.2 - Remove a few latex dependencies that are no longer needed - Remove xapian patch; now in upstream tarball +- Disable checks. The tests require pytest >= 3.0 and we only have + pytest-2.9.2 on F25 * Fri Feb 17 2017 Fedora Release Engineering - 1.5.1-6 - Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild From a3d3cf9a8e7eeade0e2352c13bd950b941d95329 Mon Sep 17 00:00:00 2001 From: Toshio Kuratomi Date: Sat, 18 Feb 2017 09:53:25 -0800 Subject: [PATCH 07/10] Assign %attrs to %ghosted files so that rpm knows what permissions they should have. Cleanup source files that should not be installed Fix the __init__ --- python-sphinx.spec | 57 ++++++++++++++++++++++++++++++++-------------- 1 file changed, 40 insertions(+), 17 deletions(-) diff --git a/python-sphinx.spec b/python-sphinx.spec index b65cdcc..c79a8ca 100644 --- a/python-sphinx.spec +++ b/python-sphinx.spec @@ -15,7 +15,7 @@ Name: python-sphinx Version: 1.5.2 -Release: 1%{?dist} +Release: 2%{?dist} Summary: Python documentation generator Group: Development/Tools @@ -348,6 +348,10 @@ sed '1d' -i sphinx/pycode/pgen2/token.py # fix line encoding of bundled jquery.js dos2unix -k ./sphinx/themes/basic/static/jquery.js +# In 1.5.2, the upstream tarball left this .pyc by mistake. +# Remove it so that it doesn't get included in the python3 build by mistake +rm sphinx/locale/__init__.pyc + %if 0%{?with_python3} rm -rf %{py3dir} cp -a . %{py3dir} @@ -369,12 +373,19 @@ popd %install + %if 0%{?with_python3} %py3_install 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 done + +# These appear to be incomplete C extensions to speed up parsing. They are not +# built by setup.py yet. Removing them in %%install so that if sphinx does +# make use of them, and we don't notice, we only remove these source files +# after the build has created the .so's +rm %{builddir}%{python3_sitelib}/sphinx/pycode/pgen2/parse.{pyx,c} %endif # with_python3 %py2_install @@ -383,6 +394,12 @@ for i in sphinx-{apidoc,autogen,build,quickstart}; do ln -s $i-%{python2_version} %{buildroot}%{_bindir}/$i-2 done +# These appear to be incomplete C extensions to speed up parsing. They are not +# built by setup.py yet. Removing them in %%install so that if sphinx does +# make use of them, and we don't notice, we only remove these source files +# after the build has created the .so's +rm %{builddir}%{python2_sitelib}/sphinx/pycode/pgen2/parse.{pyx,c} + for i in sphinx-{apidoc,autogen,build,quickstart}; do touch %{buildroot}%{_bindir}/$i done @@ -516,14 +533,14 @@ fi %exclude %{_mandir}/man1/sphinx-*-%{python3_version}.1* %{_mandir}/man1/* -%ghost %{_bindir}/sphinx-apidoc -%ghost %{_bindir}/sphinx-autogen -%ghost %{_bindir}/sphinx-build -%ghost %{_bindir}/sphinx-quickstart -%ghost %{_mandir}/man1/sphinx-all.1.gz -%ghost %{_mandir}/man1/sphinx-apidoc.1.gz -%ghost %{_mandir}/man1/sphinx-build.1.gz -%ghost %{_mandir}/man1/sphinx-quickstart.1.gz +%ghost %attr(755, root, root) %{_bindir}/sphinx-apidoc +%ghost %attr(755, root, root) %{_bindir}/sphinx-autogen +%ghost %attr(755, root, root) %{_bindir}/sphinx-build +%ghost %attr(755, root, root) %{_bindir}/sphinx-quickstart +%ghost %attr(644, root, root) %{_mandir}/man1/sphinx-all.1.gz +%ghost %attr(644, root, root) %{_mandir}/man1/sphinx-apidoc.1.gz +%ghost %attr(644, root, root) %{_mandir}/man1/sphinx-build.1.gz +%ghost %attr(644, root, root) %{_mandir}/man1/sphinx-quickstart.1.gz %if 0%{?with_python3} %files -n python3-sphinx @@ -534,14 +551,14 @@ fi %{python3_sitelib}/Sphinx-%{version}-py%{python3_version}.egg-info/ %{_mandir}/man1/sphinx-*-%{python3_version}.1* -%ghost %{_bindir}/sphinx-apidoc -%ghost %{_bindir}/sphinx-autogen -%ghost %{_bindir}/sphinx-build -%ghost %{_bindir}/sphinx-quickstart -%ghost %{_mandir}/man1/sphinx-all.1.gz -%ghost %{_mandir}/man1/sphinx-apidoc.1.gz -%ghost %{_mandir}/man1/sphinx-build.1.gz -%ghost %{_mandir}/man1/sphinx-quickstart.1.gz +%ghost %attr(755, root, root) %{_bindir}/sphinx-apidoc +%ghost %attr(755, root, root) %{_bindir}/sphinx-autogen +%ghost %attr(755, root, root) %{_bindir}/sphinx-build +%ghost %attr(755, root, root) %{_bindir}/sphinx-quickstart +%ghost %attr(644, root, root) %{_mandir}/man1/sphinx-all.1.gz +%ghost %attr(644, root, root) %{_mandir}/man1/sphinx-apidoc.1.gz +%ghost %attr(644, root, root) %{_mandir}/man1/sphinx-build.1.gz +%ghost %attr(644, root, root) %{_mandir}/man1/sphinx-quickstart.1.gz %endif # with_python3 @@ -550,6 +567,12 @@ fi %changelog +* Sat Feb 18 2017 Toshio Kuratomi - - 1.5.2-2 +- Assign %%attrs to %%ghosted files so that rpm knows what permissions they + should have. +- Cleanup source files that should not be installed +- Fix the __init__ + * Fri Feb 17 2017 Toshio Kuratomi - - 1.5.2-1 - Update to 1.5.2 - Remove a few latex dependencies that are no longer needed From 19b3b5089dd3ac960acb4547a4ff8956a894bbc4 Mon Sep 17 00:00:00 2001 From: Toshio Kuratomi Date: Sat, 18 Feb 2017 10:04:23 -0800 Subject: [PATCH 08/10] Just make the changelog a little clearer --- python-sphinx.spec | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/python-sphinx.spec b/python-sphinx.spec index c79a8ca..cfb30d5 100644 --- a/python-sphinx.spec +++ b/python-sphinx.spec @@ -4,8 +4,6 @@ %{!?python_sitelib: %global python_sitelib %(%{__python} -c "from distutils.sysconfig import get_python_lib; print (get_python_lib())")} %endif -%global upstream_name Sphinx - # Currently Fedora policy is that the python2 version is the default version %if 0 %global py3_alt_priority 500 @@ -13,6 +11,8 @@ %global py3_alt_priority 10 %endif +%global upstream_name Sphinx + Name: python-sphinx Version: 1.5.2 Release: 2%{?dist} @@ -571,7 +571,7 @@ fi - Assign %%attrs to %%ghosted files so that rpm knows what permissions they should have. - Cleanup source files that should not be installed -- Fix the __init__ +- Fix the __init__.pyc that was byte compiled for the wrong python * Fri Feb 17 2017 Toshio Kuratomi - - 1.5.2-1 - Update to 1.5.2 From d868b07963bdb0e833a720947ee2badfc0c482e4 Mon Sep 17 00:00:00 2001 From: Toshio Kuratomi Date: Sat, 18 Feb 2017 10:09:43 -0800 Subject: [PATCH 09/10] builddir => buildroot --- python-sphinx.spec | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/python-sphinx.spec b/python-sphinx.spec index cfb30d5..e92f2b4 100644 --- a/python-sphinx.spec +++ b/python-sphinx.spec @@ -385,7 +385,7 @@ done # built by setup.py yet. Removing them in %%install so that if sphinx does # make use of them, and we don't notice, we only remove these source files # after the build has created the .so's -rm %{builddir}%{python3_sitelib}/sphinx/pycode/pgen2/parse.{pyx,c} +rm %{buildroot}%{python3_sitelib}/sphinx/pycode/pgen2/parse.{pyx,c} %endif # with_python3 %py2_install @@ -398,7 +398,7 @@ done # built by setup.py yet. Removing them in %%install so that if sphinx does # make use of them, and we don't notice, we only remove these source files # after the build has created the .so's -rm %{builddir}%{python2_sitelib}/sphinx/pycode/pgen2/parse.{pyx,c} +rm %{buildroot}%{python2_sitelib}/sphinx/pycode/pgen2/parse.{pyx,c} for i in sphinx-{apidoc,autogen,build,quickstart}; do touch %{buildroot}%{_bindir}/$i From 411dc9d6f4baa6d5498e4444612ab1f38b81a414 Mon Sep 17 00:00:00 2001 From: Charalampos Stratakis Date: Fri, 22 Sep 2017 13:00:15 +0200 Subject: [PATCH 10/10] Fix a crash on parallel building. (rhbz#1494276) --- fix-crash-on-parallel-build.patch | 12 ++++++++++++ python-sphinx.spec | 12 +++++++++++- 2 files changed, 23 insertions(+), 1 deletion(-) create mode 100644 fix-crash-on-parallel-build.patch diff --git a/fix-crash-on-parallel-build.patch b/fix-crash-on-parallel-build.patch new file mode 100644 index 0000000..9bf01c7 --- /dev/null +++ b/fix-crash-on-parallel-build.patch @@ -0,0 +1,12 @@ +diff --git a/sphinx/util/parallel.py b/sphinx/util/parallel.py +index ce51ac0..64f9bc1 100644 +--- a/sphinx/util/parallel.py ++++ b/sphinx/util/parallel.py +@@ -100,6 +100,7 @@ class ParallelTasks(object): + raise SphinxParallelError(*result) + self._result_funcs.pop(tid)(self._args.pop(tid), result) + self._procs[tid].join() ++ self._precvs.pop(tid) + self._pworking -= 1 + break + else: diff --git a/python-sphinx.spec b/python-sphinx.spec index e92f2b4..394cd8c 100644 --- a/python-sphinx.spec +++ b/python-sphinx.spec @@ -15,7 +15,7 @@ Name: python-sphinx Version: 1.5.2 -Release: 2%{?dist} +Release: 3%{?dist} Summary: Python documentation generator Group: Development/Tools @@ -28,6 +28,13 @@ 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 +# Backport of a bugfix from the 1.6 upstream branch of sphinx +# to address a crash with parallel building. +# https://bugzilla.redhat.com/show_bug.cgi?id=1494276 +# Upstream commit: +# https://github.com/sphinx-doc/sphinx/pull/4039/commits/0cb57f19a099be2809a8fb5dc9274f7411e1caac +Patch0: fix-crash-on-parallel-build.patch + BuildArch: noarch BuildRequires: python2-devel >= 2.4 BuildRequires: python2-babel @@ -567,6 +574,9 @@ fi %changelog +* Fri Sep 22 2017 Charalampos Stratakis - 1.5.2-3 +- Fix a crash on parallel build. + * Sat Feb 18 2017 Toshio Kuratomi - - 1.5.2-2 - Assign %%attrs to %%ghosted files so that rpm knows what permissions they should have.