Build docs with Python 3
https://fedoraproject.org/wiki/Changes/Sphinx2
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user