[sagemath] 02/03: Import new version of unbreak.patch.

Tobias Hansen thansen at moszumanska.debian.org
Sun Mar 1 21:25:59 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 8125c21fea2def9279d7a855ac26134cceba9c8e
Author: Tobias Hansen <tobias.han at gmx.de>
Date:   Sun Mar 1 16:05:48 2015 +0000

    Import new version of unbreak.patch.
---
 debian/patches/unbreak.patch | 335 ++++++++++++++++++++++++++++++++++++++-----
 1 file changed, 297 insertions(+), 38 deletions(-)

diff --git a/debian/patches/unbreak.patch b/debian/patches/unbreak.patch
index 7e804f7..87d17fa 100644
--- a/debian/patches/unbreak.patch
+++ b/debian/patches/unbreak.patch
@@ -61,6 +61,15 @@
  
      # Display the startup banner
      if [ "$SAGE_BANNER" != "no" ]; then
+@@ -389,7 +389,7 @@
+ 
+ if [ "$1" = '-singular' -o "$1" = '--singular' ]; then
+     shift
+-    exec singular "$@"
++    exec Singular "$@"
+ fi
+ 
+ if [ "$1" = '-sqlite3' -o "$1" = '--sqlite3' ]; then
 --- a/sage/src/bin/sage-build
 +++ b/sage/src/bin/sage-build
 @@ -27,4 +27,4 @@
@@ -82,7 +91,7 @@
  export SAGE_SPKG_INST="$SAGE_LOCAL/var/lib/sage/installed"
  export SAGE_LOGS="$SAGE_ROOT/logs/pkgs"
  export SAGE_SRC="$SAGE_ROOT/src"
-@@ -300,14 +300,14 @@
+@@ -300,9 +300,9 @@
  fi
  
  # For PARI/GP
@@ -95,31 +104,25 @@
  
  # Allow git to work without warning messages after relocating Sage.
  # See trac #15901.
--GIT_TEMPLATE_DIR="$SAGE_LOCAL"/share/git-core/templates && export GIT_TEMPLATE_DIR
--GIT_EXEC_PATH="$SAGE_LOCAL"/libexec/git-core && export GIT_EXEC_PATH
-+#GIT_TEMPLATE_DIR="$SAGE_LOCAL"/share/git-core/templates && export GIT_TEMPLATE_DIR
-+#GIT_EXEC_PATH="$SAGE_LOCAL"/libexec/git-core && export GIT_EXEC_PATH
- 
- SINGULARPATH="$SAGE_LOCAL/share/singular" && export SINGULARPATH
- SINGULAR_EXECUTABLE="$SAGE_LOCAL/bin/Singular" && export SINGULAR_EXECUTABLE
-@@ -429,7 +429,7 @@
+@@ -429,8 +429,6 @@
  unset R_HOME
  unset R_PROFILE
  
 -MAXIMA_PREFIX="$SAGE_ROOT/local" && export MAXIMA_PREFIX
-+#MAXIMA_PREFIX="$SAGE_ROOT/local" && export MAXIMA_PREFIX
- 
+-
  ############ architecture flags
  
-@@ -603,7 +603,7 @@
+ # Support flags to change the build architecture.  Currently, this is
+@@ -602,9 +600,6 @@
+     LD_LIBRARY_PATH="$SAGE_LOCAL/bin:$LD_LIBRARY_PATH" && export LD_LIBRARY_PATH
  fi
  
- # See trac 7186 -- this is needed if ecl is moved
+-# See trac 7186 -- this is needed if ecl is moved
 -ECLDIR="$SAGE_LOCAL/lib/ecl/" && export ECLDIR
-+#ECLDIR="$SAGE_LOCAL/lib/ecl/" && export ECLDIR
- 
+-
  # Handle parallel building/testing/...
  # See Trac Ticket #12016
+ # First, figure out the right values for SAGE_NUM_THREADS (default
 --- a/sage/src/c_lib/SConstruct
 +++ b/sage/src/c_lib/SConstruct
 @@ -126,8 +126,8 @@
@@ -142,6 +145,17 @@
                           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 @@
@@ -149,7 +163,7 @@
  from sage.env import SAGE_LOCAL
  
 -SAGE_INC = os.path.join(SAGE_LOCAL, 'include')
