mirror of
https://src.fedoraproject.org/rpms/sagemath.git
synced 2025-04-18 10:19:03 -04:00
Add -buildroot patch and only build cython interfaces once.
Also: - Drop LANGUAGES variable setting, now ignored by the sagemath build system. - Drop unused SAGE_CBLAS variable from /usr/bin/sage. - Do not force the C locale when launching sagemath. - Allow the user to override SAGE_DEBUG in /usr/bin/sage. - Add -ecm, -giac, and -latte patches to fix interactions with external tools. - Add -sigfpe patch from upstream. - Fix flask_autoindex and flask_openid imports in sagenb. - Add Education category to the desktop file (bz 1624545). - Fix SINGULAR_SO variable in /usr/bin/sage (bz 1636759 and 1655248). - Invoke twistd-2 instead of twistd (bz 1640890). - Improve jupyter integration (bz 1663165). - Move existing jupyter integration into the notebook subpackage. - Require python-jupyter-filesystem instead of owning its directories. - Drop one more remnant of the F24 to F25 upgrade fixup.
This commit is contained in:
parent
1a0bd1afc6
commit
87098dcde0
8 changed files with 301 additions and 56 deletions
13
sagemath-buildroot.patch
Normal file
13
sagemath-buildroot.patch
Normal file
|
@ -0,0 +1,13 @@
|
|||
diff -up src/setup.py.orig src/setup.py
|
||||
--- src/setup.py.orig 2018-08-29 08:35:19.955079610 -0600
|
||||
+++ src/setup.py 2019-01-18 11:28:06.915666783 -0700
|
||||
@@ -386,6 +386,9 @@ class sage_build_cython(Command):
|
||||
with open(self._version_file, 'w') as f:
|
||||
f.write(self._version_stamp)
|
||||
|
||||
+ # Remove buildroot paths from the generated files
|
||||
+ subprocess.check_call(["find", "build/cythonized/sage", "-type", "f", "-exec", "sed", "-i", "s|@@BUILDROOT@@||g", "{}", "+"])
|
||||
+
|
||||
# Finally, copy relevant cythonized files from build/cythonized
|
||||
# tree into the build-lib tree
|
||||
for (dst_dir, src_files) in self.get_cythonized_package_files():
|
12
sagemath-ecm.patch
Normal file
12
sagemath-ecm.patch
Normal file
|
@ -0,0 +1,12 @@
|
|||
diff -up src/sage/interfaces/ecm.py.orig src/sage/interfaces/ecm.py
|
||||
--- src/sage/interfaces/ecm.py.orig 2018-08-03 05:10:08.000000000 -0600
|
||||
+++ src/sage/interfaces/ecm.py 2019-01-18 11:03:25.492710113 -0700
|
||||
@@ -256,7 +256,7 @@ class ECM(SageObject):
|
||||
"""
|
||||
print("Enter numbers to run ECM on them.")
|
||||
print("Press control-C to exit.")
|
||||
- os.system(self._cmd)
|
||||
+ os.system(' '.join(self._cmd))
|
||||
|
||||
# Recommended settings from
|
||||
# http://www.mersennewiki.org/index.php/Elliptic_Curve_Method
|
15
sagemath-giac.patch
Normal file
15
sagemath-giac.patch
Normal file
|
@ -0,0 +1,15 @@
|
|||
diff -up src/sage/interfaces/giac.py.orig src/sage/interfaces/giac.py
|
||||
--- src/sage/interfaces/giac.py.orig 2018-08-03 05:10:08.000000000 -0600
|
||||
+++ src/sage/interfaces/giac.py 2019-01-18 11:04:10.255917393 -0700
|
||||
@@ -616,10 +616,7 @@ If you got giac from the spkg then ``$PR
|
||||
'4\n3'
|
||||
sage: s='g(x):={\nx+1;\nx+2;\n}'
|
||||
sage: giac(s)
|
||||
- (x)->{
|
||||
- x+1;
|
||||
- x+2;
|
||||
- }
|
||||
+ (x)->[x+1,x+2]
|
||||
sage: giac.g(5)
|
||||
7
|
||||
"""
|
|
@ -1,19 +0,0 @@
|
|||
diff -up src/sage/modular/arithgroup/farey.cpp.orig src/sage/modular/arithgroup/farey.cpp
|
||||
--- src/sage/modular/arithgroup/farey.cpp.orig 2017-11-08 06:03:07.383885084 -0500
|
||||
+++ src/sage/modular/arithgroup/farey.cpp 2017-11-08 06:03:18.271885501 -0500
|
||||
@@ -136,6 +136,7 @@ operator*(const SL2Z& M, const vector<mp
|
||||
return result;
|
||||
}
|
||||
|
||||
+#if 0
|
||||
inline
|
||||
mpz_class
|
||||
floor(const mpq_class r) {
|
||||
@@ -146,6 +147,7 @@ floor(const mpq_class r) {
|
||||
return result - 1;
|
||||
}
|
||||
}
|
||||
+#endif
|
||||
|
||||
inline
|
||||
mpz_class lcm(const mpz_class& a, const mpz_class& b) {
|
21
sagemath-latte.patch
Normal file
21
sagemath-latte.patch
Normal file
|
@ -0,0 +1,21 @@
|
|||
diff -up src/sage/interfaces/latte.py.orig src/sage/interfaces/latte.py
|
||||
--- src/sage/interfaces/latte.py.orig 2018-08-03 05:10:08.000000000 -0600
|
||||
+++ src/sage/interfaces/latte.py 2019-01-18 11:32:37.859220860 -0700
|
||||
@@ -112,7 +112,7 @@ def count(arg, ehrhart_polynomial=False,
|
||||
# Check that LattE is present
|
||||
Latte().require()
|
||||
|
||||
- args = ['count']
|
||||
+ args = ['latte-count']
|
||||
if ehrhart_polynomial and multivariate_generating_function:
|
||||
raise ValueError
|
||||
if ehrhart_polynomial:
|
||||
@@ -304,7 +304,7 @@ def integrate(arg, polynomial=None, algo
|
||||
# Check that LattE is present
|
||||
Latte().require()
|
||||
|
||||
- args = ['integrate']
|
||||
+ args = ['latte-integrate']
|
||||
|
||||
got_polynomial = True if polynomial is not None else False
|
||||
|
|
@ -1,15 +1,22 @@
|
|||
diff -up build/pkgs/sagenb/src/sagenb/flask_version/base.py.orig build/pkgs/sagenb/src/sagenb/flask_version/base.py
|
||||
--- build/pkgs/sagenb/src/sagenb/flask_version/base.py.orig 2018-01-24 04:17:47.000000000 -0700
|
||||
+++ build/pkgs/sagenb/src/sagenb/flask_version/base.py 2018-08-29 08:44:38.823169061 -0600
|
||||
@@ -7,8 +7,6 @@ from functools import partial
|
||||
+++ build/pkgs/sagenb/src/sagenb/flask_version/base.py 2019-01-18 15:02:10.691836714 -0700
|
||||
@@ -7,13 +7,11 @@ from functools import partial
|
||||
from flask import Flask, Blueprint, url_for, request, session, redirect, g, make_response, current_app, render_template
|
||||
from .decorators import login_required, guest_or_login_required, with_lock
|
||||
from .decorators import global_lock
|
||||
-# Make flask use the old session foo from <=flask-0.9
|
||||
-from flask_oldsessions import OldSecureCookieSessionInterface
|
||||
|
||||
from flask.ext.autoindex import AutoIndex
|
||||
-from flask.ext.autoindex import AutoIndex
|
||||
+from flask_autoindex import AutoIndex
|
||||
from sage.env import SAGE_SRC, SAGE_DOC
|
||||
SRC = os.path.join(SAGE_SRC, 'sage')
|
||||
-from flask.ext.openid import OpenID
|
||||
+from flask_openid import OpenID
|
||||
from flask_babel import Babel, gettext, ngettext, lazy_gettext, get_locale
|
||||
from sagenb.misc.misc import SAGENB_ROOT, DATA, translations_path, N_, nN_, unicode_str
|
||||
from json import dumps
|
||||
@@ -28,7 +26,6 @@ class SageNBFlask(Flask):
|
||||
def __init__(self, *args, **kwds):
|
||||
self.startup_token = kwds.pop('startup_token', None)
|
||||
|
@ -68,7 +75,7 @@ diff -up build/pkgs/sagenb/src/sagenb/notebook/cell.py.orig build/pkgs/sagenb/sr
|
|||
|
||||
diff -up build/pkgs/sagenb/src/sagenb/notebook/run_notebook.py.orig build/pkgs/sagenb/src/sagenb/notebook/run_notebook.py
|
||||
--- build/pkgs/sagenb/src/sagenb/notebook/run_notebook.py.orig 2018-05-22 10:16:28.000000000 -0600
|
||||
+++ build/pkgs/sagenb/src/sagenb/notebook/run_notebook.py 2018-08-29 08:44:38.824169048 -0600
|
||||
+++ build/pkgs/sagenb/src/sagenb/notebook/run_notebook.py 2019-01-18 16:37:26.438289912 -0700
|
||||
@@ -53,12 +53,11 @@ sagenb.notebook.misc.DIR = %(cwd)r #We s
|
||||
# Flask #
|
||||
#########
|
||||
|
@ -86,3 +93,12 @@ diff -up build/pkgs/sagenb/src/sagenb/notebook/run_notebook.py.orig build/pkgs/s
|
|||
|
||||
def save_notebook(notebook):
|
||||
print("Quitting all running worksheets...")
|
||||
@@ -336,7 +335,7 @@ reactor.addSystemEventTrigger('before',
|
||||
profilecmd = '--profile=%s --profiler=cprofile --savestats'%self.profile_file(kw['profile'])
|
||||
else:
|
||||
profilecmd=''
|
||||
- cmd = 'twistd %s --pidfile="%s" -ny "%s"' % (profilecmd, kw['pidfile'], conf)
|
||||
+ cmd = 'twistd-2 %s --pidfile="%s" -ny "%s"' % (profilecmd, kw['pidfile'], conf)
|
||||
return cmd
|
||||
|
||||
def get_old_settings(self, conf):
|
||||
|
|
143
sagemath-sigfpe.patch
Normal file
143
sagemath-sigfpe.patch
Normal file
|
@ -0,0 +1,143 @@
|
|||
--- src/sage/libs/ecl.pyx.orig 2018-08-03 05:10:08.000000000 -0600
|
||||
+++ src/sage/libs/ecl.pyx 2019-01-18 11:33:53.642921158 -0700
|
||||
@@ -16,7 +16,7 @@ from __future__ import print_function, a
|
||||
#adapted to work with pure Python types.
|
||||
|
||||
from libc.stdlib cimport abort
|
||||
-from libc.signal cimport SIGINT, SIGBUS, SIGSEGV, SIGCHLD
|
||||
+from libc.signal cimport SIGINT, SIGBUS, SIGSEGV, SIGCHLD, SIGFPE
|
||||
from libc.signal cimport raise_ as signal_raise
|
||||
from posix.signal cimport sigaction, sigaction_t
|
||||
cimport cysignals.signals
|
||||
@@ -48,9 +48,14 @@ cdef extern from "eclsig.h":
|
||||
void ecl_sig_off()
|
||||
cdef sigaction_t ecl_sigint_handler
|
||||
cdef sigaction_t ecl_sigbus_handler
|
||||
+ cdef sigaction_t ecl_sigfpe_handler
|
||||
cdef sigaction_t ecl_sigsegv_handler
|
||||
cdef mpz_t ecl_mpz_from_bignum(cl_object obj)
|
||||
cdef cl_object ecl_bignum_from_mpz(mpz_t num)
|
||||
+ cdef int fegetexcept()
|
||||
+ cdef int feenableexcept(int)
|
||||
+ cdef int fedisableexcept(int)
|
||||
+ cdef int ecl_feflags
|
||||
|
||||
cdef cl_object string_to_object(char * s):
|
||||
return ecl_read_from_cstring(s)
|
||||
@@ -239,6 +244,7 @@ def init_ecl():
|
||||
global ecl_has_booted
|
||||
cdef char *argv[1]
|
||||
cdef sigaction_t sage_action[32]
|
||||
+ cdef int sage_fpes
|
||||
cdef int i
|
||||
|
||||
if ecl_has_booted:
|
||||
@@ -258,6 +264,8 @@ def init_ecl():
|
||||
for i in range(1,32):
|
||||
sigaction(i, NULL, &sage_action[i])
|
||||
|
||||
+ sage_fpes = fegetexcept()
|
||||
+
|
||||
#initialize ECL
|
||||
ecl_set_option(ECL_OPT_SIGNAL_HANDLING_THREAD, 0)
|
||||
cl_boot(1, argv)
|
||||
@@ -265,8 +273,12 @@ def init_ecl():
|
||||
#save signal handler from ECL
|
||||
sigaction(SIGINT, NULL, &ecl_sigint_handler)
|
||||
sigaction(SIGBUS, NULL, &ecl_sigbus_handler)
|
||||
+ sigaction(SIGFPE, NULL, &ecl_sigfpe_handler)
|
||||
sigaction(SIGSEGV, NULL, &ecl_sigsegv_handler)
|
||||
|
||||
+ #save ECL's floating point exception flags
|
||||
+ ecl_feflags = fegetexcept()
|
||||
+
|
||||
#verify that no SIGCHLD handler was installed
|
||||
cdef sigaction_t sig_test
|
||||
sigaction(SIGCHLD, NULL, &sig_test)
|
||||
@@ -277,6 +289,9 @@ def init_ecl():
|
||||
for i in range(1,32):
|
||||
sigaction(i, &sage_action[i], NULL)
|
||||
|
||||
+ fedisableexcept(ecl_feflags)
|
||||
+ feenableexcept(sage_fpes)
|
||||
+
|
||||
#initialise list of objects and bind to global variable
|
||||
# *SAGE-LIST-OF-OBJECTS* to make it rooted in the reachable tree for the GC
|
||||
list_of_objects=cl_cons(Cnil,cl_cons(Cnil,Cnil))
|
||||
--- src/sage/libs/eclsig.h.orig 2018-08-03 05:10:08.000000000 -0600
|
||||
+++ src/sage/libs/eclsig.h 2019-01-18 11:33:53.642921158 -0700
|
||||
@@ -9,25 +9,59 @@
|
||||
|
||||
|
||||
#include <signal.h>
|
||||
+
|
||||
+/* Rummage around to determine how ECL was configured */
|
||||
+#define ECL_AVOID_FPE_H /* Prevent some local includes */
|
||||
+#include <ecl/config-internal.h>
|
||||
+
|
||||
+#ifdef HAVE_FENV_H
|
||||
+#include <fenv.h>
|
||||
+#ifndef FE_ALL_EXCEPT
|
||||
+#define FE_ALL_EXCEPT FE_DIVBYZERO | FE_OVERFLOW | FE_UNDERFLOW | FE_INVALID
|
||||
+#endif
|
||||
+#else
|
||||
+#ifndef FE_ALL_EXCEPT
|
||||
+#define FE_ALL_EXCEPT 0
|
||||
+#endif
|
||||
+#endif
|
||||
+
|
||||
+#ifndef HAVE_FEENABLEEXCEPT
|
||||
+/* These are GNU extensions */
|
||||
+#define fegetexcept() 0
|
||||
+#define feenablexcept(flags)
|
||||
+#define fdisableexcept(flags)
|
||||
+#endif
|
||||
+
|
||||
static struct sigaction ecl_sigint_handler;
|
||||
static struct sigaction ecl_sigbus_handler;
|
||||
+static struct sigaction ecl_sigfpe_handler;
|
||||
static struct sigaction ecl_sigsegv_handler;
|
||||
static struct sigaction sage_sigint_handler;
|
||||
static struct sigaction sage_sigbus_handler;
|
||||
+static struct sigaction sage_sigfpe_handler;
|
||||
static struct sigaction sage_sigsegv_handler;
|
||||
+static int ecl_feflags;
|
||||
+static int sage_feflags;
|
||||
|
||||
static inline void set_ecl_signal_handler(void)
|
||||
{
|
||||
sigaction(SIGINT, &ecl_sigint_handler, &sage_sigint_handler);
|
||||
sigaction(SIGBUS, &ecl_sigbus_handler, &sage_sigbus_handler);
|
||||
+ sigaction(SIGFPE, &ecl_sigfpe_handler, &sage_sigfpe_handler);
|
||||
sigaction(SIGSEGV, &ecl_sigsegv_handler, &sage_sigsegv_handler);
|
||||
+ /* sage_feflags should be 0; we don't set them otherwise */
|
||||
+ sage_feflags = fedisableexcept(FE_ALL_EXCEPT);
|
||||
+ feenableexcept(ecl_feflags);
|
||||
}
|
||||
|
||||
static inline void unset_ecl_signal_handler(void)
|
||||
{
|
||||
sigaction(SIGINT, &sage_sigint_handler, NULL);
|
||||
sigaction(SIGBUS, &sage_sigbus_handler, NULL);
|
||||
+ sigaction(SIGFPE, &sage_sigfpe_handler, NULL);
|
||||
sigaction(SIGSEGV, &sage_sigsegv_handler, NULL);
|
||||
+ ecl_feflags = fedisableexcept(FE_ALL_EXCEPT);
|
||||
+ feenableexcept(sage_feflags);
|
||||
}
|
||||
|
||||
/* This MUST be a macro because sig_on() must be in the same
|
||||
--- src/sage/libs/mpmath/ext_impl.pyx.orig 2018-08-03 05:10:08.000000000 -0600
|
||||
+++ src/sage/libs/mpmath/ext_impl.pyx 2019-01-18 11:33:53.643921141 -0700
|
||||
@@ -164,9 +164,9 @@ opts_double_precision.rounding = ROUND_N
|
||||
opts_mini_prec.prec = 5
|
||||
opts_mini_prec.rounding = ROUND_D
|
||||
|
||||
-cdef double _double_inf = float("1e300") * float("1e300")
|
||||
-cdef double _double_ninf = -_double_inf
|
||||
-cdef double _double_nan = _double_inf - _double_inf
|
||||
+cdef double _double_inf = float("inf")
|
||||
+cdef double _double_ninf = float("-inf")
|
||||
+cdef double _double_nan = float("nan")
|
||||
|
||||
cdef inline void MPF_init(MPF *x):
|
||||
"""Allocate space and set value to zero.
|
110
sagemath.spec
110
sagemath.spec
|
@ -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
|
||||
|
@ -86,7 +86,7 @@
|
|||
Name: sagemath
|
||||
Summary: A free open-source mathematics software system
|
||||
Version: 8.3
|
||||
Release: 1%{?dist}
|
||||
Release: 2%{?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
|
||||
|
@ -97,8 +97,11 @@ 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
|
||||
# Fix ecm interact() command
|
||||
Patch0: %{name}-ecm.patch
|
||||
|
||||
# Adapt a giac doctest to recent versions of giac
|
||||
Patch1: %{name}-giac.patch
|
||||
|
||||
# Set of patches to work with system wide packages
|
||||
Patch2: %{name}-scripts.patch
|
||||
|
@ -145,6 +148,9 @@ Patch11: %{name}-cremona.patch
|
|||
# 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
|
||||
|
@ -175,7 +181,7 @@ Patch22: %{name}-qepcad.patch
|
|||
Patch23: %{name}-arb.patch
|
||||
|
||||
# No support for f" notation
|
||||
Patch24: %{name}-nofstring.patch
|
||||
Patch24: %{name}-nofstring.patch
|
||||
|
||||
# Add missing include paths
|
||||
Patch25: %{name}-includes.patch
|
||||
|
@ -186,6 +192,12 @@ Patch26: %{name}-atlas.patch
|
|||
# Adapt to recent versions of eclib
|
||||
Patch27: %{name}-eclib.patch
|
||||
|
||||
# Fix paths to latte-integrale binaries
|
||||
Patch28: %{name}-latte.patch
|
||||
|
||||
# Upstream fixes for random SIGFPEs due to ecl messing with the fp state
|
||||
Patch29: %{name}-sigfpe.patch
|
||||
|
||||
BuildRequires: 4ti2
|
||||
BuildRequires: arb-devel
|
||||
BuildRequires: atlas-devel
|
||||
|
@ -644,6 +656,7 @@ This package contains the Turkish %{name} documentation.
|
|||
%package notebook
|
||||
Summary: The Sage Notebook
|
||||
Requires: %{name}%{?_isa} = %{version}-%{release}
|
||||
Requires: python-jupyter-filesystem
|
||||
|
||||
%description notebook
|
||||
The Sage Notebook is a web-based graphical user interface for
|
||||
|
@ -825,6 +838,7 @@ pushd build/pkgs/widgetsnbextension
|
|||
popd
|
||||
%endif
|
||||
|
||||
%patch0
|
||||
%patch1
|
||||
%patch2
|
||||
%patch3
|
||||
|
@ -837,6 +851,7 @@ popd
|
|||
%patch10
|
||||
%patch11
|
||||
%patch13
|
||||
%patch14
|
||||
%patch15
|
||||
%patch16
|
||||
%patch17
|
||||
|
@ -855,12 +870,15 @@ popd
|
|||
%patch25
|
||||
%patch26
|
||||
%patch27
|
||||
%patch28
|
||||
%patch29
|
||||
|
||||
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|' \
|
||||
-e 's|@@BUILDROOT@@|%{buildroot}|' \
|
||||
-i src/setup.py
|
||||
|
||||
sed -e "/flask-oldsessions/d" \
|
||||
|
@ -889,6 +907,7 @@ grep -FrlZ '#!%{_bindir}/env python' | \
|
|||
xargs -0 sed -i 's,#!%{_bindir}/env python,#!%{__python2},'
|
||||
grep -FrlZ '#!%{_bindir}/env sage-python23' | \
|
||||
xargs -0 sed -i 's,#!%{_bindir}/env sage-python23,#!%{__python2},'
|
||||
grep -FrlZ 'sage-python23' | xargs -0 sed -i 's,sage-python23,#!%{__python2},'
|
||||
grep -FrlZ '#!%{_bindir}/env' | \
|
||||
xargs -0 sed -i 's,#!%{_bindir}/env ,#!%{_bindir}/,'
|
||||
grep -rlZ '#!%{_bindir}/python$' | xargs -0 sed -i 's,#!%{_bindir}/python$,&2,'
|
||||
|
@ -906,6 +925,12 @@ sed -e "s|'%{_bindir}/env', 'which'|'%{_bindir}/which'|" \
|
|||
-i build/pkgs/ipython/src/IPython/utils/_process_posix.py
|
||||
%endif
|
||||
|
||||
# Fix twistd invocation; the python3 version has no suffix
|
||||
sed -i 's/exec twistd/&-2/' src/bin/sage
|
||||
|
||||
# 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}
|
||||
|
@ -1005,16 +1030,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
|
||||
|
||||
|
@ -1068,8 +1083,8 @@ pushd src/ext
|
|||
if [ $COUNT -gt 0 ]; then
|
||||
cp -far $dir $SAGE_ETC
|
||||
fi
|
||||
cp -far pari $SAGE_ETC
|
||||
done
|
||||
cp -far pari $SAGE_ETC
|
||||
cp -fa %{SOURCE1} $SAGE_ETC
|
||||
popd
|
||||
|
||||
|
@ -1274,7 +1289,7 @@ popd
|
|||
cat > %{buildroot}%{_bindir}/sage << EOF
|
||||
#!/bin/bash -i
|
||||
|
||||
export CUR=\`pwd\`
|
||||
export CUR=\$PWD
|
||||
##export DOT_SAGE="\$HOME/.sage"
|
||||
mkdir -p \$DOT_SAGE/{maxima,sympow,tmp}
|
||||
export SAGE_TESTDIR=\$DOT_SAGE/tmp
|
||||
|
@ -1286,23 +1301,22 @@ export SAGE_ETC="$SAGE_ETC"
|
|||
export SAGE_SRC="%{buildroot}%{SAGE_SRC}"
|
||||
##export SAGE_DOC="$SAGE_DOC"
|
||||
##export SAGE_DOC_SRC="\$SAGE_DOC"
|
||||
##export SAGE_PKGS="\$SAGE_LOCAL//var/lib/sage/installed"
|
||||
##export SAGE_PKGS="\$SAGE_LOCAL/var/lib/sage/installed"
|
||||
module load 4ti2-%{_arch}
|
||||
module load lrcalc-%{_arch}
|
||||
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-4.1.0.so
|
||||
##export PYTHONPATH="$SAGE_PYTHONPATH:\$SAGE_LOCAL/bin"
|
||||
export SAGE_CBLAS=blas
|
||||
export SAGE_FORTRAN=%{_bindir}/gfortran
|
||||
export SAGE_FORTRAN_LIB=\`gfortran --print-file-name=libgfortran.so\`
|
||||
export SYMPOW_DIR="\$DOT_SAGE/sympow"
|
||||
export LC_ALL=C.UTF-8
|
||||
export LD_LIBRARY_PATH=\$SAGE_ROOT/lib:\$LD_LIBRARY_PATH
|
||||
# Required for sage -gdb
|
||||
export SAGE_DEBUG=no
|
||||
: \${SAGE_DEBUG:=no}
|
||||
export SAGE_DEBUG
|
||||
$SAGE_LOCAL/bin/sage "\$@"
|
||||
EOF
|
||||
#------------------------------------------------------------------------
|
||||
|
@ -1361,7 +1375,7 @@ pushd src/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 LANGUAGES="ca de en fr hu it ja pt ru tr" \
|
||||
SAGE_NUM_THREADS=2 \
|
||||
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
|
||||
|
@ -1426,7 +1440,7 @@ Exec=sage
|
|||
Icon=%{name}
|
||||
Terminal=true
|
||||
Type=Application
|
||||
Categories=Science;Math;
|
||||
Categories=Education;Science;Math;
|
||||
EOF
|
||||
desktop-file-validate %{buildroot}%{_datadir}/applications/%{name}.desktop
|
||||
|
||||
|
@ -1519,6 +1533,18 @@ 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
|
||||
|
||||
#------------------------------------------------------------------------
|
||||
# Jupyter integration
|
||||
mkdir -p %{buildroot}%{_datadir}/jupyter/kernels/sagemath
|
||||
pushd %{buildroot}%{_datadir}/jupyter/kernels/sagemath
|
||||
ln -s %{_docdir}/%{name}/html/en doc
|
||||
ln -s %{SAGE_ETC}/notebook-ipython/logo-64x64.png logo-64x64.png
|
||||
ln -s %{SAGE_ETC}/notebook-ipython/logo.svg logo.svg
|
||||
cat > kernel.json << EOF
|
||||
{"display_name": "SageMath %{version}", "argv": ["%{_bindir}/sage", "--python", "-m", "sage.repl.ipython_kernel", "-f", "{connection_file}"]}
|
||||
EOF
|
||||
popd
|
||||
|
||||
# last install command
|
||||
rm -fr $DOT_SAGE
|
||||
|
||||
|
@ -1581,14 +1607,6 @@ rm -fr $DOT_SAGE
|
|||
%if %{with bundled_ipywidgets}
|
||||
%{SAGE_PYTHONPATH}/ipywidgets
|
||||
%endif
|
||||
%if %{with bundled_widgetsnbextension}
|
||||
%dir %{_sysconfdir}/jupyter
|
||||
%dir %{_sysconfdir}/jupyter/nbconfig
|
||||
%dir %{_sysconfdir}/jupyter/nbconfig/notebook.d
|
||||
%config(noreplace) %{_sysconfdir}/jupyter/nbconfig/notebook.d/*.json
|
||||
%{_datadir}/jupyter/
|
||||
%{python2_sitelib}/widgetsnbextension*
|
||||
%endif
|
||||
|
||||
#------------------------------------------------------------------------
|
||||
%files data
|
||||
|
@ -1697,6 +1715,10 @@ rm -fr $DOT_SAGE
|
|||
# with docs
|
||||
%endif
|
||||
|
||||
#------------------------------------------------------------------------
|
||||
%files jupyter
|
||||
%{_datadir}/jupyter/kernels/sagemath/
|
||||
|
||||
#------------------------------------------------------------------------
|
||||
%files notebook
|
||||
%{SAGE_ETC}/notebook-ipython
|
||||
|
@ -1722,7 +1744,6 @@ rm -fr $DOT_SAGE
|
|||
%{python2_sitearch}/sagenb/data/json
|
||||
# Symbolic link to $_jsdir/mathjax
|
||||
%{python2_sitearch}/sagenb/data/mathjax
|
||||
%ghost %{python2_sitearch}/sagenb/data/mathjax.rpmmoved
|
||||
# Empty (do not run doctests flag file)
|
||||
%{python2_sitearch}/sagenb/data/nodoctest.py*
|
||||
# BSD
|
||||
|
@ -1765,6 +1786,12 @@ rm -fr $DOT_SAGE
|
|||
%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
|
||||
%if %{with bundled_widgetsnbextension}
|
||||
%config(noreplace) %{_sysconfdir}/jupyter/nbconfig/notebook.d/*.json
|
||||
%{_datadir}/jupyter/nbextensions/
|
||||
%{python2_sitelib}/widgetsnbextension*
|
||||
%endif
|
||||
%{_datadir}/jupyter/kernels/sagemath/
|
||||
|
||||
#------------------------------------------------------------------------
|
||||
%files notebook-export
|
||||
|
@ -1794,6 +1821,23 @@ rm -fr $DOT_SAGE
|
|||
|
||||
########################################################################
|
||||
%changelog
|
||||
* Sat Jan 19 2019 Jerry James <loganjerry@gmail.com> - 8.3-2
|
||||
- Add -buildroot patch and only build cython interfaces once
|
||||
- Drop LANGUAGES variable setting, now ignored by the sagemath build system
|
||||
- Drop unused SAGE_CBLAS variable from /usr/bin/sage
|
||||
- Do not force the C locale when launching sagemath
|
||||
- Allow the user to override SAGE_DEBUG in /usr/bin/sage
|
||||
- Add -ecm, -giac, and -latte patches to fix interactions with external tools
|
||||
- Add -sigfpe patch from upstream
|
||||
- Fix flask_autoindex and flask_openid imports in sagenb
|
||||
- Add Education category to the desktop file (bz 1624545)
|
||||
- Fix SINGULAR_SO variable in /usr/bin/sage (bz 1636759 and 1655248)
|
||||
- Invoke twistd-2 instead of twistd (bz 1640890)
|
||||
- Improve jupyter integration (bz 1663165)
|
||||
- Move existing jupyter integration into the notebook subpackage
|
||||
- Require python-jupyter-filesystem instead of owning its directories
|
||||
- Drop one more remnant of the F24 to F25 upgrade fixup
|
||||
|
||||
* 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
|
||||
|
|
Loading…
Add table
Reference in a new issue