[sagemath] 03/03: Move parts of unbreak.patch to maxima.patch and pari.patch.

Tobias Hansen thansen at moszumanska.debian.org
Sat May 23 14:16:02 UTC 2015


This is an automated email from the git hooks/post-receive script.

thansen pushed a commit to branch master
in repository sagemath.

commit 56d152d10d16c30351299539703749b935cb57d3
Author: Tobias Hansen <tobias.han at gmx.de>
Date:   Sat May 23 14:11:50 2015 +0000

    Move parts of unbreak.patch to maxima.patch and pari.patch.
---
 debian/patches/maxima.patch  |  69 ++++++++++++++++++++++++++
 debian/patches/pari.patch    |  48 ++++++++++++++++++
 debian/patches/unbreak.patch | 115 -------------------------------------------
 3 files changed, 117 insertions(+), 115 deletions(-)

diff --git a/debian/patches/maxima.patch b/debian/patches/maxima.patch
index 7cc9f1c..ff20784 100644
--- a/debian/patches/maxima.patch
+++ b/debian/patches/maxima.patch
@@ -1,3 +1,14 @@
+--- a/sage/src/doc/en/constructions/plotting.rst
++++ b/sage/src/doc/en/constructions/plotting.rst
+@@ -214,7 +214,7 @@
+ ::
+ 
+     sage: maxima.eval('load("plotdf");')
+-    '".../local/share/maxima/.../share/dynamics/plotdf.lisp"'
++    '".../share/maxima/.../share/dynamics/plotdf.lisp"'
+     sage: maxima.eval('plotdf(x+y,[trajectory_at,2,-0.1]); ') #optional
+ 
+ This plots a direction field (the plotdf Maxima package was also
 --- a/sage/src/sage/interfaces/maxima_lib.py
 +++ b/sage/src/sage/interfaces/maxima_lib.py
 @@ -77,7 +77,7 @@
@@ -9,3 +20,61 @@
  ecl_eval("(in-package :maxima)")
  ecl_eval("(setq $nolabels t))")
  ecl_eval("(defvar *MAXIMA-LANG-SUBDIR* NIL)")
+--- a/sage/src/sage/interfaces/maxima.py
++++ b/sage/src/sage/interfaces/maxima.py
+@@ -551,7 +551,7 @@
+         Expect.__init__(self,
+                         name = 'maxima',
+                         prompt = '\(\%i[0-9]+\) ',
+-                        command = 'maxima --userdir="%s" -p "%s"'%(SAGE_MAXIMA_DIR,STARTUP),
++                        command = 'maxima -l ecl --userdir="%s" -p "%s"'%(SAGE_MAXIMA_DIR,STARTUP),
+                         maxread = 10000,
+                         script_subdirectory = script_subdirectory,
+                         restart_on_ctrlc = False,
+@@ -765,7 +765,7 @@
+         if not wait_for_prompt:
+             return
+         # line_echo sometimes has randomly inserted terminal echo in front #15811
+-        assert line_echo.strip().endswith(line.strip()), 'mismatch:\n' + line_echo + line
++        #assert line_echo.strip().endswith(line.strip()), 'mismatch:\n' + line_echo + line
+ 
+         self._expect_expr(self._display_prompt)
+         out = self._before()        # input echo + output prompt + output
+--- a/sage/src/sage/interfaces/maxima_abstract.py
++++ b/sage/src/sage/interfaces/maxima_abstract.py
+@@ -157,7 +157,7 @@
+             -- Function: gcd (<p_1>, <p_2>, <x_1>, ...)
+             ...
+         """
+-        cmd = 'maxima --very-quiet -r "%s(%s);" '%(command, s)
++        cmd = 'maxima -l ecl --very-quiet -r "%s(%s);" '%(command, s)
+         if sage.server.support.EMBEDDED_MODE:
+             cmd += '< /dev/null'
+ 
+@@ -165,10 +165,7 @@
+             p = subprocess.Popen(cmd, shell=True, stdin=subprocess.PIPE,
+                              stdout=subprocess.PIPE, stderr=subprocess.PIPE)
+             res = p.stdout.read()
+-            # We get 4 lines of commented verbosity
+-            # every time Maxima starts, so we need to get rid of them
+-            for _ in range(4):
+-                res = res[res.find('\n')+1:]
++            res = '\n'.join([line for line in res.split('\n') if line != '' and not line.startswith(';;;') and not line.startswith('(%i1)')])
+             return AsciiArtString(res)
+         else:
+             subprocess.Popen(cmd, shell=True)
+@@ -2349,7 +2346,7 @@
+         sage: maxima_version()
+         '5.35.1'
+     """
+-    return os.popen('maxima --version').read().split()[-1]
++    return os.popen('maxima -l ecl --version').read().split()[-1]
+ 
+ def maxima_console():
+     """
+@@ -2362,4 +2359,4 @@
+         Maxima 5.34.1 http://maxima.sourceforge.net
+         ...
+     """
+-    os.system('maxima')
++    os.system('maxima -l ecl')
diff --git a/debian/patches/pari.patch b/debian/patches/pari.patch
index 804bb9a..c91620a 100644
--- a/debian/patches/pari.patch
+++ b/debian/patches/pari.patch
@@ -1,3 +1,51 @@
+--- a/sage/src/bin/sage-env
++++ b/sage/src/bin/sage-env
+@@ -300,9 +300,9 @@
+ fi
+ 
+ # For PARI/GP
+-GP_DATA_DIR="$SAGE_LOCAL/share/pari" && export GP_DATA_DIR
+-GPHELP="$SAGE_LOCAL/bin/gphelp" && export GPHELP
+-GPDOCDIR="$SAGE_LOCAL/share/pari/doc" && export GPDOCDIR
++GP_DATA_DIR="/usr/share/pari" && export GP_DATA_DIR
++GPHELP="/usr/bin/gphelp" && export GPHELP
++GPDOCDIR="/usr/share/pari/doc" && export GPDOCDIR
+ 
+ # Allow git to work without warning messages after relocating Sage.
+ # See trac #15901.
+--- a/sage/src/sage/interfaces/gp.py
++++ b/sage/src/sage/interfaces/gp.py
+@@ -222,9 +222,9 @@
+         # list of directories where gp will look for scripts (only current working directory)
+         self._eval_line('default(path,".");')
+         # location of elldata, seadata, galdata
+-        self._eval_line('default(datadir, "$SAGE_LOCAL/share/pari");')
++        self._eval_line('default(datadir, "/usr/share/pari");')
+         # executable for gp ?? help
+-        self._eval_line('default(help, "$SAGE_LOCAL/bin/gphelp -detex");')
++        self._eval_line('default(help, "/usr/bin/gphelp -detex");')
+         # logfile disabled since Expect already logs
+         self._eval_line('default(log,0);')
+ 
+@@ -501,7 +501,7 @@
+             sage: gp.get_default('log')
+             0
+             sage: gp.get_default('datadir')
+-            '.../local/share/pari'
++            '.../share/pari'
+             sage: gp.get_default('seriesprecision')
+             16
+             sage: gp.get_default('realprecision')
+--- a/sage/src/sage/libs/pari/decl.pxi
++++ b/sage/src/sage/libs/pari/decl.pxi
+@@ -4266,5 +4266,5 @@
+ 
+     extern gp_data* GP_DATA
+ 
+-cdef extern from 'pari/anal.h':
+-    char* closure_func_err()
++#cdef extern from 'pari/anal.h':
++cdef extern char* closure_func_err()
 --- a/sage/src/Makefile
 +++ b/sage/src/Makefile
 @@ -24,7 +24,7 @@
diff --git a/debian/patches/unbreak.patch b/debian/patches/unbreak.patch
index 439e3ec..385bd15 100644
--- a/debian/patches/unbreak.patch
+++ b/debian/patches/unbreak.patch
@@ -60,19 +60,6 @@
  export SAGE_SPKG_INST="$SAGE_LOCAL/var/lib/sage/installed"
  export SAGE_LOGS="$SAGE_ROOT/logs/pkgs"
  export SAGE_SRC="$SAGE_ROOT/src"
-@@ -300,9 +300,9 @@
- fi
- 
- # For PARI/GP
--GP_DATA_DIR="$SAGE_LOCAL/share/pari" && export GP_DATA_DIR
--GPHELP="$SAGE_LOCAL/bin/gphelp" && export GPHELP
--GPDOCDIR="$SAGE_LOCAL/share/pari/doc" && export GPDOCDIR
-+GP_DATA_DIR="/usr/share/pari" && export GP_DATA_DIR
-+GPHELP="/usr/bin/gphelp" && export GPHELP
-+GPDOCDIR="/usr/share/pari/doc" && export GPDOCDIR
- 
- # Allow git to work without warning messages after relocating Sage.
- # See trac #15901.
 @@ -420,8 +420,6 @@
  unset R_HOME
  unset R_PROFILE
@@ -114,17 +101,6 @@
                           CPPPATH=includes )
  env.Install("$SAGE_LOCAL/lib", lib)
  env.Install("$SAGE_LOCAL/include/csage", [ os.path.join('include',x) for x in incFiles ])
---- a/sage/src/doc/en/constructions/plotting.rst
-+++ b/sage/src/doc/en/constructions/plotting.rst
-@@ -214,7 +214,7 @@
- ::
- 
-     sage: maxima.eval('load("plotdf");')
--    '".../local/share/maxima/.../share/dynamics/plotdf.lisp"'
-+    '".../share/maxima/.../share/dynamics/plotdf.lisp"'
-     sage: maxima.eval('plotdf(x+y,[trajectory_at,2,-0.1]); ') #optional
- 
- This plots a direction field (the plotdf Maxima package was also
 --- a/sage/src/module_list.py
 +++ b/sage/src/module_list.py
 @@ -4,7 +4,7 @@
@@ -226,87 +202,6 @@
  
  first_try = True
  
---- a/sage/src/sage/interfaces/gp.py
-+++ b/sage/src/sage/interfaces/gp.py
-@@ -222,9 +222,9 @@
-         # list of directories where gp will look for scripts (only current working directory)
-         self._eval_line('default(path,".");')
-         # location of elldata, seadata, galdata
--        self._eval_line('default(datadir, "$SAGE_LOCAL/share/pari");')
-+        self._eval_line('default(datadir, "/usr/share/pari");')
-         # executable for gp ?? help
--        self._eval_line('default(help, "$SAGE_LOCAL/bin/gphelp -detex");')
-+        self._eval_line('default(help, "/usr/bin/gphelp -detex");')
-         # logfile disabled since Expect already logs
-         self._eval_line('default(log,0);')
- 
-@@ -501,7 +501,7 @@
-             sage: gp.get_default('log')
-             0
-             sage: gp.get_default('datadir')
--            '.../local/share/pari'
-+            '.../share/pari'
-             sage: gp.get_default('seriesprecision')
-             16
-             sage: gp.get_default('realprecision')
---- a/sage/src/sage/interfaces/maxima.py
-+++ b/sage/src/sage/interfaces/maxima.py
-@@ -551,7 +551,7 @@
-         Expect.__init__(self,
-                         name = 'maxima',
-                         prompt = '\(\%i[0-9]+\) ',
--                        command = 'maxima --userdir="%s" -p "%s"'%(SAGE_MAXIMA_DIR,STARTUP),
-+                        command = 'maxima -l ecl --userdir="%s" -p "%s"'%(SAGE_MAXIMA_DIR,STARTUP),
-                         maxread = 10000,
-                         script_subdirectory = script_subdirectory,
-                         restart_on_ctrlc = False,
-@@ -765,7 +765,7 @@
-         if not wait_for_prompt:
-             return
-         # line_echo sometimes has randomly inserted terminal echo in front #15811
--        assert line_echo.strip().endswith(line.strip()), 'mismatch:\n' + line_echo + line
-+        #assert line_echo.strip().endswith(line.strip()), 'mismatch:\n' + line_echo + line
- 
-         self._expect_expr(self._display_prompt)
-         out = self._before()        # input echo + output prompt + output
---- a/sage/src/sage/interfaces/maxima_abstract.py
-+++ b/sage/src/sage/interfaces/maxima_abstract.py
-@@ -157,7 +157,7 @@
-             -- Function: gcd (<p_1>, <p_2>, <x_1>, ...)
-             ...
-         """
--        cmd = 'maxima --very-quiet -r "%s(%s);" '%(command, s)
-+        cmd = 'maxima -l ecl --very-quiet -r "%s(%s);" '%(command, s)
-         if sage.server.support.EMBEDDED_MODE:
-             cmd += '< /dev/null'
- 
-@@ -165,10 +165,7 @@
-             p = subprocess.Popen(cmd, shell=True, stdin=subprocess.PIPE,
-                              stdout=subprocess.PIPE, stderr=subprocess.PIPE)
-             res = p.stdout.read()
--            # We get 4 lines of commented verbosity
--            # every time Maxima starts, so we need to get rid of them
--            for _ in range(4):
--                res = res[res.find('\n')+1:]
-+            res = '\n'.join([line for line in res.split('\n') if line != '' and not line.startswith(';;;') and not line.startswith('(%i1)')])
-             return AsciiArtString(res)
-         else:
-             subprocess.Popen(cmd, shell=True)
-@@ -2349,7 +2346,7 @@
-         sage: maxima_version()
-         '5.35.1'
-     """
--    return os.popen('maxima --version').read().split()[-1]
-+    return os.popen('maxima -l ecl --version').read().split()[-1]
- 
- def maxima_console():
-     """
-@@ -2362,4 +2359,4 @@
-         Maxima 5.34.1 http://maxima.sourceforge.net
-         ...
-     """
--    os.system('maxima')
-+    os.system('maxima -l ecl')
 --- a/sage/src/sage/interfaces/singular.py
 +++ b/sage/src/sage/interfaces/singular.py
 @@ -2148,7 +2148,7 @@
@@ -329,16 +224,6 @@
      if os.path.exists(gapdir):
          return gapdir
      print 'The gap-4.5.5.spkg (or later) seems to be not installed!'
---- a/sage/src/sage/libs/pari/decl.pxi
-+++ b/sage/src/sage/libs/pari/decl.pxi
-@@ -4266,5 +4266,5 @@
- 
-     extern gp_data* GP_DATA
- 
--cdef extern from 'pari/anal.h':
--    char* closure_func_err()
-+#cdef extern from 'pari/anal.h':
-+cdef extern char* closure_func_err()
 --- a/sage/src/sage/libs/singular/singular.pyx
 +++ b/sage/src/sage/libs/singular/singular.pyx
 @@ -712,15 +712,13 @@

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/debian-science/packages/sagemath.git



More information about the debian-science-commits mailing list