-+SAGE_INC = os.path.join('/usr', 'include')
++SAGE_INC = '/usr/include'
  
  #########################################################
  ### BLAS setup
@@ -162,6 +176,36 @@
                extra_compile_args=["-O3", "-ffast-math"],
                language = 'c++'),
  
+--- a/sage/src/sage/all.py
++++ b/sage/src/sage/all.py
+@@ -15,27 +15,6 @@
+     sage: from sage import *
+     sage: frames = [x for x in gc.get_objects() if inspect.isframe(x)]
+ 
+-We exclude the known files and check to see that there are no others::
+-
+-    sage: import os
+-    sage: allowed = [os.path.join("lib","python","threading.py")]
+-    sage: allowed.append(os.path.join("lib","python","multiprocessing"))
+-    sage: allowed.append(os.path.join("sage","doctest"))
+-    sage: allowed.append(os.path.join("bin","sage-runtests"))
+-    sage: allowed.append(os.path.join("site-packages","IPython"))
+-    sage: allowed.append(os.path.join("bin","sage-ipython"))
+-    sage: allowed.append("<ipython console>")
+-    sage: allowed.append("<doctest sage.all[3]>")
+-    sage: allowed.append(os.path.join("sage","combinat","species","generating_series.py"))
+-    sage: for i in frames:
+-    ....:     filename, lineno, funcname, linelist, indx = inspect.getframeinfo(i)
+-    ....:     for nm in allowed:
+-    ....:         if nm in filename:
+-    ....:             break
+-    ....:     else:
+-    ....:         print filename
+-    ....:
+-
+ Check that the Sage Notebook is not imported at startup (see
+ :trac:`15335`)::
+ 
 --- a/sage/src/sage/dev/all.py
 +++ b/sage/src/sage/dev/all.py
 @@ -1,3 +1,3 @@
@@ -169,6 +213,17 @@
  
 -lazy_import('sage.dev.sagedev_instance', 'dev')
 +#lazy_import('sage.dev.sagedev_instance', 'dev')
+--- a/sage/src/sage/doctest/control.py
++++ b/sage/src/sage/doctest/control.py
+@@ -168,6 +168,8 @@
+         True
+     """
+     base, ext = os.path.splitext(filename)
++    if filename.find('sagedev') != -1 or filename.find('sage/dev') != -1:
++        return True
+     if ext not in ('.py', '.pyx', '.pxi', '.sage', '.spyx', '.rst', '.tex'):
+         return True
+     with open(filename) as F:
 --- a/sage/src/sage/env.py
 +++ b/sage/src/sage/env.py
 @@ -89,7 +89,7 @@
@@ -180,6 +235,17 @@
  
  _add_variable_or_fallback('SAGE_SRC',        opj('$SAGE_ROOT', 'src'))
  _add_variable_or_fallback('SITE_PACKAGES',   site.getsitepackages())
+--- a/sage/src/sage/ext/pselect.pyx
++++ b/sage/src/sage/ext/pselect.pyx
+@@ -290,7 +290,7 @@
+         writing, but not reading (since nothing has been written)::
+ 
+             sage: f = open(os.devnull, "r")
+-            sage: g = open(os.path.join(SAGE_LOCAL, 'bin', 'python'), "r")
++            sage: g = open('/usr/bin/python2.7', "r")
+             sage: (pr, pw) = os.pipe()
+             sage: r, w, x, t = PSelecter().pselect([f,g,pr,pw], [pw], [pr,pw])
+             sage: len(r), len(w), len(x), t
 --- a/sage/src/sage/interfaces/gap.py
 +++ b/sage/src/sage/interfaces/gap.py
 @@ -189,7 +189,7 @@
@@ -187,23 +253,13 @@
  WORKSPACE = os.path.join(GAP_DIR, 'workspace-%s'%abs(hash(SAGE_LOCAL)))
  
 -GAP_BINARY = os.path.join(SAGE_LOCAL, 'bin', 'gap')
-+GAP_BINARY = os.path.join('/usr', 'bin', 'gap')
++GAP_BINARY = '/usr/bin/gap'
  
  first_try = True
  
 --- a/sage/src/sage/interfaces/gp.py
 +++ b/sage/src/sage/interfaces/gp.py
-@@ -212,6 +212,9 @@
-         self.__var_store_len = 0
-         self.__init_list_length = init_list_length
- 
-+    def _start(self, alt_message=None, block_during_init=True):
-+        Expect._start(self, alt_message, block_during_init)
-+        self._eval_line('default(breakloop,0);')
- 
-     def _repr_(self):
-         """
-@@ -486,7 +489,7 @@
+@@ -486,7 +486,7 @@
              sage: gp.get_default('log')
              0
              sage: gp.get_default('datadir')
