From 884ff2afc1463b0fd2ec49ef18d28ff3ce2679b5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20Pierret=20=28fepitre=29?= Date: Sat, 8 Aug 2020 20:54:13 +0200 Subject: [PATCH] spec: replace hardcoded python3 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Frédéric Pierret (fepitre) --- python-sphinx.spec | 76 +++++++++++++++++++++++----------------------- 1 file changed, 38 insertions(+), 38 deletions(-) diff --git a/python-sphinx.spec b/python-sphinx.spec index 27f556a..ddfcde0 100644 --- a/python-sphinx.spec +++ b/python-sphinx.spec @@ -44,26 +44,26 @@ Patch1: sphinx-test_theming.diff BuildArch: noarch -BuildRequires: python3-devel -BuildRequires: python3-setuptools +BuildRequires: python%{python3_pkgversion}-devel +BuildRequires: python%{python3_pkgversion}-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 +BuildRequires: python%{python3_pkgversion}-babel +BuildRequires: python%{python3_pkgversion}-docutils +BuildRequires: python%{python3_pkgversion}-imagesize +BuildRequires: python%{python3_pkgversion}-jinja2 +BuildRequires: python%{python3_pkgversion}-packaging +BuildRequires: python%{python3_pkgversion}-pygments +BuildRequires: python%{python3_pkgversion}-requests +BuildRequires: python%{python3_pkgversion}-sphinxcontrib-applehelp +BuildRequires: python%{python3_pkgversion}-sphinxcontrib-devhelp +BuildRequires: python%{python3_pkgversion}-sphinxcontrib-htmlhelp +BuildRequires: python%{python3_pkgversion}-sphinxcontrib-jsmath +BuildRequires: python%{python3_pkgversion}-sphinxcontrib-qthelp +BuildRequires: python%{python3_pkgversion}-sphinxcontrib-serializinghtml +BuildRequires: python%{python3_pkgversion}-sphinx-theme-alabaster %if %{with websupport} -BuildRequires: python3-sphinxcontrib-websupport +BuildRequires: python%{python3_pkgversion}-sphinxcontrib-websupport %endif # for fixes @@ -71,12 +71,12 @@ BuildRequires: dos2unix %if %{with tests} # tests import _testcapi -BuildRequires: python3-test +BuildRequires: python%{python3_pkgversion}-test -BuildRequires: python3-html5lib -BuildRequires: python3-mock -BuildRequires: python3-pytest -BuildRequires: python3-snowballstemmer +BuildRequires: python%{python3_pkgversion}-html5lib +BuildRequires: python%{python3_pkgversion}-mock +BuildRequires: python%{python3_pkgversion}-pytest +BuildRequires: python%{python3_pkgversion}-snowballstemmer BuildRequires: gettext BuildRequires: graphviz @@ -149,12 +149,12 @@ the Python docs: snippets and inclusion of appropriately formatted docstrings. -%package -n python3-sphinx +%package -n python%{python3_pkgversion}-sphinx Summary: Python documentation generator Recommends: graphviz Recommends: ImageMagick -%{?python_provide:%python_provide python3-sphinx} +%{?python_provide:%python_provide python%{python3_pkgversion}-sphinx} # Bundled JavaScript Provides: bundled(jquery) = 3.2.1 @@ -164,13 +164,13 @@ 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} +Obsoletes: python%{python3_pkgversion}-sphinxcontrib-napoleon < 0.3.0 +Provides: python%{python3_pkgversion}-sphinxcontrib-napoleon = %{epoch}:%{version}-%{release} Conflicts: python2-Sphinx < 1:2 Conflicts: python2-sphinx < 1:2 Provides: python(Sphinx) = %{epoch}:%{version}-%{release} -%description -n python3-sphinx +%description -n python%{python3_pkgversion}-sphinx Sphinx is a tool that makes it easy to create intelligent and beautiful documentation for Python projects (or other documents consisting of multiple reStructuredText sources), written by Georg @@ -199,10 +199,10 @@ the Python docs: snippets and inclusion of appropriately formatted docstrings. -%package -n python3-sphinx-latex -Summary: LaTeX builder dependencies for python3-sphinx +%package -n python%{python3_pkgversion}-sphinx-latex +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-latex Requires: texlive-dvipng @@ -233,13 +233,13 @@ Requires: tex(upquote.sty) Requires: tex(utf8x.def) Requires: tex(wrapfig.sty) -%{?python_provide:%python_provide python3-sphinx-latex} +%{?python_provide:%python_provide python%{python3_pkgversion}-sphinx-latex} # Remove in F33 Obsoletes: python-sphinx-latex < 1:2 Provides: python-sphinx-latex = %{epoch}:%{version}-%{release} -%description -n python3-sphinx-latex +%description -n python%{python3_pkgversion}-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 @@ -254,7 +254,7 @@ builder. %package doc Summary: Documentation for %{name} License: BSD -Recommends: python3-sphinx = %{epoch}:%{version}-%{release} +Recommends: python%{python3_pkgversion}-sphinx = %{epoch}:%{version}-%{release} %description doc Sphinx is a tool that makes it easy to create intelligent and @@ -295,11 +295,11 @@ popd %py3_install # 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 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 + ln -s %{_bindir}/$i %{buildroot}%{_libexecdir}/python%{python3_pkgversion}-sphinx/$i done # Clean up non-python files @@ -365,21 +365,21 @@ export PATH=%{buildroot}%{_bindir}:$PATH %endif -%files -n python3-sphinx -f sphinx.lang +%files -n python%{python3_pkgversion}-sphinx -f sphinx.lang %license LICENSE %doc AUTHORS CHANGES EXAMPLES README.rst %{_bindir}/sphinx-* %{python3_sitelib}/sphinx/ %dir %{python3_sitelib}/sphinxcontrib/ %{python3_sitelib}/Sphinx-%{upstream_version}-py%{python3_version}.egg-info/ -%{_libexecdir}/python3-sphinx/ +%{_libexecdir}/python%{python3_pkgversion}-sphinx/ %dir %{_datadir}/sphinx/ %dir %{_datadir}/sphinx/locale %dir %{_datadir}/sphinx/locale/* %{_mandir}/man1/sphinx-* -%files -n python3-sphinx-latex +%files -n python%{python3_pkgversion}-sphinx-latex # empty, this is a metapackage