[arch-commits] Commit in sagemath/trunk (3 files)

Antonio Rojas arojas at archlinux.org
Sat Dec 16 13:02:12 UTC 2017


    Date: Saturday, December 16, 2017 @ 13:02:10
  Author: arojas
Revision: 274567

Fix importing sage from python, fix expected prompt in pexpect interface

Added:
  sagemath/trunk/sagemath-ipython-prompt.patch
Modified:
  sagemath/trunk/PKGBUILD
  sagemath/trunk/sagemath-env.patch

-------------------------------+
 PKGBUILD                      |    9 ++++++---
 sagemath-env.patch            |    6 ++++--
 sagemath-ipython-prompt.patch |   13 +++++++++++++
 3 files changed, 23 insertions(+), 5 deletions(-)

Modified: PKGBUILD
===================================================================
--- PKGBUILD	2017-12-16 11:22:47 UTC (rev 274566)
+++ PKGBUILD	2017-12-16 13:02:10 UTC (rev 274567)
@@ -38,9 +38,9 @@
         sagemath-env.patch package.patch latte-count.patch jupyter-path.patch sagemath-python3-notebook.patch test-optional.patch
         r-no-readline.patch fes02.patch sagemath-ecl-no-sigfpe.patch sagemath-threejs.patch pari-stackwarn.patch
         sagemath-detect-igraph.patch sagemath-networkx2.patch sagemath-linbox-1.5.patch sagemath-pynac-0.7.14.patch
-        sagemath-matplotlib2.patch sagemath-scipy-1.0.patch sagemath-lrs.patch)
+        sagemath-matplotlib2.patch sagemath-scipy-1.0.patch sagemath-lrs.patch sagemath-ipython-prompt.patch)
 sha256sums=('a42b55c2c8ac244535dc9b87171b7d4dd7e1d498099518ab253354fbe2eaaa7b'
-            '6dc9b101310f80381c61c0312a3e5c648771bfe0de2e94ac46fafe7282a3e0ee'
+            '39b76a189365464998cab9355d177581bc2b15dff10858f316faa85f2efa0426'
             'c41ae665499c6cd775d40bbe178f8786830b0931ee26bf11ee02f7d83bcc8107'
             '0b680e674c11c47afa86162d8b49645620b8912722e08133d23357c29ca9310a'
             '2cad308f8adbb6c54e6603fa22b2f0eb60f6f09248d5d015000c3932ac14f646'
@@ -57,7 +57,8 @@
             '538f7b279d72f4b67edb445d386d267f3f7022c1079031ca7ea06f6ce392c906'
             'b9ab2bb5f381ea425e8763b81b8b3a108a3951c594fb1f37f7df921e7c77e26d'
             '17397b8e1843b013ef5d2e083369109f0719651edd8ef0c8493cb49e2bc4324a'
-            'c0f65534a845ba802de6196229159fe67fcc3f72f0cb1ce57d4ae5c9fe10282c')
+            'c0f65534a845ba802de6196229159fe67fcc3f72f0cb1ce57d4ae5c9fe10282c'
+            '937a0081e7aea56bda645ef5f0d34b8e356acd62a7dd128a35163f46e7836131')
 
 prepare(){
   cd sage-$pkgver
@@ -92,6 +93,8 @@
   patch -p1 -i ../pari-stackwarn.patch
 # remove deprecated scipy parameters
   patch -p1 -i ../sagemath-scipy-1.0.patch
+# fix ipython prompt in pexpect interface
+  patch -p1 -i ../sagemath-ipython-prompt.patch
 
 # Upstream patches  
 # fix build against libfes 0.2 http://trac.sagemath.org/ticket/15209

Modified: sagemath-env.patch
===================================================================
--- sagemath-env.patch	2017-12-16 11:22:47 UTC (rev 274566)
+++ sagemath-env.patch	2017-12-16 13:02:10 UTC (rev 274567)
@@ -93,11 +93,13 @@
  # First, figure out the right values for SAGE_NUM_THREADS (default
 --- src/sage/env.py.orig       2017-12-07 19:51:25.554281539 +0000
 +++ src/sage/env.py    2017-12-07 19:51:42.787654650 +0000
-@@ -118,7 +118,7 @@
+@@ -117,8 +117,8 @@
+ _add_variable_or_fallback('LOCAL_IDENTIFIER','$HOSTNAME.%s'%os.getpid())
  
  # bunch of sage directories and files
- _add_variable_or_fallback('SAGE_ROOT',       None)
+-_add_variable_or_fallback('SAGE_ROOT',       None)
 -_add_variable_or_fallback('SAGE_LOCAL',      None)
++_add_variable_or_fallback('SAGE_ROOT',       '')
 +_add_variable_or_fallback('SAGE_LOCAL',      '/usr')
  _add_variable_or_fallback('SAGE_ETC',        opj('$SAGE_LOCAL', 'etc'))
  _add_variable_or_fallback('SAGE_INC',        opj('$SAGE_LOCAL', 'include'))

Added: sagemath-ipython-prompt.patch
===================================================================
--- sagemath-ipython-prompt.patch	                        (rev 0)
+++ sagemath-ipython-prompt.patch	2017-12-16 13:02:10 UTC (rev 274567)
@@ -0,0 +1,13 @@
+diff --git a/src/sage/interfaces/sage0.py b/src/sage/interfaces/sage0.py
+index 4ba76ab0b8..e7740177f4 100644
+--- a/src/sage/interfaces/sage0.py
++++ b/src/sage/interfaces/sage0.py
+@@ -161,7 +161,7 @@ class Sage(ExtraTabCompletion, Expect):
+                 '--no-term-title',
+                 '--simple-prompt',
+             ])
+-            prompt = re.compile('In \[\d+\]: ')
++            prompt = re.compile('sage: ')
+             if init_code is None:
+                 init_code = ['from six.moves import cPickle']
+ 



More information about the arch-commits mailing list