|
|
|
|
@@ -1,21 +1,34 @@
|
|
|
|
|
%if 0%{?fedora}
|
|
|
|
|
%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
|
|
|
|
|
|
|
|
|
|
# Currently Fedora policy is that the python2 version is the default version
|
|
|
|
|
%if 0
|
|
|
|
|
%global py3_alt_priority 500
|
|
|
|
|
%if 0%{?rhel} > 7
|
|
|
|
|
# Build without BuildRequires ImageMagick, to skip imgconverter tests
|
|
|
|
|
%bcond_with imagemagick_tests
|
|
|
|
|
%else
|
|
|
|
|
%global py3_alt_priority 10
|
|
|
|
|
%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.5.2
|
|
|
|
|
Release: 3%{?dist}
|
|
|
|
|
Version: 1.7.5
|
|
|
|
|
Release: 1%{?dist}
|
|
|
|
|
Epoch: 1
|
|
|
|
|
Summary: Python documentation generator
|
|
|
|
|
|
|
|
|
|
Group: Development/Tools
|
|
|
|
|
@@ -27,47 +40,61 @@ 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
|
|
|
|
|
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
|
|
|
|
|
|
|
|
|
|
# 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
|
|
|
|
|
# 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
|
|
|
|
|
|
|
|
|
|
BuildArch: noarch
|
|
|
|
|
BuildRequires: python2-devel >= 2.4
|
|
|
|
|
BuildRequires: python2-babel
|
|
|
|
|
BuildRequires: python2-setuptools
|
|
|
|
|
BuildRequires: python-docutils
|
|
|
|
|
BuildRequires: python-jinja2
|
|
|
|
|
BuildRequires: python-pygments >= 2.0
|
|
|
|
|
BuildRequires: python-six
|
|
|
|
|
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
|
|
|
|
|
%if %{with websupport}
|
|
|
|
|
BuildRequires: python2-sphinxcontrib-websupport
|
|
|
|
|
%endif
|
|
|
|
|
BuildRequires: environment(modules)
|
|
|
|
|
|
|
|
|
|
# for fixes
|
|
|
|
|
BuildRequires: dos2unix
|
|
|
|
|
|
|
|
|
|
# for testing
|
|
|
|
|
BuildRequires: python-nose
|
|
|
|
|
%if %{with tests}
|
|
|
|
|
BuildRequires: python2-nose
|
|
|
|
|
BuildRequires: python2-pytest
|
|
|
|
|
BuildRequires: python-pytest-cov
|
|
|
|
|
BuildRequires: python2-pytest-cov
|
|
|
|
|
BuildRequires: gettext
|
|
|
|
|
BuildRequires: texinfo
|
|
|
|
|
BuildRequires: graphviz
|
|
|
|
|
BuildRequires: python-sqlalchemy
|
|
|
|
|
BuildRequires: python2-sqlalchemy
|
|
|
|
|
BuildRequires: python2-mock
|
|
|
|
|
BuildRequires: python2-simplejson
|
|
|
|
|
BuildRequires: python-html5lib
|
|
|
|
|
BuildRequires: python-whoosh
|
|
|
|
|
BuildRequires: python2-html5lib
|
|
|
|
|
BuildRequires: python2-whoosh
|
|
|
|
|
BuildRequires: python2-snowballstemmer
|
|
|
|
|
BuildRequires: python-enum34
|
|
|
|
|
BuildRequires: python2-enum34
|
|
|
|
|
%if %{with imagemagick_tests}
|
|
|
|
|
BuildRequires: ImageMagick
|
|
|
|
|
%endif
|
|
|
|
|
# note: no Python3 xapian binding yet
|
|
|
|
|
BuildRequires: xapian-bindings-python
|
|
|
|
|
BuildRequires: python2-xapian
|
|
|
|
|
BuildRequires: texlive-collection-fontsrecommended
|
|
|
|
|
BuildRequires: texlive-collection-latex
|
|
|
|
|
BuildRequires: texlive-dvipng
|
|
|
|
|
@@ -100,7 +127,9 @@ 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
|
|
|
|
|
@@ -109,6 +138,16 @@ 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
|
|
|
|
|
@@ -118,11 +157,7 @@ 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
|
|
|
|
|
%endif # with_python3
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@@ -157,11 +192,11 @@ the Python docs:
|
|
|
|
|
|
|
|
|
|
%package -n python2-sphinx
|
|
|
|
|
Summary: Python documentation generator
|
|
|
|
|
Requires: python-sphinx-locale = %{version}-%{release}
|
|
|
|
|
Requires: python-sphinx-locale = %{?epoch}:%{version}-%{release}
|
|
|
|
|
Requires: python2-babel
|
|
|
|
|
Requires: python-docutils
|
|
|
|
|
Requires: python-jinja2
|
|
|
|
|
Requires: python-pygments
|
|
|
|
|
Requires: python2-docutils
|
|
|
|
|
Requires: python2-jinja2
|
|
|
|
|
Requires: python2-pygments
|
|
|
|
|
Requires: python2-mock
|
|
|
|
|
Requires: python2-snowballstemmer
|
|
|
|
|
Requires: python2-sphinx_rtd_theme
|
|
|
|
|
@@ -169,17 +204,25 @@ 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
|
|
|
|
|
Requires(post): %{_sbindir}/update-alternatives
|
|
|
|
|
Requires(postun): %{_sbindir}/update-alternatives
|
|
|
|
|
Recommends: ImageMagick
|
|
|
|
|
Obsoletes: python-sphinx <= 1.2.3
|
|
|
|
|
Obsoletes: python-sphinxcontrib-napoleon < 0.5
|
|
|
|
|
Provides: python-sphinxcontrib-napoleon = %{version}-%{release}
|
|
|
|
|
Provides: python-sphinxcontrib-napoleon = %{?epoch}:%{version}-%{release}
|
|
|
|
|
Obsoletes: python2-Sphinx <= 1.3.1-4
|
|
|
|
|
Provides: python2-Sphinx = %{version}-%{release}
|
|
|
|
|
Provides: python(Sphinx) = %{version}-%{release}
|
|
|
|
|
Provides: python2-Sphinx = %{?epoch}:%{version}-%{release}
|
|
|
|
|
Provides: python(Sphinx) = %{?epoch}:%{version}-%{release}
|
|
|
|
|
%{?python_provide:%python_provide python2-sphinx}
|
|
|
|
|
Conflicts: python3-sphinx < %{version}-%{release}
|
|
|
|
|
Conflicts: python3-sphinx < %{?epoch}:%{version}-%{release}
|
|
|
|
|
|
|
|
|
|
%description -n python2-sphinx
|
|
|
|
|
Sphinx is a tool that makes it easy to create intelligent and
|
|
|
|
|
@@ -212,7 +255,7 @@ the Python docs:
|
|
|
|
|
|
|
|
|
|
%package latex
|
|
|
|
|
Summary: LaTeX builder dependencies for %{name}
|
|
|
|
|
Requires: python(Sphinx) = %{version}-%{release}
|
|
|
|
|
Requires: python(Sphinx) = %{?epoch}:%{version}-%{release}
|
|
|
|
|
Requires: texlive-collection-fontsrecommended
|
|
|
|
|
Requires: texlive-collection-latex
|
|
|
|
|
Requires: texlive-dvipng
|
|
|
|
|
@@ -245,6 +288,7 @@ 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
|
|
|
|
|
|
|
|
|
|
@@ -264,7 +308,7 @@ builder.
|
|
|
|
|
%package -n python3-sphinx
|
|
|
|
|
Summary: Python documentation generator
|
|
|
|
|
Group: Development/Tools
|
|
|
|
|
Requires: python-sphinx-locale = %{version}-%{release}
|
|
|
|
|
Requires: python-sphinx-locale = %{?epoch}:%{version}-%{release}
|
|
|
|
|
Requires: python3-babel
|
|
|
|
|
Requires: python3-docutils
|
|
|
|
|
Requires: python3-jinja2
|
|
|
|
|
@@ -276,14 +320,21 @@ 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
|
|
|
|
|
Requires(post): %{_sbindir}/update-alternatives
|
|
|
|
|
Requires(postun): %{_sbindir}/update-alternatives
|
|
|
|
|
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 = %{version}-%{release}
|
|
|
|
|
Provides: python(Sphinx) = %{version}-%{release}
|
|
|
|
|
Provides: python3-sphinxcontrib-napoleon = %{?epoch}:%{version}-%{release}
|
|
|
|
|
Provides: python(Sphinx) = %{?epoch}:%{version}-%{release}
|
|
|
|
|
%{?python_provide:%python_provide python3-sphinx}
|
|
|
|
|
Conflicts: python2-Sphinx < %{version}-%{release}
|
|
|
|
|
Conflicts: python2-Sphinx < %{?epoch}:%{version}-%{release}
|
|
|
|
|
|
|
|
|
|
%description -n python3-sphinx
|
|
|
|
|
Sphinx is a tool that makes it easy to create intelligent and
|
|
|
|
|
@@ -319,7 +370,7 @@ the Python docs:
|
|
|
|
|
Summary: Documentation for %{name}
|
|
|
|
|
Group: Documentation
|
|
|
|
|
License: BSD
|
|
|
|
|
Requires: python(Sphinx) = %{version}-%{release}
|
|
|
|
|
Requires: python(Sphinx) = %{?epoch}:%{version}-%{release}
|
|
|
|
|
|
|
|
|
|
%description doc
|
|
|
|
|
Sphinx is a tool that makes it easy to create intelligent and
|
|
|
|
|
@@ -350,65 +401,62 @@ This package contains locale files for Sphinx
|
|
|
|
|
%prep
|
|
|
|
|
%autosetup -n %{upstream_name}-%{version}%{?prerel} -p1
|
|
|
|
|
|
|
|
|
|
sed '1d' -i sphinx/pycode/pgen2/token.py
|
|
|
|
|
cp %{SOURCE5} .
|
|
|
|
|
|
|
|
|
|
# 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 %{without imagemagick_tests}
|
|
|
|
|
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
|
|
|
|
|
make html
|
|
|
|
|
make man
|
|
|
|
|
%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
|
|
|
|
|
mv _build/html ..
|
|
|
|
|
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
|
|
|
|
|
|
|
|
|
|
# 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 %{buildroot}%{python3_sitelib}/sphinx/pycode/pgen2/parse.{pyx,c}
|
|
|
|
|
%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
|
|
|
|
|
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 %{buildroot}%{python2_sitelib}/sphinx/pycode/pgen2/parse.{pyx,c}
|
|
|
|
|
|
|
|
|
|
for i in sphinx-{apidoc,autogen,build,quickstart}; do
|
|
|
|
|
touch %{buildroot}%{_bindir}/$i
|
|
|
|
|
ln -s %{_bindir}/$i-2 %{buildroot}%{_libexecdir}/python2-sphinx/$i
|
|
|
|
|
done
|
|
|
|
|
|
|
|
|
|
pushd doc
|
|
|
|
|
@@ -416,6 +464,9 @@ 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
|
|
|
|
|
@@ -425,6 +476,12 @@ done
|
|
|
|
|
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
|
|
|
|
|
@@ -432,7 +489,7 @@ mv doc reST
|
|
|
|
|
|
|
|
|
|
# Move language files to /usr/share;
|
|
|
|
|
# patch to support this incorporated in 0.6.6
|
|
|
|
|
pushd %{buildroot}%{python_sitelib}
|
|
|
|
|
pushd %{buildroot}%{python2_sitelib}
|
|
|
|
|
|
|
|
|
|
for lang in `find sphinx/locale -maxdepth 1 -mindepth 1 -type d -not -path '*/\.*' -printf "%f "`;
|
|
|
|
|
do
|
|
|
|
|
@@ -445,6 +502,38 @@ 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}
|
|
|
|
|
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
|
|
|
|
|
@@ -454,73 +543,27 @@ popd
|
|
|
|
|
>> sphinx.lang
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
%if %{with tests}
|
|
|
|
|
%check
|
|
|
|
|
export PYTHONPATH=$PWD
|
|
|
|
|
|
|
|
|
|
# Hate to disable checks but they need pytest 3.0+ in order to function
|
|
|
|
|
# and we don't have that on F25.
|
|
|
|
|
# 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
|
|
|
|
|
|
|
|
|
|
#LANG=en_US.UTF-8 make test
|
|
|
|
|
# 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=en_US.UTF-8 %{__python2} -m pytest -v --ignore=tests/test_api_translator.py
|
|
|
|
|
%if 0%{?with_python3}
|
|
|
|
|
pushd %{py3dir}
|
|
|
|
|
#LANG=en_US.UTF-8 PYTHON=python3 make test
|
|
|
|
|
# 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
|
|
|
|
|
LANG=en_US.UTF-8 PYTHON=python3 make test
|
|
|
|
|
popd
|
|
|
|
|
%endif # with_python3
|
|
|
|
|
%endif # with tests
|
|
|
|
|
|
|
|
|
|
%post -n python2-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-%{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}
|
|
|
|
|
%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
|
|
|
|
|
@@ -533,39 +576,40 @@ fi
|
|
|
|
|
|
|
|
|
|
%files -n python2-sphinx
|
|
|
|
|
%license LICENSE
|
|
|
|
|
%doc AUTHORS CHANGES EXAMPLES README.rst
|
|
|
|
|
%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
|
|
|
|
|
|
|
|
|
|
%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
|
|
|
|
|
%license LICENSE
|
|
|
|
|
%doc AUTHORS CHANGES EXAMPLES README.rst
|
|
|
|
|
%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*
|
|
|
|
|
|
|
|
|
|
%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
|
|
|
|
|
%{_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
|
|
|
|
|
|
|
|
|
|
%endif # with_python3
|
|
|
|
|
|
|
|
|
|
@@ -574,12 +618,47 @@ fi
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
%changelog
|
|
|
|
|
* Fri Sep 22 2017 Charalampos Stratakis <cstratak@redhat.com> - 1.5.2-3
|
|
|
|
|
- Fix a crash on parallel build.
|
|
|
|
|
* Tue Jun 19 2018 Charalampos Stratakis <cstratak@redhat.com> - 1:1.7.5-1
|
|
|
|
|
- Update to 1.7.5 (bz#1570451)
|
|
|
|
|
|
|
|
|
|
* Wed Apr 11 2018 Petr Viktorin <pviktori@redhat.com> - 1:1.7.2-2
|
|
|
|
|
- Conditionalize the ImageMagick build dependency & tests
|
|
|
|
|
|
|
|
|
|
* Wed Apr 11 2018 Petr Viktorin <pviktori@redhat.com> - 1:1.7.2-1
|
|
|
|
|
- Update to 1.7.2 (bz#1558968)
|
|
|
|
|
|
|
|
|
|
* Tue Mar 13 2018 Charalampos Stratakis <cstratak@redhat.com> - 1:1.7.1-1
|
|
|
|
|
- Update to 1.7.1 (bz#1534802)
|
|
|
|
|
|
|
|
|
|
* Fri Feb 09 2018 Fedora Release Engineering <releng@fedoraproject.org> - 1:1.6.6-2
|
|
|
|
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild
|
|
|
|
|
|
|
|
|
|
* Tue Jan 09 2018 Charalampos Stratakis <cstratak@redhat.com> - 1:1.6.6-1
|
|
|
|
|
- Update to 1.6.6 (bz#1532435)
|
|
|
|
|
|
|
|
|
|
* Mon Dec 11 2017 Iryna Shcherbina <ishcherb@redhat.com> - 1:1.6.5-2
|
|
|
|
|
- Fix ambiguous Python 2 dependency declarations
|
|
|
|
|
(See https://fedoraproject.org/wiki/FinalizingFedoraSwitchtoPython3)
|
|
|
|
|
|
|
|
|
|
* Mon Nov 06 2017 Charalampos Stratakis <cstratak@redhat.com> - 1:1.6.5-1
|
|
|
|
|
- Update to 1.6.5 (bz#1508237)
|
|
|
|
|
|
|
|
|
|
* Mon Oct 09 2017 Troy Dawson <tdawson@redhat.com> - 1:1.6.4-2
|
|
|
|
|
- Cleanup spec file conditionals
|
|
|
|
|
|
|
|
|
|
* Tue Sep 26 2017 Charalampos Stratakis <cstratak@redhat.com> - 1:1.6.4-1
|
|
|
|
|
- Update to 1.6.4 (bz#1426928)
|
|
|
|
|
|
|
|
|
|
* Wed Sep 20 2017 Charalampos Stratakis <cstratak@redhat.com> - 1:1.6.3-3
|
|
|
|
|
- Provide the epoch tag in order to keep the upgrade path clean.
|
|
|
|
|
|
|
|
|
|
* Thu Jul 27 2017 Fedora Release Engineering <releng@fedoraproject.org> - 1.6.3-2
|
|
|
|
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild
|
|
|
|
|
|
|
|
|
|
* Thu Jul 20 2017 Charalampos Stratakis <cstratak@redhat.com> - - 1.6.3-1
|
|
|
|
|
- Update to 1.6.3 (bz#1426928)
|
|
|
|
|
|
|
|
|
|
* Sat Feb 18 2017 Toshio Kuratomi <toshio@fedoraproject.org> - - 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__.pyc that was byte compiled for the wrong python
|
|
|
|
|
|
|
|
|
|
@@ -587,18 +666,41 @@ 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 <releng@fedoraproject.org> - 1.5.1-6
|
|
|
|
|
* Sat Feb 11 2017 Fedora Release Engineering <releng@fedoraproject.org> - 1.5.1-6
|
|
|
|
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild
|
|
|
|
|
|
|
|
|
|
* Fri Feb 17 2017 Orion Poplawski <orion@cora.nwra.com> - 1.5.1-1
|
|
|
|
|
* Tue Jan 31 2017 Toshio Kuratomi <toshio@fedoraproject.org> - - 1.5.1-5
|
|
|
|
|
- environment-modules is less featureful than Lmod.
|
|
|
|
|
- Select the default version in a different way since environment-modules
|
|
|
|
|
didn't understand the symlink
|
|
|
|
|
- Ignore error messsages in the shell startup script as environment-modules
|
|
|
|
|
prints an error message if a module has already been loaded. The command
|
|
|
|
|
is doing the right thing for this case except that it's also printing an
|
|
|
|
|
error message.
|
|
|
|
|
|
|
|
|
|
* Thu Jan 26 2017 Toshio Kuratomi <toshio@fedoraproject.org> - - 1.5.1-4
|
|
|
|
|
- Add recipe for setting the system default to the README.fedora
|
|
|
|
|
|
|
|
|
|
* Wed Jan 18 2017 Toshio Kuratomi <toshio@fedoraproject.org> - - 1.5.1-3
|
|
|
|
|
- Move the unversioned executables into the python2 package as they are now
|
|
|
|
|
using python2 to run
|
|
|
|
|
|
|
|
|
|
* Wed Jan 18 2017 Toshio Kuratomi <toshio@fedoraproject.org> - - 1.5.1-2
|
|
|
|
|
- Add README.fedora so people know how to use environment-modules to switch.
|
|
|
|
|
- Change the default to be the python2 version to match with the guidelines
|
|
|
|
|
- Switch to generic environment(modules) instead of Lmod specifically.
|
|
|
|
|
|
|
|
|
|
* Fri Dec 30 2016 Orion Poplawski <orion@cora.nwra.com> - 1.5.1-1
|
|
|
|
|
- Update to 1.5.1
|
|
|
|
|
|
|
|
|
|
* Wed Jan 18 2017 Toshio Kuratomi <toshio@fedoraproject.org> - - 1.4.9-3
|
|
|
|
|
- Change alternatives priority so that the python2 version gets the default to
|
|
|
|
|
follow Fedora policy.
|
|
|
|
|
* Fri Dec 30 2016 Toshio Kuratomi <toshio@fedoraproject.org> - 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 <cstratak@redhat.com> - 1.4.9-1
|
|
|
|
|
- Update to 1.4.9
|
|
|
|
|
|