Remove cruft

This commit is contained in:
Zbigniew Jędrzejewski-Szmek
2021-06-17 10:08:31 +02:00
parent e993080cf8
commit bf326edfcb
+11 -12
View File
@@ -52,13 +52,13 @@ written in Cython.
%prep
%autosetup -n %{upname}-%{version} -p 1
%{__rm} -fr .egg* *.egg*
rm -fr .egg* *.egg*
# use numpydoc from the package instead
%{__rm} -f doc/sphinxext/numpydoc.py*
rm -f doc/sphinxext/numpydoc.py*
# Python 2 remark
%{__sed} -i 's/fid = file(/fid = open(/' doc/source/conf.py
sed -i 's/fid = file(/fid = open(/' doc/source/conf.py
%build
%py3_build
@@ -68,28 +68,27 @@ written in Cython.
%py3_install
# clean unneeded stuff
%{__rm} -rf %{buildroot}%{python3_sitearch}/bottleneck/src \
rm -rf %{buildroot}%{python3_sitearch}/bottleneck/src \
%{buildroot}%{python3_sitearch}/bottleneck/LICENSE
%{_fixperms} %{buildroot}/*
# Move installed files to temporary location.
%{__mkdir} -p tmp_inst
%{__cp} -fpr %{buildroot}/* tmp_inst
mkdir -p tmp_inst
cp -fpr %{buildroot}/* tmp_inst
# Build the autodocs.
export PYTHONPATH="$(/bin/pwd)/tmp_inst/%{python3_sitearch}"
%{__mkdir} -p doc/source/_static
%{_bindir}/sphinx-build -b html doc/source doc/html
unset PYTHONPATH
export PYTHONPATH="$PWD/tmp_inst/%{python3_sitearch}"
mkdir -p doc/source/_static
sphinx-build -b html doc/source doc/html
# Clean unneeded stuff from docs.
%{__rm} -rf doc/html/{.buildinfo,.doctrees}
rm -rf doc/html/{.buildinfo,.doctrees}
%check
pushd tmp_inst/%{python3_sitearch}
%{_bindir}/nosetests-%{python3_version} -vv
nosetests-%{python3_version} -vv
popd