Fix numerous build failures:

- Build with bundled ipywidgets for now
- Drop unneeded -givaro patch
- Lots of new BRs for building documentation
- R python-backports-shutil_get_terminal_size and python-traitlets (bz 1464520)
- Fix Singular LIB path
- Make sure install operates in a UTF-8 environment
- Build documention with an X server running
- Build HTML documentation with mathjax
This commit is contained in:
Jerry James 2017-11-23 22:47:17 -07:00
parent c8fadf11b8
commit bd028da8f7
2 changed files with 78 additions and 27 deletions

View file

@ -2,6 +2,7 @@
%bcond_with bundled_pexpect
%bcond_with bundled_ipython
%bcond_without bundled_ipywidgets
%bcond_without install_hack
# for faster full rpm test builds
@ -38,6 +39,9 @@
%if %{with bundled_ipython}
%global ipython_pkg ipython-5.1.0
%endif
%if %{with bundled_ipywidgets}
%global ipywidgets_pkg ipywidgets-6.0.0
%endif
%if %{with bundled_pexpect}
%global pexpect_pkg pexpect-4.1.0
%endif
@ -155,9 +159,6 @@ Patch22: %{name}-qepcad.patch
# Correct path to arb headers
Patch23: %{name}-arb.patch
# Adapt to header file changes in givaro 4 and linbox 1.4
Patch24: %{name}-givaro.patch
# No support for f" notation
Patch25: %{name}-nofstring.patch
@ -174,6 +175,7 @@ Patch27: %{name}-gcc6.patch
Patch28: %{name}-atlas.patch
BuildRequires: 4ti2
BuildRequires: apache-commons-cli
BuildRequires: arb-devel
BuildRequires: atlas-devel
BuildRequires: brial-devel
@ -206,11 +208,16 @@ BuildRequires: gap-pkg-tomlib
BuildRequires: gc-devel
BuildRequires: gcc-c++
BuildRequires: gd-devel
BuildRequires: genus2reduction
BuildRequires: gfan
BuildRequires: glpk-devel
BuildRequires: gmp-ecm
BuildRequires: gnutls-devel
BuildRequires: gsl-devel
BuildRequires: ImageMagick
BuildRequires: iml-devel
BuildRequires: jmol
BuildRequires: jsmath-fonts
# To have a proper link
BuildRequires: jsmol
BuildRequires: L-function-devel
@ -221,8 +228,10 @@ BuildRequires: libgap-devel
BuildRequires: libmpc-devel
BuildRequires: linbox-devel
BuildRequires: lrcalc-devel
BuildRequires: lrslib-utils
BuildRequires: m4ri-devel
BuildRequires: m4rie-devel
BuildRequires: mathjax
BuildRequires: maxima-runtime-ecl
BuildRequires: mpfi-devel
BuildRequires: nauty
@ -235,8 +244,13 @@ BuildRequires: planarity-devel
BuildRequires: ppl-devel
BuildRequires: pynac-devel
BuildRequires: python2-devel
BuildRequires: python-backports-shutil_get_terminal_size
BuildRequires: python-brial
BuildRequires: python-cypari2-devel
BuildRequires: python-cysignals-devel
BuildRequires: python-crypto
BuildRequires: python-cvxopt
BuildRequires: python-docutils
BuildRequires: python-flask-autoindex
BuildRequires: python-flask-babel
BuildRequires: python-flask-openid
@ -245,17 +259,27 @@ BuildRequires: python-flask-silk
BuildRequires: python-ipython
%endif
BuildRequires: python-future
BuildRequires: python-ipykernel
BuildRequires: python-jupyter-core
BuildRequires: python-matplotlib
BuildRequires: python-networkx
BuildRequires: python-pathlib2
%if %{without bundled_pexpect}
BuildRequires: python-pexpect
%endif
BuildRequires: python-pickleshare
BuildRequires: python-prompt_toolkit
BuildRequires: python-pkgconfig
BuildRequires: python-psutil
BuildRequires: python-sphinx
BuildRequires: python-six
BuildRequires: python-speaklater
BuildRequires: python-sphinx
BuildRequires: python-traitlets
BuildRequires: python-twisted
BuildRequires: python-twisted-mail
BuildRequires: python-twisted-web
BuildRequires: python-ZODB3
BuildRequires: qepcad-B
BuildRequires: R
BuildRequires: ratpoints-devel
BuildRequires: readline-devel
@ -267,10 +291,14 @@ BuildRequires: stix-math-fonts
BuildRequires: symmetrica-devel
BuildRequires: sympow
BuildRequires: sympy
BuildRequires: tachyon
BuildRequires: texlive
BuildRequires: tex(anyfontsize.sty)
BuildRequires: vecmath
# For _jsdir macro
BuildRequires: web-assets-devel
BuildRequires: xorg-x11-fonts-Type1
BuildRequires: xorg-x11-server-Xvfb
BuildRequires: zn_poly-devel
Requires: 4ti2
@ -295,12 +323,13 @@ Requires: jmol
Requires: jsmol
Requires: jsmath-fonts
Requires: lrslib-utils
Requires: maxima-gui
Requires: mathjax
Requires: maxima-gui
Requires: maxima-runtime-ecl
Requires: nauty
Requires: palp
Requires: pari-gp
Requires: python-backports-shutil_get_terminal_size
Requires: python-brial
Requires: python-cysignals
Requires: python-crypto
@ -314,6 +343,8 @@ Requires: python-future
%if %{without bundled_ipython}
Requires: python-ipython
%endif
Requires: python-ipykernel
Requires: python-jupyter-core
Requires: python-matplotlib
Requires: python-networkx
Requires: python-pathlib2
@ -326,6 +357,7 @@ Requires: python-psutil
Requires: python-six
Requires: python-speaklater
Requires: python-sphinx
Requires: python-traitlets
Requires: python-twisted
Requires: python-twisted-mail
Requires: python-twisted-web
@ -611,6 +643,13 @@ pushd build/pkgs/ipython
popd
%endif
%if %{with bundled_ipywidgets}
pushd build/pkgs/ipywidgets
tar zxf ../../../upstream/%{ipywidgets_pkg}.tar.gz
mv %{ipywidgets_pkg} src
popd
%endif
%if %{with bundled_pexpect}
pushd build/pkgs/pexpect
tar zxf ../../../upstream/%{pexpect_pkg}.tar.gz
@ -690,7 +729,6 @@ popd
%patch21
%patch22
%patch23
%patch24
%patch25
%patch26
%patch27
@ -718,7 +756,7 @@ rm build/pkgs/sagenb/src/sagenb/data/sage3d/lib/sage3d.jar
rm -r build/pkgs/sagenb/src/sagenb.egg-info
# fix Singular paths
sed -e "s,SINGULARPATH=\",&%{_libdir}/Singular/LIB:," \
sed -e "s,SINGULARPATH=\",&%{_datadir}/singular/LIB:," \
-e "s,\(SINGULAR_EXECUTABLE=\"\).*\",\1%{_libdir}/Singular/Singular\"," \
-i src/bin/sage-env
@ -766,6 +804,13 @@ pushd build/pkgs/ipython/src
popd
%endif
%if %{with bundled_ipywidgets}
pushd build/pkgs/ipywidgets/src
%__python2 setup.py build
%__python2 setup.py install --root %{_builddir}
popd
%endif
%if %{with cython_hack}
cp -far %{python_sitearch}/Cython %{_builddir}%{python_sitearch}
BASE=$PWD/build/pkgs/cython/patches/
@ -817,6 +862,7 @@ rm -fr $DOT_SAGE
########################################################################
%install
export LC_ALL=C.UTF-8
export CC=%{__cc}
export SAGE_ROOT=%{buildroot}%{SAGE_ROOT}
export SAGE_LOCAL=%{buildroot}%{SAGE_LOCAL}
@ -1031,6 +1077,11 @@ mv %{_builddir}%{python_sitelib}/IPython %{buildroot}%{SAGE_PYTHONPATH}
mv %{_builddir}%{_bindir}/ip* %{buildroot}%{SAGE_LOCAL}/bin
%endif
#------------------------------------------------------------------------
%if %{with bundled_ipywidgets}
mv %{_builddir}%{python_sitelib}/ipywidgets %{buildroot}%{SAGE_PYTHONPATH}
%endif
#------------------------------------------------------------------------
cat > %{buildroot}%{_bindir}/sage << EOF
#!/bin/bash -i
@ -1102,9 +1153,9 @@ cp -fa $SAGE_PYTHONPATH/pexpect %{buildroot}%{python_sitearch}
# Build documentation, using %#{buildroot} environment
export SAGE_SETUP=$PWD/src/sage_setup
pushd src/doc
export SAGE_DOC=`pwd`
export SAGE_DOC=$PWD
export PATH=%{buildroot}%{_bindir}:$SAGE_LOCAL/bin:$PATH
export SINGULARPATH=%{_libdir}/Singular/LIB
export SINGULARPATH=%{_datadir}/singular/LIB
export SINGULAR_BIN_DIR=%{_libdir}/Singular
export LD_LIBRARY_PATH=%{_libdir}/atlas:$LD_LIBRARY_PATH
export PYTHONPATH=$SAGE_SETUP:%{buildroot}%{python_sitearch}:$SAGE_PYTHONPATH:$SAGE_DOC
@ -1122,10 +1173,9 @@ pushd src/doc
export SAGE_DOC=%{buildroot}%{SAGE_DOC}
export SAGE_DOC_SRC=$SAGE_DOC
# python -m sage_setup.docbuild
# FIXME there is a 'ja' translation, but adding it to $LANGUAGES
# does not get documentation built
SAGE_NUM_THREADS=2 LANGUAGES="ca de en fr hu it pt ru tr" \
%__python2 -m docbuild --no-pdf-links -k all html
# Build with an X server running, required by some doc builders
SAGE_NUM_THREADS=2 LANGUAGES="ca de en fr hu it ja pt ru tr" \
xvfb-run -a -n 1 %__python2 -m docbuild --no-pdf-links -k all html -j
rm -f %{buildroot}%{SAGE_SRC}/doc
ln -sf %{SAGE_DOC} %{buildroot}%{SAGE_SRC}/doc
@ -1270,8 +1320,8 @@ chmod +x %{buildroot}%{SAGE_LOCAL}/bin/sage-list-packages
#------------------------------------------------------------------------
%if %{with docs}
rm %{buildroot}%{SAGE_DOC}/doctrees
rm %{buildroot}%{SAGE_DOC}/inventory
rm -fr %{buildroot}%{SAGE_DOC}/doctrees
rm -fr %{buildroot}%{SAGE_DOC}/inventory
%endif
# last install command
@ -1373,6 +1423,9 @@ exit 0
%if %{with bundled_ipython}
%{SAGE_PYTHONPATH}/IPython
%endif
%if %{with bundled_ipywidgets}
%{SAGE_PYTHONPATH}/ipywidgets
%endif
#------------------------------------------------------------------------
%files data
@ -1566,6 +1619,16 @@ exit 0
########################################################################
%changelog
* Thu Nov 23 2017 Jerry James <loganjerry@gmail.com> - 8.0-1
- Build with bundled ipywidgets for now
- Drop unneeded -givaro patch
- Lots of new BRs for building documentation
- R python-backports-shutil_get_terminal_size and python-traitlets (bz 1464520)
- Fix Singular LIB path
- Make sure install operates in a UTF-8 environment
- Build documention with an X server running
- Build HTML documentation with mathjax
* Fri Nov 10 2017 pcpa <paulo.cesar.pereira.de.andrade@gmail.com> - 8.0-1
- Update to sagemath 8.0
- Remove cryptominisat build requires