@@ -212,18 +268,17 @@
              sage: gp.get_default('seriesprecision')
              16
              sage: gp.get_default('realprecision')
-@@ -1000,9 +1003,6 @@
- from sage.env import DOT_SAGE, SAGE_ETC
- import os
- 
--# Set GPRC environment variable to $SAGE_ETC/gprc.expect
--os.environ["GPRC"] = os.path.join(SAGE_ETC, 'gprc.expect')
--
- # An instance
- gp = Gp(logfile=os.path.join(DOT_SAGE,'gp-expect.log')) # useful for debugging!
- 
 --- 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
@@ -233,6 +288,84 @@
  
          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/rubik.py
++++ b/sage/src/sage/interfaces/rubik.py
+@@ -88,7 +88,7 @@
+     """
+     Interface to Michael Reid's optimal Rubik's Cube solver.
+     """
+-    __cmd = "optimal"
++    __cmd = "rubiks_optimal"
+ 
+     def __init__(self, verbose=False, wait=True):
+         self.verbose = verbose
+@@ -176,7 +176,7 @@
+ 
+ class CubexSolver:
+ 
+-    __cmd = "cubex"
++    __cmd = "rubiks_cubex"
+ 
+     def __call__(self, facets):
+         return self.solve(facets)
+@@ -230,7 +230,7 @@
+ 
+ class DikSolver:
+ 
+-    __cmd = "dikcube"
++    __cmd = "rubiks_dikcube"
+ 
+     def __call__(self, facets):
+         return self.solve(facets)
+--- a/sage/src/sage/interfaces/singular.py
++++ b/sage/src/sage/interfaces/singular.py
+@@ -2149,7 +2149,7 @@
+     nodes.clear()
+     node_names.clear()
+ 
+-    singular_docdir = os.environ["SAGE_LOCAL"]+"/share/singular/"
++    singular_docdir = "/usr/share/singular-3-1-6/info/"
+ 
+     new_node = re.compile("File: singular\.hlp,  Node: ([^,]*),.*")
+     new_lookup = re.compile("\* ([^:]*):*([^.]*)\..*")
 --- a/sage/src/sage/libs/gap/util.pyx
 +++ b/sage/src/sage/libs/gap/util.pyx
 @@ -156,7 +156,7 @@
@@ -244,6 +377,132 @@
      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
