Do not interpret GAP library informational messages as a libgap failure.

Build with cryptominisat5.
Sagemath now invokes gap instead of gap_stamp.
This commit is contained in:
Jerry James 2017-11-25 14:55:31 -07:00
parent bd028da8f7
commit 6b2efc5514
2 changed files with 31 additions and 9 deletions

View file

@ -1,6 +1,6 @@
diff -up src/sage/libs/gap/test/main.c.orig src/sage/libs/gap/test/main.c
--- src/sage/libs/gap/test/main.c.orig 2017-11-08 08:24:43.763210440 -0500
+++ src/sage/libs/gap/test/main.c 2017-11-08 08:24:46.603210549 -0500
--- src/sage/libs/gap/test/main.c.orig 2017-07-21 13:10:16.000000000 -0600
+++ src/sage/libs/gap/test/main.c 2017-11-24 10:40:06.024865775 -0700
@@ -22,7 +22,7 @@ void eval(char* cmd) {
libgap_start_interaction(cmd);
@ -11,9 +11,18 @@ diff -up src/sage/libs/gap/test/main.c.orig src/sage/libs/gap/test/main.c
char* out = libgap_get_output();
libgap_exit();
diff -up src/sage/libs/gap/util.pyx.orig src/sage/libs/gap/util.pyx
--- src/sage/libs/gap/util.pyx.orig 2017-11-08 08:24:28.405209852 -0500
+++ src/sage/libs/gap/util.pyx 2017-11-08 08:24:46.603210549 -0500
@@ -160,17 +160,9 @@ def gap_root():
--- src/sage/libs/gap/util.pyx.orig 2017-07-21 13:10:16.000000000 -0600
+++ src/sage/libs/gap/util.pyx 2017-11-24 10:41:12.757621519 -0700
@@ -22,6 +22,8 @@ from sage.interfaces.gap_workspace impor
from sage.env import SAGE_LOCAL, GAP_ROOT_DIR
from .element cimport *
+import re
+
############################################################################
### Hooking into the GAP memory management #################################
@@ -160,17 +162,9 @@ def gap_root():
sage: from sage.libs.gap.util import gap_root
sage: gap_root() # random output
@ -33,3 +42,11 @@ diff -up src/sage/libs/gap/util.pyx.orig src/sage/libs/gap/util.pyx
cdef initialize():
@@ -224,6 +218,7 @@ cdef initialize():
libgap_initialize(argc, argv)
gap_error_msg = str(libgap_get_output())
libgap_finish_interaction()
+ gap_error_msg = re.sub(r'#I.*\n?', '', gap_error_msg, flags=re.MULTILINE)
if gap_error_msg:
raise RuntimeError('libGAP initialization failed\n' + gap_error_msg)

View file

@ -64,7 +64,7 @@ Name: sagemath
Group: Applications/Engineering
Summary: A free open-source mathematics software system
Version: 8.0
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
@ -182,7 +182,7 @@ BuildRequires: brial-devel
BuildRequires: cddlib-tools
BuildRequires: cliquer-devel
BuildRequires: coin-or-Cbc-devel
#BuildRequires: cryptominisat-devel
BuildRequires: cryptominisat-devel
BuildRequires: Cython >= 0.24.1
BuildRequires: desktop-file-utils
BuildRequires: dos2unix
@ -963,7 +963,7 @@ pushd src/bin
ln -sf %{_bindir}/python sage.bin
ln -sf %{_bindir}/python python
ln -sf %{_bindir}/gp sage_pari
ln -sf %{_bindir}/gap gap_stamp
ln -sf %{_bindir}/gap gap
ln -sf %{_bindir}/gmp-ecm ecm
popd
popd
@ -1388,7 +1388,7 @@ exit 0
%dir %{SAGE_LOCAL}/bin
%{SAGE_LOCAL}/bin/QuadraticSieve
%{SAGE_LOCAL}/bin/ecm
%{SAGE_LOCAL}/bin/gap_stamp
%{SAGE_LOCAL}/bin/gap
%{SAGE_LOCAL}/bin/jmol
%if %{with bundled_ipython}
%{SAGE_LOCAL}/bin/ip*
@ -1619,6 +1619,11 @@ exit 0
########################################################################
%changelog
* Sat Nov 25 2017 Jerry James <loganjerry@gmail.com> - 8.0-2
- Do not interpret GAP library informational messages as a libgap failure
- Build with cryptominisat5
- Sagemath now invokes gap instead of gap_stamp
* Thu Nov 23 2017 Jerry James <loganjerry@gmail.com> - 8.0-1
- Build with bundled ipywidgets for now
- Drop unneeded -givaro patch