Update to sagemath 8.4.

Also:
- Build for python 3 instead of python 2 due to upcoming python 2 removal.
- Add -python3 and -escape patches to fix problems with python 3.
- Drop -nofstring patch, only needed for python 2.
- Drop upstreamed -eclib patch.
- Switch from atlas to openblas and rename -atlas patch to -openblas.
- Add -buildroot patch and only build cython interfaces once.
This commit is contained in:
Jerry James 2018-11-01 19:25:26 -06:00
parent 1a0bd1afc6
commit eaa777c690
19 changed files with 1557 additions and 473 deletions

View file

@ -1,6 +1,6 @@
%global __provides_exclude_from .*/site-packages/.*\\.so
# This package install python files in nonstandard places
# This package installs python files in nonstandard places
%global _python_bytecompile_extra 0
%bcond_with bundled_pexpect
@ -44,21 +44,21 @@
%global flintqs_pkg flintqs-1.0
%global graphs_pkg graphs-20161026
%if %{with bundled_ipython}
%global ipython_pkg ipython-5.5.0
%global ipython_pkg ipython-5.8.0
%endif
%if %{with bundled_ipywidgets}
%global ipywidgets_pkg ipywidgets-7.2.0
%endif
%if %{with bundled_pexpect}
%global pexpect_pkg pexpect-4.1.0
%global pexpect_pkg pexpect-4.6.0
%endif
%global polytopes_db_pkg polytopes_db-20170220
%global rubiks_pkg rubiks-20070912
%global sagenb_pkg sagenb-1.0.3
%global sagenb_export_pkg sagenb_export-3.2
%global sagetex_pkg sagetex-3.0
%global Sphinx_pkg Sphinx-1.7.5
%global singular_pkg singular-4.1.0p3
%global Sphinx_pkg Sphinx-1.7.6
%global singular_pkg singular-4.1.1p3
%if %{with bundled_thebe}
%global thebe_pkg thebe-9624e0a0
%endif
@ -72,7 +72,7 @@
# Spkg equivalents of required rpms; we pretend they are installed as spkgs.
# The version numbers shown are those of the latest released spkg, if the Fedora
# version is not behind.
%global SAGE_REQUIRED_PKGS 4ti2-1.6.7 cbc-2.9.4 CoCoALib-0.99564 cryptominisat-5.0.1 gap_packages-4.8.6new2 gmp-6.1.2 gmpy2-2.1.0a1 lrslib-062+autotools-2017-03-03 qepcad-B.1.69 saclib-2.2.6 surf-1.0.6-gcc6
%global SAGE_REQUIRED_PKGS 4ti2-1.6.7 cbc-2.9.4 CoCoALib-0.99564 cryptominisat-5.0.1 gap_packages-4.8.6new2 gmp-6.1.2 gmpy2-2.1.0a1 lrslib-062+autotools-2017-03-03 qepcad-B.1.71 saclib-2.2.7 sirocco-2.0 surf-1.0.6-gcc6
%global SAGE_ROOT %{_libdir}/sagemath
%global SAGE_LOCAL %{SAGE_ROOT}/local
@ -85,7 +85,7 @@
Name: sagemath
Summary: A free open-source mathematics software system
Version: 8.3
Version: 8.4
Release: 1%{?dist}
# The file ${SAGE_ROOT}/COPYING.txt is the upstream license breakdown file
# Additionally, every $files section has a comment with the license name
@ -97,9 +97,6 @@ Source1: gprc.expect
# Follow maxima's ExclusiveArch
ExclusiveArch: aarch64 %{arm} %{ix86} x86_64 ppc sparcv9
# Upstream uses mpir not gmp, but the rpm package is tailored to use gmp
Patch1: %{name}-gmp.patch
# Set of patches to work with system wide packages
Patch2: %{name}-scripts.patch
@ -140,11 +137,17 @@ Patch10: %{name}-jmol.patch
# FIXME actually it should be already available in pari-elldata
Patch11: %{name}-cremona.patch
# adapt to python 3 and cython running in python 3 mode
Patch12: %{name}-python3.patch
# correct path to the nauty geng program
# http://cs.anu.edu.au/~bdm/nauty/
# http://pallini.di.uniroma1.it/
Patch13: %{name}-nauty.patch
# remove the buildroot path from Cython output
Patch14: %{name}-buildroot.patch
# correct path to Lfunction include
# update c++ standard to fix FTBFS
Patch15: %{name}-lcalc.patch
@ -174,21 +177,19 @@ Patch22: %{name}-qepcad.patch
# Correct path to arb headers
Patch23: %{name}-arb.patch
# No support for f" notation
Patch24: %{name}-nofstring.patch
# Add missing escapes, or convert strings to raw strings
Patch24: %{name}-escape.patch
# Add missing include paths
Patch25: %{name}-includes.patch
# Use atlas blas
Patch26: %{name}-atlas.patch
# Use openblas
Patch26: %{name}-openblas.patch
# Adapt to recent versions of eclib
Patch27: %{name}-eclib.patch
BuildRequires: gdb
BuildRequires: 4ti2
BuildRequires: arb-devel
BuildRequires: atlas-devel
BuildRequires: boost-devel
BuildRequires: brial-devel
BuildRequires: cddlib-tools
@ -231,8 +232,10 @@ BuildRequires: jsmol
BuildRequires: L-function-devel
BuildRequires: lapack-devel
BuildRequires: latte-integrale
BuildRequires: libbraiding-devel
BuildRequires: libfplll-devel
BuildRequires: libgap-devel
BuildRequires: libhomfly-devel
BuildRequires: libmpc-devel
BuildRequires: libpng-devel
BuildRequires: linbox-devel
@ -245,6 +248,7 @@ BuildRequires: maxima-runtime-ecl
BuildRequires: mpfi-devel
BuildRequires: nauty
BuildRequires: ntl-devel
BuildRequires: openblas-devel
BuildRequires: openssl
BuildRequires: palp
BuildRequires: pari-devel
@ -254,77 +258,74 @@ BuildRequires: pari-seadata
BuildRequires: planarity-devel
BuildRequires: ppl-devel
BuildRequires: pynac-devel
BuildRequires: python2-devel
%if %{with bundled_ipython}
BuildRequires: python2-backports-shutil_get_terminal_size
%endif
BuildRequires: python2-brial
BuildRequires: python3-devel
BuildRequires: python3-cypari2-devel
BuildRequires: python3-cysignals-devel
BuildRequires: python3-pillow-devel
BuildRequires: python3dist(brial)
%if %{with sphinx_hack}
BuildRequires: python2-configparser
BuildRequires: python3dist(configparser)
%endif
BuildRequires: python2-cypari2-devel
BuildRequires: python2-cysignals-devel
BuildRequires: python2-Cython
BuildRequires: python2-crypto
BuildRequires: python2-cryptominisat
BuildRequires: python2-cvxopt
BuildRequires: python2-docutils
BuildRequires: python2-flask-autoindex
BuildRequires: python2-flask-babel
BuildRequires: python2-flask-openid
BuildRequires: python2-flask-silk
BuildRequires: python2-fpylll
BuildRequires: python2-future
BuildRequires: python2-gmpy2
BuildRequires: python3dist(cvxopt)
BuildRequires: python3dist(cython)
BuildRequires: python3dist(docutils)
BuildRequires: python3dist(flask-autoindex)
BuildRequires: python3dist(flask-babel)
BuildRequires: python3dist(flask-openid)
BuildRequires: python3dist(flask-silk)
BuildRequires: python3dist(fpylll)
BuildRequires: python3dist(future)
BuildRequires: python3dist(gmpy2)
%if %{with sphinx_hack}
BuildRequires: python2-html5lib
BuildRequires: python2-imagesize
BuildRequires: python3dist(html5lib)
BuildRequires: python3dist(imagesize)
%endif
BuildRequires: python2-ipykernel
BuildRequires: python3dist(ipykernel)
%if %{without bundled_ipython}
BuildRequires: python2-ipython
BuildRequires: python3dist(ipython)
%endif
BuildRequires: python2-matplotlib
BuildRequires: python2-networkx
BuildRequires: python2-notebook
BuildRequires: python3dist(kiwisolver)
BuildRequires: python3dist(matplotlib)
BuildRequires: python3dist(networkx)
BuildRequires: python3dist(notebook)
%if %{with bundled_ipython}
BuildRequires: python2-path
BuildRequires: python3dist(path.py)
%endif
BuildRequires: python2-pathlib2
BuildRequires: python3dist(pathlib2)
%if %{without bundled_pexpect}
BuildRequires: python2-pexpect
BuildRequires: python3dist(pexpect)
%endif
BuildRequires: python2-pickleshare
BuildRequires: python2-pillow-devel
BuildRequires: python2-pip
BuildRequires: python2-prompt_toolkit
BuildRequires: python2-pkgconfig
BuildRequires: python2-psutil
BuildRequires: python2-ptyprocess
BuildRequires: python2-scipy
BuildRequires: python2-send2trash
BuildRequires: python2-setuptools
BuildRequires: python3dist(pickleshare)
BuildRequires: python3dist(pip)
BuildRequires: python3dist(prompt-toolkit)
BuildRequires: python3dist(pkgconfig)
BuildRequires: python3dist(psutil)
BuildRequires: python3dist(ptyprocess)
BuildRequires: python3dist(pycryptosat)
%if %{with bundled_ipython}
BuildRequires: python2-simplegeneric
BuildRequires: python3dist(pyzmq)
%endif
BuildRequires: python2-six
BuildRequires: python2-speaklater
BuildRequires: python2-sphinx
BuildRequires: python2-sympy
BuildRequires: python2-twisted
BuildRequires: python3dist(rpy2)
BuildRequires: python3dist(scipy)
BuildRequires: python3dist(scons)
BuildRequires: python3dist(send2trash)
BuildRequires: python3dist(setuptools)
%if %{with bundled_ipython}
BuildRequires: python2-zmq
BuildRequires: python3dist(simplegeneric)
%endif
BuildRequires: python2-ZODB3
BuildRequires: python3-Cython
BuildRequires: python3dist(six)
BuildRequires: python3dist(speaklater)
BuildRequires: python3dist(sphinx)
BuildRequires: python3dist(sympy)
BuildRequires: python3dist(twisted)
BuildRequires: python3dist(zodb3)
BuildRequires: qepcad-B
BuildRequires: R
BuildRequires: ratpoints-devel
BuildRequires: readline-devel
BuildRequires: rpy
BuildRequires: rw-devel
BuildRequires: scons
BuildRequires: Singular-devel
BuildRequires: sirocco-devel
BuildRequires: stix-math-fonts
BuildRequires: symmetrica-devel
BuildRequires: sympow
@ -368,67 +369,64 @@ Requires: palp
Requires: pari-galdata
Requires: pari-gp
Requires: pari-seadata
%if %{with bundled_ipython}
Requires: python2-backports-shutil_get_terminal_size
%endif
Requires: python2-brial
Requires: python3dist(brial)
%if %{with sphinx_hack}
Requires: python2-configparser
Requires: python3dist(configparser)
%endif
Requires: python2-cypari2
Requires: python2-cysignals
Requires: python2-crypto
Requires: python2-cryptominisat
Requires: python2-cvxopt
Requires: python2-Cython
Requires: python2-docutils
Requires: python2-flask-autoindex
Requires: python2-flask-babel
Requires: python2-flask-openid
Requires: python2-flask-silk
Requires: python2-fpylll
Requires: python2-future
Requires: python2-gmpy2
Requires: python3dist(cypari2)
Requires: python3dist(cysignals)
Requires: python3dist(cvxopt)
Requires: python3dist(cython)
Requires: python3dist(docutils)
Requires: python3dist(flask-autoindex)
Requires: python3dist(flask-babel)
Requires: python3dist(flask-openid)
Requires: python3dist(flask-silk)
Requires: python3dist(fpylll)
Requires: python3dist(future)
Requires: python3dist(gmpy2)
%if %{with sphinx_hack}
Requires: python2-html5lib
Requires: python2-imagesize
Requires: python3dist(html5lib)
Requires: python3dist(imagesize)
%endif
Requires: python2-ipykernel
Requires: python3dist(ipykernel)
%if %{without bundled_ipython}
Requires: python2-ipython
Requires: python3dist(ipython)
%endif
Requires: python2-matplotlib
Requires: python2-networkx
Requires: python2-notebook
Requires: python3dist(kiwisolver)
Requires: python3dist(matplotlib)
Requires: python3dist(networkx)
Requires: python3dist(notebook)
%if %{with bundled_ipython}
Requires: python2-path
Requires: python3dist(path)
%endif
Requires: python2-pathlib2
Requires: python3dist(pathlib2)
%if %{without bundled_pexpect}
Requires: python2-pexpect
Requires: python3dist(pexpect)
%endif
Requires: python2-pickleshare
Requires: python2-pillow
Requires: python2-prompt_toolkit
Requires: python2-psutil
Requires: python2-ptyprocess
Requires: python2-scipy
Requires: python2-send2trash
Requires: python3dist(pickleshare)
Requires: python3dist(pillow)
Requires: python3dist(prompt-toolkit)
Requires: python3dist(psutil)
Requires: python3dist(ptyprocess)
Requires: python3dist(pycryptosat)
Requires: python3dist(rpy2)
Requires: python3dist(scipy)
Requires: python3dist(send2trash)
%if %{with bundled_ipython}
BuildRequires: python2-simplegeneric
BuildRequires: python3dist(simplegeneric)
%endif
Requires: python2-six
Requires: python2-speaklater
Requires: python2-sphinx
Requires: python2-sympy
Requires: python2-twisted
Requires: python3dist(six)
Requires: python3dist(speaklater)
Requires: python3dist(sphinx)
Requires: python3dist(sympy)
Requires: python3dist(twisted)
%if %{with bundled_ipython}
Requires: python2-zmq
Requires: python3dist(zmq)
%endif
Requires: python2-ZODB3
Requires: python3dist(zodb3)
Requires: qepcad-B
Requires: R
Requires: rpy
Requires: %{name}-core
Requires: %{name}-data
%if %{with docs}
@ -825,7 +823,6 @@ pushd build/pkgs/widgetsnbextension
popd
%endif
%patch1
%patch2
%patch3
%patch4
@ -836,7 +833,9 @@ popd
%patch9
%patch10
%patch11
%patch12
%patch13
%patch14
%patch15
%patch16
%patch17
@ -854,13 +853,13 @@ popd
%patch24
%patch25
%patch26
%patch27
sed -e 's|@@SAGE_ROOT@@|%{SAGE_ROOT}|' \
-e 's|@@SAGE_DOC@@|%{SAGE_DOC}|' \
-i src/sage/env.py
sed -e 's|@@CYSIGNALS@@|%{python2_sitearch}/cysignals|' \
sed -e 's|@@CYSIGNALS@@|%{python3_sitearch}/cysignals|' \
-e 's|@@BUILDROOT@@|%{buildroot}|' \
-i src/setup.py
sed -e "/flask-oldsessions/d" \
@ -886,31 +885,39 @@ sed -e "s,\(SINGULAR_SO = \)SAGE.*,\1'%{_libdir}/libSingular-$singver.so'," \
# fix shebangs; some paths contains spaces, so use the null byte facility
grep -FrlZ '#!%{_bindir}/env python' | \
xargs -0 sed -i 's,#!%{_bindir}/env python,#!%{__python2},'
xargs -0 sed -i 's,#!%{_bindir}/env python,#!%{__python3},'
grep -FrlZ '#!%{_bindir}/env sage-python23' | \
xargs -0 sed -i 's,#!%{_bindir}/env sage-python23,#!%{__python2},'
xargs -0 sed -i 's,#!%{_bindir}/env sage-python23,#!%{__python3},'
grep -FrlZ '#!%{_bindir}/env' | \
xargs -0 sed -i 's,#!%{_bindir}/env ,#!%{_bindir}/,'
grep -rlZ '#!%{_bindir}/python$' | xargs -0 sed -i 's,#!%{_bindir}/python$,&2,'
sed -i 's,%{_bindir}/env python,%{__python2},' \
grep -rlZ '#!%{_bindir}/python$' | xargs -0 sed -i 's,#!%{_bindir}/python$,&3,'
sed -i 's,%{_bindir}/env python,%{__python3},' \
%if %{with bundled_pexpect}
build/pkgs/pexpect/src/examples/python.py \
%endif
build/pkgs/sagetex/src/sagetex.ins
sed -i 's,%{_bindir}/python,&2,' src/sage/misc/dev_tools.py
sed -i 's,%{_bindir}/python,&3,' src/sage/misc/dev_tools.py
sed -e 's,local/bin/python,bin/python,' \
-e 's,#!%{_bindir}/python,&2,' \
-e 's,#!%{_bindir}/python,&3,' \
-i src/sage/repl/preparse.py
%if %{with bundled_ipython}
sed -e "s|'%{_bindir}/env', 'which'|'%{_bindir}/which'|" \
-i build/pkgs/ipython/src/IPython/utils/_process_posix.py
%endif
# fix path to pip for python 3
sed -i 's/"pip",/"pip3",/' src/sage/misc/package.py
# GAP does not have enough memory to load the entire workspace
sed -i 's/64m/128m/' src/sage/libs/gap/util.pyx
########################################################################
%build
export CC=%{__cc}
export CFLAGS="%{optflags}"
export CXXFLAGS="%{optflags}"
export SAGE_PYTHON_VERSION=3
export SAGE_ROOT=%{buildroot}%{SAGE_ROOT}
export SAGE_LOCAL=%{buildroot}%{SAGE_LOCAL}
# Avoid buildroot in gcc command line (use _builddir instead)
@ -934,8 +941,8 @@ ln -sf %{_includedir} $SAGE_LOCAL/include
ln -sf %{_datadir} $SAGE_LOCAL/share
export PATH=%{buildroot}%{_bindir}:$PATH
export PYTHON=%{_bindir}/python2
export PYTHONPATH=%{buildroot}%{python2_sitearch}:$PYTHONPATH
export PYTHON=%{_bindir}/python3
export PYTHONPATH=%{buildroot}%{python3_sitearch}:$PYTHONPATH
#------------------------------------------------------------------------
# Save and update environment to generate bundled interfaces
@ -946,29 +953,29 @@ export SAGE_LOCAL=%{_builddir}
%if %{with bundled_ipython}
pushd build/pkgs/ipython/src
%__python2 setup.py build
%__python2 setup.py install --root %{_builddir}
%__python3 setup.py build
%__python3 setup.py install --root %{_builddir}
popd
%endif
%if %{with bundled_ipywidgets}
pushd build/pkgs/ipywidgets/src
%__python2 setup.py build
%__python2 setup.py install --root %{_builddir}
%__python3 setup.py build
%__python3 setup.py install --root %{_builddir}
popd
%endif
%if %{with bundled_widgetsnbextension}
pushd build/pkgs/widgetsnbextension/src
%__python2 setup.py build
%__python2 setup.py install --root %{_builddir}
%__python3 setup.py build
%__python3 setup.py install --root %{_builddir}
popd
%endif
%if %{with cython_hack}
cp -far %{python2_sitearch}/Cython %{_builddir}%{python2_sitearch}
cp -far %{python3_sitearch}/Cython %{_builddir}%{python3_sitearch}
BASE=$PWD/build/pkgs/cython/patches/
pushd %{_builddir}%{python2_sitearch}
pushd %{_builddir}%{python3_sitearch}
for PATCH in pxi_sys_path.patch
do
patch -p1 < $BASE/$PATCH
@ -983,16 +990,16 @@ mkdir -p %{buildroot}%{SAGE_SPKG_INST}
mkdir -p %{buildroot}%{_libdir}/sagemath/build/pkgs
pushd src
%__python2 -u ./setup.py build
%__python3 -u ./setup.py build
popd
#------------------------------------------------------------------------
pushd build/pkgs/sagenb/src
%__python2 ./setup.py build
%__python3 ./setup.py build
popd
pushd build/pkgs/sagenb_export/src
%__python2 ./setup.py build
%__python3 ./setup.py build
popd
#------------------------------------------------------------------------
@ -1005,16 +1012,6 @@ pushd build/pkgs/rubiks/src
make %{?_smp_mflags} CC="gcc -fPIC" CXX="g++ -fPIC" CFLAGS="%{optflags}" CXXFLAGS="%{optflags}"
popd
# Remove buildroot reference from cython comments
perl -pi -e 's|%{buildroot}||g;' `find src/build/cythonized -type f`
# Try hard to remove buildroot from binaries
rm -f `grep -lr "%{buildroot}" src/build/lib.linux-*/`
rm -f `grep -lr "%{buildroot}" src/build/temp.linux-*/`
pushd src
%__python2 ./setup.py build
popd
# last build command
rm -fr $DOT_SAGE
@ -1039,9 +1036,9 @@ export DOT_SAGE=/tmp/sage$$
mkdir -p $DOT_SAGE/tmp
export PATH=%{buildroot}%{_bindir}:$PATH
export PYTHON=%{_bindir}/python2
export PYTHONPATH=%{buildroot}%{python2_sitearch}:$PYTHONPATH
export PYTHONPATH=%{_builddir}%{python2_sitearch}:$PYTHONPATH
export PYTHON=%{_bindir}/python3
export PYTHONPATH=%{buildroot}%{python3_sitearch}:$PYTHONPATH
export PYTHONPATH=%{_builddir}%{python3_sitearch}:$PYTHONPATH
#------------------------------------------------------------------------
mkdir -p %{buildroot}%{_bindir}
@ -1076,10 +1073,10 @@ popd
#------------------------------------------------------------------------
pushd src
%if %{without install_hack}
%py2_install
%py3_install
%else
mkdir -p %{buildroot}%{python2_sitearch}
cp -far build/lib.linux-*/sage %{buildroot}%{python2_sitearch}
mkdir -p %{buildroot}%{python3_sitearch}
cp -far build/lib.linux-*/sage %{buildroot}%{python3_sitearch}
%endif
%if %{with docs}
# install documentation sources
@ -1090,23 +1087,23 @@ popd
#------------------------------------------------------------------------
pushd build/pkgs/sagenb/src
rm -f %{buildroot}%{python2_sitearch}/sagenb/data/sage3d/sage3d
%py2_install "--install-purelib=%{python2_sitearch}"
rm -f %{buildroot}%{python3_sitearch}/sagenb/data/sage3d/sage3d
%py3_install "--install-purelib=%{python3_sitearch}"
# jsmol
ln -sf %{_jsdir}/jsmol $SAGE_SHARE/jsmol
# sage3d
rm -f %{buildroot}%{_bindir}/sage3d
%if %{with sage3d}
ln -sf %{SAGE_LOCAL}/bin/sage3d %{buildroot}%{python2_sitearch}/sagenb/data/sage3d/sage3d
ln -sf %{SAGE_LOCAL}/bin/sage3d %{buildroot}%{python3_sitearch}/sagenb/data/sage3d/sage3d
%endif
ln -sf %{python2_sitearch}/sagenb %{buildroot}%{SAGE_SRC}/sagenb
ln -sf %{python3_sitearch}/sagenb %{buildroot}%{SAGE_SRC}/sagenb
# use system mathjax
ln -sf %{_jsdir}/mathjax %{buildroot}%{python2_sitearch}/sagenb/data/mathjax
ln -sf %{_jsdir}/mathjax %{buildroot}%{python3_sitearch}/sagenb/data/mathjax
popd
#------------------------------------------------------------------------
pushd build/pkgs/sagenb_export/src
%py2_install
%py3_install
popd
#------------------------------------------------------------------------
@ -1123,8 +1120,8 @@ pushd src/bin
cp -fa sage-* $SAGE_LOCAL/bin
pushd $SAGE_LOCAL/bin
ln -sf %{_bindir}/jmol jmol
ln -sf %{_bindir}/python sage.bin
ln -sf %{_bindir}/python python
ln -sf %{_bindir}/python3 sage.bin
ln -sf %{_bindir}/python3 python
ln -sf %{_bindir}/gp sage_pari
ln -sf %{_bindir}/gap gap
ln -sf %{_bindir}/gmp-ecm ecm
@ -1200,7 +1197,7 @@ popd
#------------------------------------------------------------------------
pushd build/pkgs/conway_polynomials
%__python2 ./spkg-install.py
%__python3 ./spkg-install.py
popd
#------------------------------------------------------------------------
@ -1211,7 +1208,7 @@ pushd build/pkgs/elliptic_curves
tar jxf ../../../upstream/%{elliptic_curves_pkg}.tar.bz2
mv %{elliptic_curves_pkg} src
fi
%__python2 ./spkg-install.py
%__python3 ./spkg-install.py
popd
#------------------------------------------------------------------------
@ -1228,7 +1225,7 @@ popd
#------------------------------------------------------------------------
pushd build/pkgs/sagetex/src
%py2_install "--install-purelib=%{python2_sitearch}"
%py3_install "--install-purelib=%{python3_sitearch}"
mv %{buildroot}%{_texmf_main}/tex/latex/sagetex/CONTRIBUTORS \
%{buildroot}%{_docdir}/sagetex
for file in PKG-INFO README; do
@ -1238,13 +1235,13 @@ popd
#------------------------------------------------------------------------
%if %{with bundled_ipython}
mv %{_builddir}%{python2_sitelib}/IPython %{buildroot}%{SAGE_PYTHONPATH}
mv %{_builddir}%{python3_sitelib}/IPython %{buildroot}%{SAGE_PYTHONPATH}
mv %{_builddir}%{_bindir}/ip* %{buildroot}%{SAGE_LOCAL}/bin
%endif
#------------------------------------------------------------------------
%if %{with bundled_ipywidgets}
mv %{_builddir}%{python2_sitelib}/ipywidgets %{buildroot}%{SAGE_PYTHONPATH}
mv %{_builddir}%{python3_sitelib}/ipywidgets %{buildroot}%{SAGE_PYTHONPATH}
%endif
#------------------------------------------------------------------------
@ -1265,7 +1262,7 @@ popd
#------------------------------------------------------------------------
%if %{with bundled_widgetsnbextension}
pushd build/pkgs/widgetsnbextension/src
%py2_install "--install-purelib=%{python2_sitelib}"
%py3_install "--install-purelib=%{python3_sitelib}"
mv %{buildroot}%{_prefix}%{_sysconfdir} %{buildroot}%{_sysconfdir}
popd
%endif
@ -1324,17 +1321,17 @@ chmod +x %{buildroot}%{SAGE_LOCAL}/bin/sage3d
# o install .pxi and .pxd files
pushd src
for f in `find sage \( -name \*.pxi -o -name \*.pxd -o -name \*.pyx \)`; do
install -p -D -m 0644 $f %{buildroot}%{python2_sitearch}/$f
install -p -D -m 0644 $f %{buildroot}%{python3_sitearch}/$f
done
# need this or will not "find" the files in the directory, and
# fail to link with gmp
touch %{buildroot}%{python2_sitearch}/sage/libs/gmp/__init__.py
touch %{buildroot}%{python3_sitearch}/sage/libs/gmp/__init__.py
popd
%if %{with docs}
#------------------------------------------------------------------------
%if %{with bundled_pexpect}
cp -fa $SAGE_PYTHONPATH/pexpect %{buildroot}%{python2_sitearch}
cp -fa $SAGE_PYTHONPATH/pexpect %{buildroot}%{python3_sitearch}
%endif
# Build documentation, using %#{buildroot} environment
@ -1344,13 +1341,12 @@ pushd src/doc
export PATH=%{buildroot}%{_bindir}:$SAGE_LOCAL/bin:$PATH
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}%{python2_sitearch}:$SAGE_PYTHONPATH:$SAGE_DOC
export PYTHONPATH=$SAGE_SETUP:%{buildroot}%{python3_sitearch}:$SAGE_PYTHONPATH:$SAGE_DOC
%if %{with sphinx_hack}
pushd ../../build/pkgs/sphinx/src
%py2_build
%py2_install "--install-purelib=%{python2_sitearch}"
%py3_build
%py3_install "--install-purelib=%{python3_sitearch}"
rm -f %{buildroot}%{_bindir}/sphinx*
popd
%endif
@ -1362,7 +1358,7 @@ pushd src/doc
# python -m sage_setup.docbuild
# 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
xvfb-run -a -n 1 %__python3 -m docbuild --no-pdf-links -k all html -j
rm -f %{buildroot}%{SAGE_SRC}/doc
ln -sf %{SAGE_DOC} %{buildroot}%{SAGE_SRC}/doc
@ -1380,12 +1376,12 @@ sed -i 's|%{buildroot}||g' $SAGE_DOC/test.log
%endif
%if %{with bundled_pexpect}
rm -f %{buildroot}%{python2_sitearch}/pexpect
rm -f %{buildroot}%{python3_sitearch}/pexpect
%endif
%if %{with sphinx_hack}
rm -fr %{buildroot}%{python2_sitearch}/sphinx \
%{buildroot}%{python2_sitearch}/Sphinx*
rm -fr %{buildroot}%{python3_sitearch}/sphinx \
%{buildroot}%{python3_sitearch}/Sphinx*
%endif
# More wrong buildroot references
@ -1403,8 +1399,8 @@ perl -pi -e 's|%{buildroot}||g;s|^##||g;' %{buildroot}%{_bindir}/sage
export SAGE_SRC=%{buildroot}%{SAGE_SRC}
rm -fr $SAGE_SRC/sage $SAGE_ETC/sage $SAGE_ROOT/doc $SAGE_SRC/doc
rm -fr $SAGE_ROOT/share $SAGE_ROOT/devel
ln -sf %{python2_sitearch}/sage $SAGE_SRC/sage
ln -sf %{python2_sitearch} $SAGE_ETC/sage
ln -sf %{python3_sitearch}/sage $SAGE_SRC/sage
ln -sf %{python3_sitearch} $SAGE_ETC/sage
ln -sf %{SAGE_DOC} $SAGE_ROOT/doc
%if %{with docs}
ln -sf %{SAGE_DOC} $SAGE_SRC/doc
@ -1452,10 +1448,10 @@ find %{buildroot}%{SAGE_DOC} -type d -name _sources -exec rm -fr {} \+
%endif
# remove .po files
rm %{buildroot}%{python2_sitearch}/sagenb/translations/*/LC_MESSAGES/*.po
rm %{buildroot}%{python3_sitearch}/sagenb/translations/*/LC_MESSAGES/*.po
%if %{without sage3d}
rm -r %{buildroot}%{python2_sitearch}/sagenb/data/sage3d
rm -r %{buildroot}%{python3_sitearch}/sagenb/data/sage3d
%endif
# remove build directory in buildroot
@ -1464,7 +1460,7 @@ rm -r %{buildroot}%{python2_sitearch}/sagenb/data/sage3d
%if %{without install_hack}
# remove sage_setup
rm -r %{buildroot}%{python2_sitearch}/sage_setup
rm -r %{buildroot}%{python3_sitearch}/sage_setup
%endif
# pretend sagemath spkgs are installed to reduce number of errors
@ -1517,7 +1513,7 @@ chmod +x %{buildroot}%{SAGE_LOCAL}/bin/sage-list-packages
#------------------------------------------------------------------------
# Byte compile python files in nonstandard places
%py_byte_compile %{__python2} %{buildroot}%{_texmf_main}/tex/latex/sagetex
%py_byte_compile %{__python3} %{buildroot}%{_texmf_main}/tex/latex/sagetex
# last install command
rm -fr $DOT_SAGE
@ -1545,6 +1541,7 @@ rm -fr $DOT_SAGE
%{SAGE_LOCAL}/include
%{SAGE_LOCAL}/lib
%{SAGE_LOCAL}/share
%{SAGE_LOCAL}/var
%{SAGE_ROOT}/doc
%{SAGE_ROOT}/devel
%{SAGE_ROOT}/share
@ -1558,7 +1555,6 @@ rm -fr $DOT_SAGE
%{_bindir}/sage
%{_datadir}/pixmaps/%{name}.png
%{_datadir}/applications/%{name}.desktop
%{SAGE_SPKG_INST}
%if %{with bundled_thebe}
# MIT
%{SAGE_SHARE}/thebe
@ -1571,9 +1567,9 @@ rm -fr $DOT_SAGE
#------------------------------------------------------------------------
%files core
# GPLv2+
%{python2_sitearch}/sage
%{python3_sitearch}/sage
%if %{without install_hack}
%{python2_sitearch}/sage-*.egg-info
%{python3_sitearch}/sage-*.egg-info
%endif
%if %{with bundled_ipython}
%{SAGE_PYTHONPATH}/IPython
@ -1587,7 +1583,7 @@ rm -fr $DOT_SAGE
%dir %{_sysconfdir}/jupyter/nbconfig/notebook.d
%config(noreplace) %{_sysconfdir}/jupyter/nbconfig/notebook.d/*.json
%{_datadir}/jupyter/
%{python2_sitelib}/widgetsnbextension*
%{python3_sitelib}/widgetsnbextension*
%endif
#------------------------------------------------------------------------
@ -1702,76 +1698,79 @@ rm -fr $DOT_SAGE
%{SAGE_ETC}/notebook-ipython
# GPLv2+
%{SAGE_SRC}/sagenb
%dir %{python2_sitearch}/sagenb
%{python2_sitearch}/sagenb/*.py*
%{python2_sitearch}/sagenb-*.egg-info
%dir %{python2_sitearch}/sagenb/data
%dir %{python3_sitearch}/sagenb
%{python3_sitearch}/sagenb/*.py*
%{python3_sitearch}/sagenb/__pycache__/
%{python3_sitearch}/sagenb/data/__pycache__/
%{python3_sitearch}/sagenb/testing/__pycache__/
%{python3_sitearch}/sagenb-*.egg-info
%dir %{python3_sitearch}/sagenb/data
# BSD
%{python2_sitearch}/sagenb/data/codemirror
%{python3_sitearch}/sagenb/data/codemirror
# MIT
%{python2_sitearch}/sagenb/data/graph_editor
%{python3_sitearch}/sagenb/data/graph_editor
# ASL 2.0
%{python2_sitearch}/sagenb/data/highlight
%{python3_sitearch}/sagenb/data/highlight
# LGPLv2+
%{SAGE_SHARE}/jsmol
# (MIT or GPLv2) and (MIT and BSD and GPL)
%{python2_sitearch}/sagenb/data/jquery
%{python3_sitearch}/sagenb/data/jquery
# (MIT or GPLv2) and (MIT and BSD and GPL)
%{python2_sitearch}/sagenb/data/jqueryui
%{python3_sitearch}/sagenb/data/jqueryui
# Public Domain
%{python2_sitearch}/sagenb/data/json
%{python3_sitearch}/sagenb/data/json
# Symbolic link to $_jsdir/mathjax
%{python2_sitearch}/sagenb/data/mathjax
%ghost %{python2_sitearch}/sagenb/data/mathjax.rpmmoved
%{python3_sitearch}/sagenb/data/mathjax
%ghost %{python3_sitearch}/sagenb/data/mathjax.rpmmoved
# Empty (do not run doctests flag file)
%{python2_sitearch}/sagenb/data/nodoctest.py*
%{python3_sitearch}/sagenb/data/nodoctest.py*
# BSD
%{python2_sitearch}/sagenb/data/openid-realselector
%{python3_sitearch}/sagenb/data/openid-realselector
# GPLv2+
%{python2_sitearch}/sagenb/data/sage
%{python3_sitearch}/sagenb/data/sage
%if %{with sage3d}
# GPLv2+
%{python2_sitearch}/sagenb/data/sage3d
%{python3_sitearch}/sagenb/data/sage3d
%endif
# LGPLv2+
%{python2_sitearch}/sagenb/data/tiny_mce
%{python3_sitearch}/sagenb/data/tiny_mce
# LGPLv2+
%{python2_sitearch}/sagenb/data/zorn
%{python3_sitearch}/sagenb/data/zorn
# GPLv2+
%{python2_sitearch}/sagenb/flask_version
%{python3_sitearch}/sagenb/flask_version
# GPLv2+
%{python2_sitearch}/sagenb/interfaces
%{python3_sitearch}/sagenb/interfaces
# GPLv2+
%{python2_sitearch}/sagenb/misc
%{python3_sitearch}/sagenb/misc
# GPLv2+
%{python2_sitearch}/sagenb/notebook
%{python3_sitearch}/sagenb/notebook
# GPLv2+
%{python2_sitearch}/sagenb/simple
%{python3_sitearch}/sagenb/simple
# GPLv2+
%{python2_sitearch}/sagenb/storage
%{python3_sitearch}/sagenb/storage
# GPLv2+
%dir %{python2_sitearch}/sagenb/testing
%{python2_sitearch}/sagenb/testing/*.py*
%{python2_sitearch}/sagenb/testing/tests
%dir %{python3_sitearch}/sagenb/testing
%{python3_sitearch}/sagenb/testing/*.py*
%{python3_sitearch}/sagenb/testing/tests
# ASL 2.0
%{python2_sitearch}/sagenb/testing/selenium
%{python3_sitearch}/sagenb/testing/selenium
# GPLv2+
%dir %{python2_sitearch}/sagenb/translations
%lang(cs_CZ) %{python2_sitearch}/sagenb/translations/cs_CZ
%lang(de_AT) %{python2_sitearch}/sagenb/translations/de_AT
%lang(de_AT) %{python2_sitearch}/sagenb/translations/en_US
%lang(de_AT) %{python2_sitearch}/sagenb/translations/es_ES
%lang(de_AT) %{python2_sitearch}/sagenb/translations/fr_FR
%lang(pt_BR) %{python2_sitearch}/sagenb/translations/pt_BR
%lang(ru_RU) %{python2_sitearch}/sagenb/translations/ru_RU
%lang(uk_UA) %{python2_sitearch}/sagenb/translations/uk_UA
%dir %{python3_sitearch}/sagenb/translations
%lang(cs_CZ) %{python3_sitearch}/sagenb/translations/cs_CZ
%lang(de_AT) %{python3_sitearch}/sagenb/translations/de_AT
%lang(de_AT) %{python3_sitearch}/sagenb/translations/en_US
%lang(de_AT) %{python3_sitearch}/sagenb/translations/es_ES
%lang(de_AT) %{python3_sitearch}/sagenb/translations/fr_FR
%lang(pt_BR) %{python3_sitearch}/sagenb/translations/pt_BR
%lang(ru_RU) %{python3_sitearch}/sagenb/translations/ru_RU
%lang(uk_UA) %{python3_sitearch}/sagenb/translations/uk_UA
#------------------------------------------------------------------------
%files notebook-export
# GPL+
%{_bindir}/sagenb-export
%{python2_sitelib}/sagenb_export
%{python2_sitelib}/sagenb_export-*.egg-info
%{python3_sitelib}/sagenb_export
%{python3_sitelib}/sagenb_export-*.egg-info
#------------------------------------------------------------------------
%files rubiks
@ -1788,12 +1787,21 @@ rm -fr $DOT_SAGE
#------------------------------------------------------------------------
%files sagetex
# GPLv2+
%{python2_sitearch}/sagetex*
%{python3_sitearch}/sagetex*
%{_texmf_main}/tex/latex/sagetex
%doc %{_docdir}/sagetex
########################################################################
%changelog
* Thu Oct 25 2018 Jerry James <loganjerry@gmail.com> - 8.4-1
- Update to sagemath 8.4
- Build for python 3 instead of python 2 due to upcoming python 2 removal
- Add -python3 and -escape patches to fix problems with python 3
- Drop -nofstring patch, only needed for python 2
- Drop upstreamed -eclib patch
- Switch from atlas to openblas and rename -atlas patch to -openblas
- Add -buildroot patch and only build cython interfaces once
* Sat Sep 22 2018 Jerry James <loganjerry@gmail.com> - 8.3-1
- Update to sagemath 8.3 (bz 1612867)
- Drop -lrslib, -gap-hap, and -flask patches