From 3ae40abe2dcafb3b1928aade602db47bbba660e1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miro=20Hron=C4=8Dok?= Date: Wed, 1 May 2019 19:09:45 +0200 Subject: [PATCH] Build docs with Python 3 https://fedoraproject.org/wiki/Changes/Sphinx2 --- python-Bottleneck.spec | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/python-Bottleneck.spec b/python-Bottleneck.spec index ea0c4a1..d7d21e9 100644 --- a/python-Bottleneck.spec +++ b/python-Bottleneck.spec @@ -28,10 +28,8 @@ Summary: Collection of fast NumPy array functions written in Cython BuildRequires: gcc BuildRequires: python2-numpy -BuildRequires: python2-numpydoc BuildRequires: python2-nose BuildRequires: python2-setuptools -BuildRequires: python2-sphinx BuildRequires: python2-devel BuildRequires: python2-scipy @@ -51,8 +49,10 @@ Summary: Collection of fast NumPy array functions written in Cython BuildRequires: python3-devel BuildRequires: python3-nose BuildRequires: python3-numpy +BuildRequires: python3-numpydoc BuildRequires: python3-scipy BuildRequires: python3-setuptools +BuildRequires: python3-sphinx Requires: python3-numpy%{?_isa} Requires: python3-scipy%{?_isa} @@ -71,6 +71,8 @@ written in Cython. # use numpydoc from the package instead %{__rm} -f doc/sphinxext/numpydoc.py* +# Python 2 remark +%{__sed} -i 's/fid = file(/fid = open(/' doc/source/conf.py %build %py2_build @@ -94,7 +96,7 @@ written in Cython. %{__cp} -fpr %{buildroot}/* tmp_inst # Build the autodocs. -export PYTHONPATH="$(/bin/pwd)/tmp_inst/%{python2_sitearch}" +export PYTHONPATH="$(/bin/pwd)/tmp_inst/%{python3_sitearch}" %{__mkdir} -p doc/source/_static %{_bindir}/sphinx-build -b html doc/source doc/html unset PYTHONPATH