+@@ -3758,5 +3758,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
+@@ -694,11 +694,9 @@
+ 
+     cdef void *handle = NULL
+ 
+-    for extension in ["so", "dylib", "dll"]:
+-        lib = os.environ['SAGE_LOCAL']+"/lib/libsingular."+extension
+-        if os.path.exists(lib):
+-            handle = dlopen(lib, RTLD_GLOBAL|RTLD_LAZY)
+-            break
++    lib = "/usr/lib/libsingular.so"
++    if os.path.exists(lib):
++        handle = dlopen(lib, RTLD_GLOBAL|RTLD_LAZY)
+ 
+     if handle == NULL:
+         print dlerror()
+--- a/sage/src/sage/misc/cython.py
++++ b/sage/src/sage/misc/cython.py
+@@ -68,9 +68,9 @@
+         return 'atlas'
+ 
+ include_dirs = [os.path.join(SAGE_LOCAL,'include','csage'),
+-                os.path.join(SAGE_LOCAL,'include'), \
+-                os.path.join(SAGE_LOCAL,'include','python'+platform.python_version().rsplit('.', 1)[0]), \
+-                os.path.join(SAGE_LOCAL,'lib','python','site-packages','numpy','core','include'), \
++                '/usr/include', \
++                os.path.join('/usr/include','python'+platform.python_version().rsplit('.', 1)[0]), \
++                os.path.join('/usr/lib','python','site-packages','numpy','core','include'), \
+                 os.path.join(SAGE_SRC,'sage','ext'), \
+                 os.path.join(SAGE_SRC), \
+                 os.path.join(SAGE_SRC,'sage','gsl')]
+@@ -337,7 +337,7 @@
+ 
+         sage: code = [
+         ... "#clang C++",
+-        ... "#cinclude %s/include/singular %s/include/factory"%(SAGE_LOCAL, SAGE_LOCAL),
++        ... "#cinclude /usr/include/singular /usr/include/factory",
+         ... "#clib m readline singular givaro ntl gmpxx gmp",
+         ... "from sage.rings.polynomial.multi_polynomial_libsingular cimport MPolynomial_libsingular",
+         ... "from sage.libs.singular.polynomial cimport singular_polynomial_pow",
+@@ -435,7 +435,7 @@
+     file_list = []
+     for fname in additional_source_files:
+         fname = fname.replace("$SAGE_SRC", SAGE_SRC)
+-        fname = fname.replace("$SAGE_LOCAL", SAGE_LOCAL)
++        fname = fname.replace("$SAGE_LOCAL", '/usr/include')
+         if fname.startswith(os.path.sep):
+             file_list.append("'"+fname+"'")
+         else:
+--- a/sage/src/sage/plot/arrow.py
++++ b/sage/src/sage/plot/arrow.py
+@@ -411,7 +411,7 @@
+                         return False
+ 
+ 
+-            class ConditionalStroke(pe._Base):
++            class ConditionalStroke(pe.AbstractPathEffect):
+ 
+                 def __init__(self, condition_func, pe_list):
+                     """
+--- a/sage/src/sage/plot/colors.py
++++ b/sage/src/sage/plot/colors.py
+@@ -19,7 +19,7 @@
+ 
+ For a list of color maps in Sage, evaluate::
+ 
+-    sage: sorted(colormaps)
++    sage: sorted(colormaps) # output is random
+     ['Accent', 'Accent_r', 'Blues', 'Blues_r', 'BrBG', 'BrBG_r', ...]
+ 
+ These are imported from matplotlib's cm_ module.
+@@ -1375,7 +1375,7 @@
+     object), given its name or a [mixed] list/tuple of RGB list/tuples
+     and color names.  For a list of map names, evaluate::
+ 
+-        sage: sorted(colormaps)
++        sage: sorted(colormaps) # output is random
+         ['Accent', 'Accent_r', 'Blues', 'Blues_r', ...]
+ 
+     See :func:`rgbcolor` for valid list/tuple element formats.
+@@ -1436,7 +1436,7 @@
+     A dict-like collection of lazily-loaded matplotlib color maps.
+     For a list of map names, evaluate::
+ 
+-        sage: sorted(colormaps)
++        sage: sorted(colormaps) # output is random
+         ['Accent', 'Accent_r', 'Blues', 'Blues_r', ...]
+     """
+     def __init__(self):
+--- a/sage/src/sage/tests/cmdline.py
++++ b/sage/src/sage/tests/cmdline.py
+@@ -548,12 +548,6 @@
+         sage: ret
+         0
+ 
+-    Check that ``sage-location`` did its job in making Python scripts
+-    relative.  We test it on the ``ipython`` script::
+-
+-        sage: open(os.path.join(SAGE_LOCAL, "bin", "ipython")).readline()
+-        '#!/usr/bin/env python\n'
+-
+     Test GP using the ``-f`` option which prevents the reading of a ``.gprc``
+     configuration file::
+ 
+--- a/sage/src/sage/tests/gap_packages.py
++++ b/sage/src/sage/tests/gap_packages.py
+@@ -104,7 +104,7 @@
+ 
+         sage: from sage.tests.gap_packages import all_installed_packages
+         sage: all_installed_packages()
+-        (...'GAPDoc',...)
++        (...'gapdoc',...)
+     """
+     packages = []
+     for path in libgap.eval('GAP_ROOT_PATHS').sage():
 --- a/sage/src/setup.py
 +++ b/sage/src/setup.py
 @@ -146,9 +146,9 @@

-- 
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