mirror of
https://src.fedoraproject.org/rpms/sagemath.git
synced 2025-04-22 11:45:56 -04:00
Version 9.3.
- Drop -arb and -openblas patches. - Add -cvxopt patch. - Add metainfo file.
This commit is contained in:
parent
26b688d416
commit
0a1b42ef2b
21 changed files with 1096 additions and 1037 deletions
298
sagemath.spec
298
sagemath.spec
|
@ -6,19 +6,11 @@
|
|||
%bcond_with bundled_pexpect
|
||||
%bcond_with bundled_ipython
|
||||
%bcond_without bundled_ipywidgets
|
||||
%bcond_without bundled_jupyter_jsmol
|
||||
%bcond_without bundled_thebe
|
||||
%bcond_without bundled_threejs
|
||||
%bcond_without install_hack
|
||||
|
||||
%if 0%{?fedora} >= 33
|
||||
%bcond_without flexiblas
|
||||
%endif
|
||||
%if %{with flexiblas}
|
||||
%global blaslib flexiblas
|
||||
%else
|
||||
%global blaslib openblas
|
||||
%endif
|
||||
|
||||
# for faster full rpm test builds
|
||||
%ifarch %{ix86} x86_64
|
||||
%bcond_without docs
|
||||
|
@ -48,7 +40,7 @@
|
|||
%global cremona_ver 2019-10-29
|
||||
%global elliptic_curves_pkg elliptic_curves-0.8.1
|
||||
%global flintqs_pkg flintqs-1.0
|
||||
%global graphs_pkg graphs-20161026
|
||||
%global graphs_pkg graphs-20210214
|
||||
%if %{with bundled_ipython}
|
||||
%global ipython_ver 7.13.0
|
||||
%global ipython_pkg ipython-%{ipython_ver}
|
||||
|
@ -56,27 +48,31 @@
|
|||
%global prompt_tookit_pkg prompt_toolkit-%{prompt_toolkit_ver}
|
||||
%endif
|
||||
%if %{with bundled_ipywidgets}
|
||||
%global ipywidgets_ver 7.5.1
|
||||
%global ipywidgets_ver 7.6.3
|
||||
%global ipywidgets_pkg ipywidgets-%{ipywidgets_ver}
|
||||
%endif
|
||||
%if %{with bundled_jupyter_jsmol}
|
||||
%global jupyter_jsmol_ver 0.2.4
|
||||
%global jupyter_jsmol_pkg jupyter_jsmol-%{jupyter_jsmol_ver}
|
||||
%endif
|
||||
%if %{with bundled_pexpect}
|
||||
%global pexpect_pkg pexpect-4.8.0
|
||||
%endif
|
||||
%global polytopes_db_pkg polytopes_db-20170220
|
||||
%global sagetex_pkg sagetex-3.5
|
||||
%global Sphinx_pkg Sphinx-3.1.2
|
||||
%global singular_pkg singular-4.1.1p2
|
||||
%global singular_pkg singular-4.2.0p2
|
||||
%if %{with bundled_thebe}
|
||||
%global thebe_ver 9624e0a0
|
||||
%global thebe_pkg thebe-%{thebe_ver}
|
||||
%endif
|
||||
%if %{with bundled_threejs}
|
||||
%global threejs_ver r117
|
||||
%global threejs_pkg threejs-%{threejs_ver}
|
||||
%global threejs_ver r122
|
||||
%global threejs_pkg threejs-sage-%{threejs_ver}
|
||||
%endif
|
||||
|
||||
# Spkg equivalents of required rpms; we pretend they are installed as spkgs.
|
||||
%global SAGE_REQUIRED_PKGS 4ti2-1.6.9 bliss-0.73 CoCoALib-0.99710 coxeter3-3.1 cryptominisat-5.7.1 database_cremona_ellcurve-%{cremona_ver} gap_packages-4.11.0 libsirocco-2.0.2 lrslib-071 mcqd-1.0 meataxe-1.0 primecount-6.1 qepcad-B.1.72 saclib-2.2.7 surf-1.0.6-gcc6 tdlib-0.9.0
|
||||
%global SAGE_REQUIRED_PKGS 4ti2-1.6.9 bliss-0.73 CoCoALib-0.99712 coxeter3-3.1 cryptominisat-5.8.0 database_cremona_ellcurve-%{cremona_ver} gap_packages-4.11.0 libsirocco-2.0.2 lrslib-071a mcqd-1.0 meataxe-1.0 primecount-7.0 qepcad-B.1.74 saclib-2.2.8 surf-1.0.6-gcc6 tdlib-0.9.0
|
||||
|
||||
%ifarch %{ix86} x86_64
|
||||
%global SAGE_REQUIRED_PKGS %{SAGE_REQUIRED_PKGS} fes-0.2
|
||||
|
@ -93,8 +89,8 @@
|
|||
|
||||
Name: sagemath
|
||||
Summary: A free open-source mathematics software system
|
||||
Version: 9.2
|
||||
Release: 5%{?dist}
|
||||
Version: 9.3
|
||||
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
|
||||
# before files with that license
|
||||
|
@ -103,6 +99,7 @@ URL: http://www.sagemath.org
|
|||
Source0: http://files.sagemath.org/src/sage-%{version}.tar.gz
|
||||
Source1: https://github.com/JohnCremona/ecdata/archive/%{cremona_ver}/cremona-%{cremona_ver}.tar.gz
|
||||
Source2: gprc.expect
|
||||
Source3: org.sagemath.sage.metainfo.xml
|
||||
# Follow maxima's ExclusiveArch, except exclude 32-bit ARM. The source RPM is
|
||||
# now about 2GB in size. The 32-bit ARM builders run out of memory trying to
|
||||
# create the SRPM and also trying to unpack the SRPM before starting a build.
|
||||
|
@ -171,46 +168,49 @@ Patch16: %{name}-env.patch
|
|||
# https://bugzilla.redhat.com/show_bug.cgi?id=1243590
|
||||
Patch17: %{name}-qepcad.patch
|
||||
|
||||
# Correct path to arb headers
|
||||
Patch18: %{name}-arb.patch
|
||||
# Make the cvxopt backend check for 'optimal' as well as 'optimized'
|
||||
Patch18: %{name}-cvxopt.patch
|
||||
|
||||
# Use flexiblas
|
||||
Patch19: %{name}-flexiblas.patch
|
||||
|
||||
# Use openblas
|
||||
Patch20: %{name}-openblas.patch
|
||||
|
||||
# Fix paths to latte-integrale binaries
|
||||
Patch21: %{name}-latte.patch
|
||||
Patch20: %{name}-latte.patch
|
||||
|
||||
# Change rubiks binary names to match Fedora
|
||||
Patch22: %{name}-rubiks.patch
|
||||
Patch21: %{name}-rubiks.patch
|
||||
|
||||
# Adapt to recent tdlib 0.9
|
||||
Patch23: %{name}-tdlib.patch
|
||||
Patch22: %{name}-tdlib.patch
|
||||
|
||||
# Use local objects.inv for intersphinx since no network on koji builders
|
||||
Patch24: %{name}-intersphinx.patch
|
||||
Patch23: %{name}-intersphinx.patch
|
||||
|
||||
# Remove an unused call to a primecount function that no longer exists
|
||||
Patch25: %{name}-primecount.patch
|
||||
Patch24: %{name}-primecount.patch
|
||||
|
||||
BuildRequires: make
|
||||
BuildRequires: 4ti2
|
||||
BuildRequires: appstream
|
||||
BuildRequires: arb-devel
|
||||
BuildRequires: bc
|
||||
BuildRequires: bliss-devel
|
||||
BuildRequires: boost-devel
|
||||
BuildRequires: brial-devel
|
||||
BuildRequires: cmake
|
||||
BuildRequires: cddlib-devel
|
||||
BuildRequires: cddlib-tools
|
||||
BuildRequires: cliquer-devel
|
||||
BuildRequires: cocoalib-devel
|
||||
BuildRequires: coxeter-devel
|
||||
BuildRequires: cryptominisat-devel
|
||||
BuildRequires: csdp-devel
|
||||
BuildRequires: desktop-file-utils
|
||||
BuildRequires: dvipng
|
||||
BuildRequires: ecl
|
||||
%if %{with fes}
|
||||
BuildRequires: fes-devel
|
||||
%endif
|
||||
BuildRequires: flexiblas-devel
|
||||
BuildRequires: flint-devel
|
||||
BuildRequires: gap-devel
|
||||
BuildRequires: gap-pkg-aclib
|
||||
|
@ -264,7 +264,9 @@ BuildRequires: gdb
|
|||
BuildRequires: gfan
|
||||
BuildRequires: giac-devel
|
||||
BuildRequires: giac-doc
|
||||
BuildRequires: git-core
|
||||
BuildRequires: glpk-devel
|
||||
BuildRequires: glpk-utils
|
||||
BuildRequires: gmp-ecm
|
||||
BuildRequires: gmp-ecm-devel
|
||||
BuildRequires: ImageMagick
|
||||
|
@ -274,42 +276,58 @@ BuildRequires: jmol
|
|||
BuildRequires: jsmol
|
||||
BuildRequires: jsmath-fonts
|
||||
BuildRequires: L-function-devel
|
||||
BuildRequires: latexmk
|
||||
BuildRequires: latte-integrale
|
||||
BuildRequires: libbraiding-devel
|
||||
BuildRequires: libfrobby-devel
|
||||
BuildRequires: libgap
|
||||
BuildRequires: libhomfly-devel
|
||||
BuildRequires: libmpc-devel
|
||||
BuildRequires: lrcalc-devel
|
||||
BuildRequires: lrslib-utils
|
||||
BuildRequires: make
|
||||
BuildRequires: mathjax
|
||||
BuildRequires: maxima-runtime-ecl
|
||||
BuildRequires: mcqd-devel
|
||||
BuildRequires: mpfi-devel
|
||||
BuildRequires: nauty
|
||||
BuildRequires: ninja-build
|
||||
BuildRequires: ntl-devel
|
||||
BuildRequires: %{blaslib}-devel
|
||||
BuildRequires: openssl
|
||||
BuildRequires: palp
|
||||
BuildRequires: pandoc
|
||||
BuildRequires: pari-devel
|
||||
BuildRequires: pari-elldata
|
||||
BuildRequires: pari-galdata
|
||||
BuildRequires: pari-galpol
|
||||
BuildRequires: pari-gp
|
||||
BuildRequires: pari-seadata
|
||||
BuildRequires: perl-generators
|
||||
BuildRequires: perl(ExtUtils::MakeMaker)
|
||||
BuildRequires: perl(File::Slurp)
|
||||
BuildRequires: pkgconfig(bdw-gc)
|
||||
BuildRequires: pkgconfig(cbc)
|
||||
BuildRequires: pkgconfig(eclib)
|
||||
BuildRequires: pkgconfig(factory)
|
||||
BuildRequires: pkgconfig(fplll)
|
||||
BuildRequires: pkgconfig(gdlib)
|
||||
BuildRequires: pkgconfig(gf2x)
|
||||
BuildRequires: pkgconfig(gsl)
|
||||
BuildRequires: pkgconfig(igraph)
|
||||
BuildRequires: pkgconfig(libcurl)
|
||||
BuildRequires: pkgconfig(libpng)
|
||||
BuildRequires: pkgconfig(libsemigroups)
|
||||
BuildRequires: pkgconfig(libzmq)
|
||||
BuildRequires: pkgconfig(linbox)
|
||||
BuildRequires: pkgconfig(m4ri)
|
||||
BuildRequires: pkgconfig(m4rie)
|
||||
BuildRequires: pkgconfig(nauty)
|
||||
BuildRequires: pkgconfig(openssl)
|
||||
BuildRequires: pkgconfig(pynac)
|
||||
BuildRequires: pkgconfig(readline)
|
||||
BuildRequires: pkgconfig(Singular)
|
||||
BuildRequires: pkgconfig(sqlite3)
|
||||
BuildRequires: pkgconfig(tk)
|
||||
BuildRequires: pkgconfig(zlib)
|
||||
BuildRequires: planarity-devel
|
||||
BuildRequires: ppl-devel
|
||||
|
@ -324,6 +342,8 @@ BuildRequires: python3-ipython-sphinx
|
|||
BuildRequires: python3-pillow-devel
|
||||
BuildRequires: python3-pplpy-devel
|
||||
BuildRequires: python3-tdlib-devel
|
||||
BuildRequires: python3-tkinter
|
||||
BuildRequires: %{py3_dist argon2-cffi}
|
||||
%if %{with bundled_ipython}
|
||||
BuildRequires: %{py3_dist backcall}
|
||||
%endif
|
||||
|
@ -362,6 +382,7 @@ BuildRequires: %{py3_dist pkgconfig}
|
|||
BuildRequires: %{py3_dist psutil}
|
||||
BuildRequires: %{py3_dist ptyprocess}
|
||||
BuildRequires: %{py3_dist pycryptosat}
|
||||
BuildRequires: %{py3_dist pyopenssl}
|
||||
%if %{with bundled_ipython}
|
||||
BuildRequires: %{py3_dist pyzmq}
|
||||
%endif
|
||||
|
@ -369,12 +390,14 @@ BuildRequires: %{py3_dist rpy2}
|
|||
BuildRequires: %{py3_dist scipy}
|
||||
BuildRequires: %{py3_dist scons}
|
||||
BuildRequires: %{py3_dist setuptools}
|
||||
BuildRequires: %{py3_dist setuptools_scm}
|
||||
%if %{with bundled_ipython}
|
||||
BuildRequires: %{py3_dist simplegeneric}
|
||||
%endif
|
||||
BuildRequires: %{py3_dist six}
|
||||
BuildRequires: %{py3_dist sphinx}
|
||||
BuildRequires: %{py3_dist sympy}
|
||||
BuildRequires: %{py3_dist tox}
|
||||
BuildRequires: %{py3_dist wheel}
|
||||
BuildRequires: %{py3_dist widgetsnbextension}
|
||||
BuildRequires: %{py3_dist zodb3}
|
||||
|
@ -383,9 +406,11 @@ BuildRequires: R
|
|||
BuildRequires: ratpoints-devel
|
||||
BuildRequires: rubiks
|
||||
BuildRequires: rw-devel
|
||||
BuildRequires: saclib-devel
|
||||
BuildRequires: sharedmeataxe-devel
|
||||
BuildRequires: sirocco-devel
|
||||
BuildRequires: suitesparse-devel
|
||||
BuildRequires: surf-geometry
|
||||
BuildRequires: symmetrica-devel
|
||||
BuildRequires: sympow
|
||||
BuildRequires: tachyon
|
||||
|
@ -396,6 +421,7 @@ BuildRequires: tex(makecmds.sty)
|
|||
BuildRequires: web-assets-devel
|
||||
BuildRequires: xorg-x11-fonts-Type1
|
||||
BuildRequires: xorg-x11-server-Xvfb
|
||||
BuildRequires: yasm-devel
|
||||
BuildRequires: zn_poly-devel
|
||||
|
||||
Requires: hicolor-icon-theme
|
||||
|
@ -415,10 +441,6 @@ Provides: bundled(thebe) = %{thebe_ver}
|
|||
Provides: bundled(threejs) = %{threejs_ver}
|
||||
%endif
|
||||
|
||||
# This can be removed when Fedora 30 reaches EOL
|
||||
Obsoletes: %{name}-notebook-export < 8.8-5
|
||||
Provides: %{name}-notebook-export = %{version}-%{release}
|
||||
|
||||
%description
|
||||
Sage is a free open-source mathematics software system licensed
|
||||
under the GPL. It combines the power of many existing open-source
|
||||
|
@ -486,7 +508,9 @@ Requires: mathjax
|
|||
Requires: maxima-runtime-ecl
|
||||
Requires: nauty
|
||||
Requires: palp
|
||||
Requires: pari-elldata
|
||||
Requires: pari-galdata
|
||||
Requires: pari-galpol
|
||||
Requires: pari-gp
|
||||
Requires: pari-seadata
|
||||
Requires: python3-tdlib
|
||||
|
@ -551,6 +575,9 @@ Provides: bundled(prompt_toolkit) = %{prompt_toolkit_ver}
|
|||
%if %{with bundled_ipywidgets}
|
||||
Provides: bundled(ipywidgets) = %{ipywidgets_ver}
|
||||
%endif
|
||||
%if %{with bundled_jupyter_jsmol}
|
||||
Provides: bundled(jupyter-jsmol) = %{jupyter_jsmol_ver}
|
||||
%endif
|
||||
|
||||
%description core
|
||||
This package contains the core sagemath python modules.
|
||||
|
@ -737,12 +764,9 @@ This package contains the Turkish %{name} documentation.
|
|||
Summary: Jupyter integration for sagemath
|
||||
Requires: %{name}%{?_isa} = %{version}-%{release}
|
||||
Requires: python-jupyter-filesystem
|
||||
Requires: %{py3_dist argon2-cffi}
|
||||
Requires: %{py3_dist widgetsnbextension}
|
||||
|
||||
# This can be removed when Fedora 31 reaches EOL
|
||||
Obsoletes: sagemath-notebook < 9.0-1
|
||||
Provides: sagemath-notebook = %{version}-%{release}
|
||||
|
||||
%description jupyter
|
||||
This package contains a Jupyter integration for sagemath, replacing the
|
||||
defunct notebook functionality.
|
||||
|
@ -819,6 +843,13 @@ pushd build/pkgs/ipywidgets
|
|||
popd
|
||||
%endif
|
||||
|
||||
%if %{with bundled_jupyter_jsmol}
|
||||
pushd build/pkgs/jupyter_jsmol
|
||||
tar zxf ../../../upstream/%{jupyter_jsmol_pkg}.tar.gz
|
||||
mv %{jupyter_jsmol_pkg} src
|
||||
popd
|
||||
%endif
|
||||
|
||||
%if %{with bundled_pexpect}
|
||||
pushd build/pkgs/pexpect
|
||||
tar zxf ../../../upstream/%{pexpect_pkg}.tar.gz
|
||||
|
@ -891,20 +922,16 @@ popd
|
|||
%patch16
|
||||
%patch17
|
||||
%patch18
|
||||
%if "%{blaslib}" == "flexiblas"
|
||||
%patch19
|
||||
%else
|
||||
%patch20
|
||||
%endif
|
||||
%patch21
|
||||
%patch22
|
||||
%patch23
|
||||
%patch24
|
||||
%patch25
|
||||
|
||||
sed -e 's|@@SAGE_ROOT@@|%{SAGE_ROOT}|' \
|
||||
-e 's|@@SAGE_DOC@@|%{SAGE_DOC}|' \
|
||||
-e 's|@@SAGE_LOCAL@@|%{SAGE_LOCAL}|' \
|
||||
-e 's|@@LIBDIR@@|%{_libdir}|g' \
|
||||
-i src/sage/env.py
|
||||
|
||||
sed -e 's|@@CYSIGNALS@@|%{python3_sitearch}/cysignals|' \
|
||||
|
@ -916,23 +943,20 @@ sed -e 's|@@CYSIGNALS@@|%{python3_sitearch}/cysignals|' \
|
|||
find src/sage \( -name \*.pyx -o -name \*.pxd \) -exec touch {} \+
|
||||
|
||||
# fix Singular paths
|
||||
singver=$(sed 's/.*-\([.[:digit:]]*\).*/\1/' <<< %{singular_pkg})
|
||||
singver=$(sed 's/^.*-\([.[:digit:]]*\).*$/\1/' <<< %{singular_pkg})
|
||||
sed -e "s,SINGULARPATH=\",&%{_datadir}/singular/LIB:," \
|
||||
-e "s,\(SINGULAR_EXECUTABLE=\"\).*\",\1%{_libdir}/Singular/Singular\"," \
|
||||
-i src/bin/sage-env
|
||||
sed -e "s,\(SINGULAR_SO = \)SAGE.*,\1'%{_libdir}/libSingular-$singver.so'," \
|
||||
-i src/sage/env.py
|
||||
|
||||
# fix shebangs; some paths contains spaces, so use the null byte facility
|
||||
grep -FrlZ '#!%{_bindir}/env python3' | \
|
||||
xargs -0 sed -i 's,#!%{_bindir}/env python3,#!%{python3},g'
|
||||
grep -FrlZ '#!%{_bindir}/env python' | \
|
||||
xargs -0 sed -i 's,#!%{_bindir}/env python,#!%{python3},g'
|
||||
grep -FrlZ '#!%{_bindir}/env sage-system-python' | \
|
||||
xargs -0 sed -i 's,#!%{_bindir}/env sage-system-python,#!%{python3},g'
|
||||
grep -FrlZ '#!%{_bindir}/env sage-bootstrap-python' | \
|
||||
xargs -0 sed -i 's,#!%{_bindir}/env sage-bootstrap-python,#!%{python3},g'
|
||||
grep -FrlZ '#!%{_bindir}/env sage-python' | \
|
||||
xargs -0 sed -i 's,#!%{_bindir}/env sage-python,#!%{python3},g'
|
||||
grep -FrlZ 'sage-python23' | xargs -0 sed -i 's,sage-python23,python3,g'
|
||||
grep -FrlZ '#!%{_bindir}/env' | \
|
||||
xargs -0 sed -i 's,#!%{_bindir}/env ,#!%{_bindir}/,'
|
||||
grep -rlZ '#!%{_bindir}/python$' | xargs -0 sed -i 's,#!%{_bindir}/python$,&3,'
|
||||
|
@ -945,7 +969,7 @@ sed -i 's,%{_bindir}/python,&3,' src/sage/misc/dev_tools.py
|
|||
sed -e 's,local/bin/python,bin/python,' \
|
||||
-e 's,#!%{_bindir}/python,&3,' \
|
||||
-i src/sage/repl/preparse.py
|
||||
sed -i 's,"$SAGE_LOCAL"/bin/python,%{_bindir}/python,g' src/bin/sage
|
||||
sed -i 's,$SAGE_LOCAL/bin/python,%{_bindir}/python,g' src/bin/sage
|
||||
%if %{with bundled_ipython}
|
||||
sed -e "s|'%{_bindir}/env', 'which'|'%{_bindir}/which'|" \
|
||||
-i build/pkgs/ipython/src/IPython/utils/_process_posix.py
|
||||
|
@ -955,15 +979,38 @@ sed -e "s|'%{_bindir}/env', 'which'|'%{_bindir}/which'|" \
|
|||
sed -i 's/64m/256m/' src/sage/interfaces/gap.py
|
||||
|
||||
# GAP does not have enough memory to build docs
|
||||
sed -i 's/80/128/' src/sage_setup/docbuild/build_options.py
|
||||
sed -i 's/80/128/' src/sage_docbuild/build_options.py
|
||||
|
||||
# Fix detection of Fedora
|
||||
sed -i 's/yum/rpm/' build/bin/sage-guess-package-system
|
||||
|
||||
# Allow use of python 3.10
|
||||
sed -i 's/3\.10\.0/3.11.0/g' configure
|
||||
|
||||
# Allow use of GCC 11
|
||||
sed -i 's/1\[1-9\]/1[2-9]/' configure
|
||||
|
||||
# Allow use of pari 2.13.1
|
||||
sed -i 's/Mod(0, 2)/0/' configure
|
||||
|
||||
# Allow use of fplll 5.4.1
|
||||
sed -i 's/5\.4\.0/5.4.1/g' configure
|
||||
|
||||
# Allow use of giac 1.7
|
||||
sed -i 's/1\.6\.999/1.7.999/g' configure
|
||||
|
||||
# Do not build with -march=native
|
||||
sed -i 's/CFLAGS_MARCH="-march=native"/CFLAGS_MARCH=""/' configure
|
||||
|
||||
|
||||
########################################################################
|
||||
%build
|
||||
export LC_ALL=C.UTF-8
|
||||
export CC=%{__cc}
|
||||
export CFLAGS="%{optflags}"
|
||||
export CXXFLAGS="%{optflags}"
|
||||
export CPPFLAGS="-I%{_includedir}/arb -I%{_includedir}/cddlib"
|
||||
export CFLAGS="%{build_cflags}"
|
||||
export CXXFLAGS="%{build_cxxflags}"
|
||||
export ECMBIN=%{_bindir}/gmp-ecm
|
||||
export SAGE_PYTHON_VERSION=3
|
||||
export SAGE_ROOT=%{buildroot}%{SAGE_ROOT}
|
||||
export SAGE_LOCAL=%{buildroot}%{SAGE_LOCAL}
|
||||
|
@ -992,20 +1039,30 @@ export PYTHON=%{_bindir}/python3
|
|||
export PYTHONPATH=%{buildroot}%{python3_sitearch}:$PYTHONPATH
|
||||
|
||||
#------------------------------------------------------------------------
|
||||
# Generate sage-env-config
|
||||
sed -e 's,@prefix@,%{SAGE_LOCAL},' \
|
||||
-e 's,@CC@,gcc,' \
|
||||
-e 's,@CXX@,g++,' \
|
||||
-e 's,@FC@,gfortran,' \
|
||||
-e 's,@OBJC@,gcc,' \
|
||||
-e 's,@OBJCXX@,g++,' \
|
||||
-e 's,@SAGE_PYTHON_VERSION@,3,' \
|
||||
-e 's,@SAGE_GMP_PREFIX@,,' \
|
||||
-e 's,@SAGE_GMP_INCLUDE@,%{_includedir},' \
|
||||
-e 's,@SAGE_MPFR_PREFIX@,,' \
|
||||
-e 's,@SAGE_MPC_PREFIX@,,' \
|
||||
-e 's,@SAGE_NTL_PREFIX@,,' \
|
||||
src/bin/sage-env-config.in > src/bin/sage-env-config
|
||||
# Run the configure script to generate files
|
||||
export GSL_LIBS="-lgsl -lflexiblas -lm"
|
||||
%configure \
|
||||
--prefix=$SAGE_LOCAL \
|
||||
--disable-silent-rules \
|
||||
--enable-4ti2 \
|
||||
--enable-bliss \
|
||||
--enable-cocoalib \
|
||||
--enable-cryptominisat \
|
||||
--enable-csdp \
|
||||
--enable-database_cremona_ellcurve \
|
||||
--enable-frobby \
|
||||
--enable-mcqd \
|
||||
--enable-meataxe \
|
||||
--enable-primecount \
|
||||
--enable-qepcad \
|
||||
--enable-saclib \
|
||||
--enable-sirocco \
|
||||
--enable-surf \
|
||||
--enable-tdlib
|
||||
|
||||
#------------------------------------------------------------------------
|
||||
# Link with flexiblas instead of gslcblas
|
||||
grep -FrlZ gslcblas | xargs -0 sed -i 's/gslcblas/flexiblas/g'
|
||||
|
||||
#------------------------------------------------------------------------
|
||||
# Save and update environment to generate bundled interfaces
|
||||
|
@ -1016,20 +1073,27 @@ export SAGE_LOCAL=%{_builddir}
|
|||
|
||||
%if %{with bundled_ipython}
|
||||
pushd build/pkgs/ipython/src
|
||||
%__python3 setup.py build
|
||||
%__python3 setup.py install --root %{_builddir}
|
||||
%{python3} setup.py build
|
||||
%{python3} setup.py install --root %{_builddir}
|
||||
popd
|
||||
|
||||
pushd build/pkgs/prompt_toolkit/src
|
||||
%__python3 setup.py build
|
||||
%__python3 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
|
||||
%__python3 setup.py build
|
||||
%__python3 setup.py install --root %{_builddir}
|
||||
%{python3} setup.py build
|
||||
%{python3} setup.py install --root %{_builddir}
|
||||
popd
|
||||
%endif
|
||||
|
||||
%if %{with bundled_jupyter_jsmol}
|
||||
pushd build/pkgs/jupyter_jsmol/src
|
||||
%{python3} setup.py build
|
||||
%{python3} setup.py install --root %{_builddir}
|
||||
popd
|
||||
%endif
|
||||
|
||||
|
@ -1051,12 +1115,14 @@ mkdir -p %{buildroot}%{SAGE_SPKG_INST}
|
|||
mkdir -p %{buildroot}%{_libdir}/sagemath/build/pkgs
|
||||
|
||||
pushd src
|
||||
%__python3 -u ./setup.py build
|
||||
%{python3} -u ./setup.py build
|
||||
tar cf - $(find sage -type f \! \( -name \*.c -o -name \*.cc -o -name \*.cpp -o -name .gitignore -o -name \*.hpp \) ) | (cd build/lib.*; tar xf -)
|
||||
tar cf - $(find sage_setup -name \*.py) | (cd build/lib.*; tar xf -)
|
||||
popd
|
||||
|
||||
#------------------------------------------------------------------------
|
||||
pushd build/pkgs/sagetex/src
|
||||
%__python3 ./setup.py build
|
||||
%{python3} ./setup.py build
|
||||
popd
|
||||
|
||||
#------------------------------------------------------------------------
|
||||
|
@ -1208,7 +1274,7 @@ popd
|
|||
|
||||
#------------------------------------------------------------------------
|
||||
pushd build/pkgs/conway_polynomials
|
||||
%__python3 ./spkg-install.py
|
||||
%{python3} ./spkg-install.py
|
||||
popd
|
||||
|
||||
#------------------------------------------------------------------------
|
||||
|
@ -1219,7 +1285,7 @@ pushd build/pkgs/elliptic_curves
|
|||
tar jxf ../../../upstream/%{elliptic_curves_pkg}.tar.bz2
|
||||
mv %{elliptic_curves_pkg} src
|
||||
fi
|
||||
%__python3 ./spkg-install.py
|
||||
%{python3} ./spkg-install.py
|
||||
popd
|
||||
|
||||
#------------------------------------------------------------------------
|
||||
|
@ -1256,6 +1322,11 @@ mv %{_builddir}%{_bindir}/ip* %{buildroot}%{SAGE_LOCAL}/bin
|
|||
mv %{_builddir}%{python3_sitelib}/ipywidgets* %{buildroot}%{SAGE_PYTHONPATH}
|
||||
%endif
|
||||
|
||||
#------------------------------------------------------------------------
|
||||
%if %{with bundled_jupyter_jsmol}
|
||||
mv %{_builddir}%{python3_sitelib}/jupyter_jsmol* %{buildroot}%{SAGE_PYTHONPATH}
|
||||
%endif
|
||||
|
||||
#------------------------------------------------------------------------
|
||||
%if %{with bundled_thebe}
|
||||
pushd build/pkgs/thebe
|
||||
|
@ -1275,6 +1346,7 @@ popd
|
|||
) # source build/bin/sage-dist-helpers
|
||||
|
||||
#------------------------------------------------------------------------
|
||||
singver=$(sed 's/^.*-\([.[:digit:]]*\).*$/\1/' <<< %{singular_pkg})
|
||||
cat > %{buildroot}%{SAGE_LOCAL}/bin/sage-env << EOF
|
||||
export CUR=\$PWD
|
||||
##export DOT_SAGE="\$HOME/.sage"
|
||||
|
@ -1295,7 +1367,7 @@ module load surf-geometry-%{_arch}
|
|||
export PATH=$SAGE_LOCAL/bin:\$PATH
|
||||
export SINGULAR_DATA_DIR=%{_datadir}
|
||||
export SINGULAR_BIN_DIR=%{_libdir}/Singular
|
||||
export SINGULAR_SO=%{_libdir}/libSingular-4.1.1.so
|
||||
export SINGULAR_SO=%{_libdir}/libSingular-$singver.so
|
||||
##export PYTHONPATH="$SAGE_PYTHONPATH:\$SAGE_LOCAL/bin"
|
||||
export SAGE_FORTRAN=%{_bindir}/gfortran
|
||||
export SAGE_FORTRAN_LIB=\`gfortran --print-file-name=libgfortran.so\`
|
||||
|
@ -1339,7 +1411,7 @@ pushd src/doc
|
|||
export PATH=%{buildroot}%{_bindir}:$SAGE_LOCAL/bin:$PATH
|
||||
export SINGULARPATH=%{_datadir}/singular/LIB
|
||||
export SINGULAR_BIN_DIR=%{_libdir}/Singular
|
||||
export PYTHONPATH=$SAGE_SETUP:%{buildroot}%{python3_sitearch}:$SAGE_PYTHONPATH:$SAGE_DOC
|
||||
export PYTHONPATH=$SAGE_SETUP:%{buildroot}%{python3_sitearch}:$SAGE_PYTHONPATH:$SAGE_SRC
|
||||
|
||||
%if %{with sphinx_hack}
|
||||
pushd ../../build/pkgs/sphinx/src
|
||||
|
@ -1353,10 +1425,9 @@ pushd src/doc
|
|||
ln -sf %{buildroot}%{SAGE_DOC} %{buildroot}%{SAGE_SRC}/doc
|
||||
export SAGE_DOC=%{buildroot}%{SAGE_DOC}
|
||||
export SAGE_DOC_SRC=$SAGE_DOC
|
||||
# python -m sage_setup.docbuild
|
||||
# Build with an X server running, required by some doc builders
|
||||
SAGE_NUM_THREADS=2 \
|
||||
xvfb-run -d %__python3 -m docbuild --no-pdf-links -k all html -j
|
||||
xvfb-run -d %{python3} -m sage_docbuild --no-pdf-links -k all html -j
|
||||
rm -f %{buildroot}%{SAGE_SRC}/doc
|
||||
ln -sf %{SAGE_DOC} %{buildroot}%{SAGE_SRC}/doc
|
||||
|
||||
|
@ -1409,7 +1480,7 @@ ln -sf src $SAGE_ROOT/devel
|
|||
install -p -m644 -D src/sage/ext_data/notebook-ipython/logo.svg \
|
||||
%{buildroot}%{_datadir}/icons/hicolor/scalable/apps/sagemath.svg
|
||||
mkdir -p %{buildroot}%{_datadir}/applications
|
||||
cat > %{buildroot}%{_datadir}/applications/%{name}.desktop << EOF
|
||||
cat > %{buildroot}%{_datadir}/applications/org.%{name}.sage.desktop << EOF
|
||||
[Desktop Entry]
|
||||
Name=Sagemath
|
||||
Comment=A free open-source mathematics software system
|
||||
|
@ -1419,7 +1490,13 @@ Terminal=true
|
|||
Type=Application
|
||||
Categories=Education;Science;Math;
|
||||
EOF
|
||||
desktop-file-validate %{buildroot}%{_datadir}/applications/%{name}.desktop
|
||||
desktop-file-validate %{buildroot}%{_datadir}/applications/org.%{name}.sage.desktop
|
||||
|
||||
# Install the AppData file
|
||||
mkdir -p %{buildroot}%{_metainfodir}
|
||||
cp -p %{SOURCE3} %{buildroot}%{_metainfodir}
|
||||
appstreamcli validate --no-net \
|
||||
%{buildroot}%{_metainfodir}/org.%{name}.sage.metainfo.xml
|
||||
|
||||
# Fix permissions
|
||||
find %{buildroot} -name '*.so' -exec chmod 755 {} \+
|
||||
|
@ -1449,6 +1526,9 @@ find %{buildroot}%{SAGE_DOC} -type d -name _sources -exec rm -fr {} \+
|
|||
rm -r %{buildroot}%{python3_sitearch}/sage_setup
|
||||
%endif
|
||||
|
||||
# remove files we do not want to install
|
||||
rm %{buildroot}%{SAGE_LOCAL}/bin/sage-src-env-config.in
|
||||
|
||||
# pretend sagemath spkgs are installed to reduce number of errors
|
||||
# in doctests
|
||||
mkdir -p %{buildroot}%{SAGE_SPKG_INST}
|
||||
|
@ -1465,6 +1545,7 @@ pushd %{buildroot}%{SAGE_SPKG_INST}
|
|||
mkdir $pkg
|
||||
done
|
||||
popd
|
||||
|
||||
#------------------------------------------------------------------------
|
||||
cat > %{buildroot}%{SAGE_LOCAL}/bin/sage-list-packages << EOF
|
||||
#!/bin/sh
|
||||
|
@ -1541,19 +1622,26 @@ popd
|
|||
# Build the large Cremona database
|
||||
export PATH=%{buildroot}%{SAGE_LOCAL}/bin:$PATH
|
||||
export PYTHONPATH=%{buildroot}%{SAGE_PYTHONPATH}:%{buildroot}%{python3_sitearch}
|
||||
touch %{buildroot}%{SAGE_SHARE}/cremona/cremona.db
|
||||
cat > cremona.sage << EOF
|
||||
import sage.env
|
||||
import sage.databases.cremona
|
||||
db_path = '%{buildroot}%{SAGE_SHARE}/cremona/cremona'
|
||||
c = sage.databases.cremona.LargeCremonaDatabase(db_path, False, True)
|
||||
sage.env.SAGE_SHARE = '%{buildroot}%{SAGE_SHARE}'
|
||||
c = sage.databases.cremona.LargeCremonaDatabase('cremona', False, True)
|
||||
c._init_from_ftpdata('ecdata-%{cremona_ver}')
|
||||
EOF
|
||||
%{buildroot}%{SAGE_LOCAL}/bin/sage cremona.sage
|
||||
|
||||
#------------------------------------------------------------------------
|
||||
# Script was used to build documentation and possibly other operations
|
||||
perl -pi -e 's|%{buildroot}||g;s|^##||g;' \
|
||||
# Scripts were used to build documentation and possibly other operations
|
||||
sed -i 's|%{buildroot}||g;s|^##||g;' \
|
||||
%{buildroot}%{_bindir}/sage \
|
||||
%{buildroot}%{SAGE_LOCAL}/bin/sage-env
|
||||
%{buildroot}%{SAGE_LOCAL}/bin/sage-env \
|
||||
%{buildroot}%{SAGE_LOCAL}/bin/sage-env-config \
|
||||
%{buildroot}%{SAGE_LOCAL}/bin/sage-src-env-config
|
||||
sed -i "s|$PWD|%{SAGE_ROOT}|g" \
|
||||
%{buildroot}%{SAGE_LOCAL}/bin/sage-env-config \
|
||||
%{buildroot}%{SAGE_LOCAL}/bin/sage-src-env-config
|
||||
|
||||
# last install command
|
||||
rm -fr $DOT_SAGE
|
||||
|
@ -1659,20 +1747,12 @@ end
|
|||
|
||||
%files
|
||||
# GPLv2+
|
||||
%dir %{SAGE_ROOT}
|
||||
%license COPYING.txt
|
||||
%doc %{SAGE_ROOT}/COPYING.txt
|
||||
%dir %{SAGE_ROOT}
|
||||
%dir %{SAGE_LOCAL}/
|
||||
%dir %{SAGE_LOCAL}/bin/
|
||||
%dir %{SAGE_SHARE}/
|
||||
%{SAGE_LOCAL}/bin/QuadraticSieve
|
||||
%{SAGE_LOCAL}/bin/ecm
|
||||
%{SAGE_LOCAL}/bin/gap
|
||||
%{SAGE_LOCAL}/bin/jmol
|
||||
%if %{with bundled_ipython}
|
||||
%{SAGE_LOCAL}/bin/ip*
|
||||
%endif
|
||||
%{SAGE_LOCAL}/bin/python
|
||||
%{SAGE_LOCAL}/bin/sage*
|
||||
%{SAGE_LOCAL}/bin/
|
||||
%{SAGE_LOCAL}/include
|
||||
%{SAGE_LOCAL}/lib
|
||||
%{SAGE_LOCAL}/share
|
||||
|
@ -1681,16 +1761,13 @@ end
|
|||
%{SAGE_ROOT}/devel
|
||||
%{SAGE_ROOT}/doc
|
||||
%{SAGE_ROOT}/share
|
||||
%dir %{SAGE_SRC}/
|
||||
%if %{with docs}
|
||||
%{SAGE_SRC}/doc
|
||||
%endif
|
||||
%{SAGE_SRC}/sage
|
||||
%{SAGE_SRC}/
|
||||
%dir %{SAGE_PYTHONPATH}
|
||||
# GPLv2+
|
||||
%{_bindir}/sage
|
||||
%{_datadir}/icons/hicolor/scalable/apps/%{name}.svg
|
||||
%{_datadir}/applications/%{name}.desktop
|
||||
%{_datadir}/applications/org.%{name}.sage.desktop
|
||||
%{_metainfodir}/org.%{name}.sage.metainfo.xml
|
||||
%if %{with bundled_thebe}
|
||||
# MIT
|
||||
%{SAGE_SHARE}/thebe/
|
||||
|
@ -1714,10 +1791,12 @@ end
|
|||
%if %{with bundled_ipywidgets}
|
||||
%{SAGE_PYTHONPATH}/ipywidgets*
|
||||
%endif
|
||||
%if %{with bundled_jupyter_jsmol}
|
||||
%{SAGE_PYTHONPATH}/jupyter_jsmol*
|
||||
%endif
|
||||
|
||||
#------------------------------------------------------------------------
|
||||
%files data
|
||||
%dir %{SAGE_SHARE}/
|
||||
%dir %{SAGE_ETC}/
|
||||
%{SAGE_ETC}/sage
|
||||
%{SAGE_ETC}/gprc.expect
|
||||
|
@ -1775,6 +1854,7 @@ end
|
|||
#------------------------------------------------------------------------
|
||||
%files doc
|
||||
# GPLv2+
|
||||
%license COPYING.txt
|
||||
%dir %{SAGE_DOC}/
|
||||
%{SAGE_DOC}/common/
|
||||
%dir %{SAGE_DOC}/html/
|
||||
|
@ -1909,8 +1989,6 @@ end
|
|||
%{SAGE_ETC}/notebook-ipython/
|
||||
# LGPLv2+
|
||||
%{_datadir}/jupyter/kernels/sagemath/
|
||||
%{_datadir}/jupyter/nbextensions/jsmol
|
||||
%{_datadir}/jupyter/nbextensions/mathjax
|
||||
%{_datadir}/jupyter/nbextensions/threejs
|
||||
|
||||
#------------------------------------------------------------------------
|
||||
|
@ -1923,6 +2001,12 @@ end
|
|||
|
||||
########################################################################
|
||||
%changelog
|
||||
* Thu Jun 17 2021 Jerry James <loganjerry@gmail.com> - 9.3-1
|
||||
- Version 9.3
|
||||
- Drop -arb and -openblas patches
|
||||
- Add -cvxopt patch
|
||||
- Add metainfo file
|
||||
|
||||
* Fri Jun 04 2021 Python Maint <python-maint@redhat.com> - 9.2-5
|
||||
- Rebuilt for Python 3.10
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue