spec: replace hardcoded python3

Signed-off-by: Frédéric Pierret (fepitre) <frederic.pierret@qubes-os.org>
This commit is contained in:
Frédéric Pierret (fepitre) 2020-08-08 20:54:13 +02:00 committed by churchyard
parent 1d11fd11e2
commit 884ff2afc1

View File

@ -44,26 +44,26 @@ Patch1: sphinx-test_theming.diff
BuildArch: noarch BuildArch: noarch
BuildRequires: python3-devel BuildRequires: python%{python3_pkgversion}-devel
BuildRequires: python3-setuptools BuildRequires: python%{python3_pkgversion}-setuptools
BuildRequires: python3-babel BuildRequires: python%{python3_pkgversion}-babel
BuildRequires: python3-docutils BuildRequires: python%{python3_pkgversion}-docutils
BuildRequires: python3-imagesize BuildRequires: python%{python3_pkgversion}-imagesize
BuildRequires: python3-jinja2 BuildRequires: python%{python3_pkgversion}-jinja2
BuildRequires: python3-packaging BuildRequires: python%{python3_pkgversion}-packaging
BuildRequires: python3-pygments BuildRequires: python%{python3_pkgversion}-pygments
BuildRequires: python3-requests BuildRequires: python%{python3_pkgversion}-requests
BuildRequires: python3-sphinxcontrib-applehelp BuildRequires: python%{python3_pkgversion}-sphinxcontrib-applehelp
BuildRequires: python3-sphinxcontrib-devhelp BuildRequires: python%{python3_pkgversion}-sphinxcontrib-devhelp
BuildRequires: python3-sphinxcontrib-htmlhelp BuildRequires: python%{python3_pkgversion}-sphinxcontrib-htmlhelp
BuildRequires: python3-sphinxcontrib-jsmath BuildRequires: python%{python3_pkgversion}-sphinxcontrib-jsmath
BuildRequires: python3-sphinxcontrib-qthelp BuildRequires: python%{python3_pkgversion}-sphinxcontrib-qthelp
BuildRequires: python3-sphinxcontrib-serializinghtml BuildRequires: python%{python3_pkgversion}-sphinxcontrib-serializinghtml
BuildRequires: python3-sphinx-theme-alabaster BuildRequires: python%{python3_pkgversion}-sphinx-theme-alabaster
%if %{with websupport} %if %{with websupport}
BuildRequires: python3-sphinxcontrib-websupport BuildRequires: python%{python3_pkgversion}-sphinxcontrib-websupport
%endif %endif
# for fixes # for fixes
@ -71,12 +71,12 @@ BuildRequires: dos2unix
%if %{with tests} %if %{with tests}
# tests import _testcapi # tests import _testcapi
BuildRequires: python3-test BuildRequires: python%{python3_pkgversion}-test
BuildRequires: python3-html5lib BuildRequires: python%{python3_pkgversion}-html5lib
BuildRequires: python3-mock BuildRequires: python%{python3_pkgversion}-mock
BuildRequires: python3-pytest BuildRequires: python%{python3_pkgversion}-pytest
BuildRequires: python3-snowballstemmer BuildRequires: python%{python3_pkgversion}-snowballstemmer
BuildRequires: gettext BuildRequires: gettext
BuildRequires: graphviz BuildRequires: graphviz
@ -149,12 +149,12 @@ the Python docs:
snippets and inclusion of appropriately formatted docstrings. snippets and inclusion of appropriately formatted docstrings.
%package -n python3-sphinx %package -n python%{python3_pkgversion}-sphinx
Summary: Python documentation generator Summary: Python documentation generator
Recommends: graphviz Recommends: graphviz
Recommends: ImageMagick Recommends: ImageMagick
%{?python_provide:%python_provide python3-sphinx} %{?python_provide:%python_provide python%{python3_pkgversion}-sphinx}
# Bundled JavaScript # Bundled JavaScript
Provides: bundled(jquery) = 3.2.1 Provides: bundled(jquery) = 3.2.1
@ -164,13 +164,13 @@ Provides: bundled(css3-mediaqueries) = 1.0
# Remove in F33 # Remove in F33
Obsoletes: python-sphinx-locale < 1:2 Obsoletes: python-sphinx-locale < 1:2
Provides: python-sphinx-locale = %{epoch}:%{version}-%{release} Provides: python-sphinx-locale = %{epoch}:%{version}-%{release}
Obsoletes: python3-sphinxcontrib-napoleon < 0.3.0 Obsoletes: python%{python3_pkgversion}-sphinxcontrib-napoleon < 0.3.0
Provides: python3-sphinxcontrib-napoleon = %{epoch}:%{version}-%{release} Provides: python%{python3_pkgversion}-sphinxcontrib-napoleon = %{epoch}:%{version}-%{release}
Conflicts: python2-Sphinx < 1:2 Conflicts: python2-Sphinx < 1:2
Conflicts: python2-sphinx < 1:2 Conflicts: python2-sphinx < 1:2
Provides: python(Sphinx) = %{epoch}:%{version}-%{release} Provides: python(Sphinx) = %{epoch}:%{version}-%{release}
%description -n python3-sphinx %description -n python%{python3_pkgversion}-sphinx
Sphinx is a tool that makes it easy to create intelligent and Sphinx is a tool that makes it easy to create intelligent and
beautiful documentation for Python projects (or other documents beautiful documentation for Python projects (or other documents
consisting of multiple reStructuredText sources), written by Georg consisting of multiple reStructuredText sources), written by Georg
@ -199,10 +199,10 @@ the Python docs:
snippets and inclusion of appropriately formatted docstrings. snippets and inclusion of appropriately formatted docstrings.
%package -n python3-sphinx-latex %package -n python%{python3_pkgversion}-sphinx-latex
Summary: LaTeX builder dependencies for python3-sphinx Summary: LaTeX builder dependencies for python%{python3_pkgversion}-sphinx
Requires: python3-sphinx = %{epoch}:%{version}-%{release} Requires: python%{python3_pkgversion}-sphinx = %{epoch}:%{version}-%{release}
Requires: texlive-collection-fontsrecommended Requires: texlive-collection-fontsrecommended
Requires: texlive-collection-latex Requires: texlive-collection-latex
Requires: texlive-dvipng Requires: texlive-dvipng
@ -233,13 +233,13 @@ Requires: tex(upquote.sty)
Requires: tex(utf8x.def) Requires: tex(utf8x.def)
Requires: tex(wrapfig.sty) Requires: tex(wrapfig.sty)
%{?python_provide:%python_provide python3-sphinx-latex} %{?python_provide:%python_provide python%{python3_pkgversion}-sphinx-latex}
# Remove in F33 # Remove in F33
Obsoletes: python-sphinx-latex < 1:2 Obsoletes: python-sphinx-latex < 1:2
Provides: python-sphinx-latex = %{epoch}:%{version}-%{release} Provides: python-sphinx-latex = %{epoch}:%{version}-%{release}
%description -n python3-sphinx-latex %description -n python%{python3_pkgversion}-sphinx-latex
Sphinx is a tool that makes it easy to create intelligent and Sphinx is a tool that makes it easy to create intelligent and
beautiful documentation for Python projects (or other documents beautiful documentation for Python projects (or other documents
consisting of multiple reStructuredText sources), written by Georg consisting of multiple reStructuredText sources), written by Georg
@ -254,7 +254,7 @@ builder.
%package doc %package doc
Summary: Documentation for %{name} Summary: Documentation for %{name}
License: BSD License: BSD
Recommends: python3-sphinx = %{epoch}:%{version}-%{release} Recommends: python%{python3_pkgversion}-sphinx = %{epoch}:%{version}-%{release}
%description doc %description doc
Sphinx is a tool that makes it easy to create intelligent and Sphinx is a tool that makes it easy to create intelligent and
@ -295,11 +295,11 @@ popd
%py3_install %py3_install
# For backwards compatibility. Remove around Fedora 33 (with care) # For backwards compatibility. Remove around Fedora 33 (with care)
install -d %{buildroot}%{_libexecdir}/python3-sphinx install -d %{buildroot}%{_libexecdir}/python%{python3_pkgversion}-sphinx
for i in sphinx-{apidoc,autogen,build,quickstart}; do for i in sphinx-{apidoc,autogen,build,quickstart}; do
ln -s %{_bindir}/$i %{buildroot}%{_bindir}/$i-%{python3_version} ln -s %{_bindir}/$i %{buildroot}%{_bindir}/$i-%{python3_version}
ln -s %{_bindir}/$i %{buildroot}%{_bindir}/$i-3 ln -s %{_bindir}/$i %{buildroot}%{_bindir}/$i-3
ln -s %{_bindir}/$i %{buildroot}%{_libexecdir}/python3-sphinx/$i ln -s %{_bindir}/$i %{buildroot}%{_libexecdir}/python%{python3_pkgversion}-sphinx/$i
done done
# Clean up non-python files # Clean up non-python files
@ -365,21 +365,21 @@ export PATH=%{buildroot}%{_bindir}:$PATH
%endif %endif
%files -n python3-sphinx -f sphinx.lang %files -n python%{python3_pkgversion}-sphinx -f sphinx.lang
%license LICENSE %license LICENSE
%doc AUTHORS CHANGES EXAMPLES README.rst %doc AUTHORS CHANGES EXAMPLES README.rst
%{_bindir}/sphinx-* %{_bindir}/sphinx-*
%{python3_sitelib}/sphinx/ %{python3_sitelib}/sphinx/
%dir %{python3_sitelib}/sphinxcontrib/ %dir %{python3_sitelib}/sphinxcontrib/
%{python3_sitelib}/Sphinx-%{upstream_version}-py%{python3_version}.egg-info/ %{python3_sitelib}/Sphinx-%{upstream_version}-py%{python3_version}.egg-info/
%{_libexecdir}/python3-sphinx/ %{_libexecdir}/python%{python3_pkgversion}-sphinx/
%dir %{_datadir}/sphinx/ %dir %{_datadir}/sphinx/
%dir %{_datadir}/sphinx/locale %dir %{_datadir}/sphinx/locale
%dir %{_datadir}/sphinx/locale/* %dir %{_datadir}/sphinx/locale/*
%{_mandir}/man1/sphinx-* %{_mandir}/man1/sphinx-*
%files -n python3-sphinx-latex %files -n python%{python3_pkgversion}-sphinx-latex
# empty, this is a metapackage # empty, this is a metapackage