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

@ -1,12 +0,0 @@
diff -up src/sage/libs/singular/singular.pyx.orig src/sage/libs/singular/singular.pyx
--- src/sage/libs/singular/singular.pyx.orig 2017-03-04 13:34:53.241494624 -0500
+++ src/sage/libs/singular/singular.pyx 2017-03-04 13:35:03.289495008 -0500
@@ -23,6 +23,8 @@ cdef extern from "limits.h":
long INT_MAX
long INT_MIN
+from libc.stdint cimport int64_t
+
import os
from libc.stdint cimport int64_t

View file

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