[arch-commits] Commit in sage-mathematics/trunk (8 files)

Antonio Rojas arojas at archlinux.org
Sun Dec 21 12:50:29 UTC 2014


    Date: Sunday, December 21, 2014 @ 13:50:29
  Author: arojas
Revision: 124298

Add patches

Added:
  sage-mathematics/trunk/blas.patch
  sage-mathematics/trunk/c_lib.patch
  sage-mathematics/trunk/clean.patch
  sage-mathematics/trunk/env.patch
  sage-mathematics/trunk/extensions.patch
  sage-mathematics/trunk/paths.patch
  sage-mathematics/trunk/pexpect-env.patch
  sage-mathematics/trunk/skip-check.patch

-------------------+
 blas.patch        |   30 ++++++++++++
 c_lib.patch       |   26 ++++++++++
 clean.patch       |   23 +++++++++
 env.patch         |  125 ++++++++++++++++++++++++++++++++++++++++++++++++++++
 extensions.patch  |   13 +++++
 paths.patch       |   32 +++++++++++++
 pexpect-env.patch |   32 +++++++++++++
 skip-check.patch  |   21 ++++++++
 8 files changed, 302 insertions(+)

Added: blas.patch
===================================================================
--- blas.patch	                        (rev 0)
+++ blas.patch	2014-12-21 12:50:29 UTC (rev 124298)
@@ -0,0 +1,30 @@
+--- src/module_list.py.orig	2014-11-12 20:34:01.861234916 +0100
++++ src/module_list.py	2014-11-12 20:35:39.411508934 +0100
+@@ -10,25 +10,8 @@
+ ### BLAS setup
+ #########################################################
+ 
+-## Choose cblas library -- note -- make sure to update sage/misc/cython.py
+-## if you change this!!
+-if os.environ.has_key('SAGE_BLAS'):
+-    BLAS=os.environ['SAGE_BLAS']
+-    BLAS2=os.environ['SAGE_BLAS']
+-elif os.path.exists('%s/lib/libatlas.so'%os.environ['SAGE_LOCAL']):
+-    BLAS='cblas'
+-    BLAS2='atlas'
+-elif os.path.exists('/usr/lib/libcblas.dylib') or \
+-     os.path.exists('/usr/lib/libcblas.so'):
+-    BLAS='cblas'
+-    BLAS2='cblas'
+-elif os.path.exists('/usr/lib/libblas.dll.a'):
+-    BLAS='gslcblas'
+-    BLAS2='gslcblas'
+-else:
+-    # This is very slow  (?), but *guaranteed* to be available.
+-    BLAS='gslcblas'
+-    BLAS2='gslcblas'
++BLAS='blas'
++BLAS2='cblas'
+ 
+ 
+ #########################################################

Added: c_lib.patch
===================================================================
--- c_lib.patch	                        (rev 0)
+++ c_lib.patch	2014-12-21 12:50:29 UTC (rev 124298)
@@ -0,0 +1,26 @@
+--- src/setup.py.orig	2014-11-01 23:49:10.000000000 +0100
++++ src/setup.py	2014-11-07 00:40:58.414838636 +0100
+@@ -40,7 +40,7 @@
+ 
+ # search for dependencies and add to gcc -I<path>
+ include_dirs = [SAGE_INC,
+-                os.path.join(SAGE_INC, 'csage'),
++                'c_lib/include',
+                 SAGE_SRC,
+                 os.path.join(SAGE_SRC, 'sage', 'ext')]
+ 
+@@ -171,10 +171,12 @@
+     m.libraries = ['csage'] + m.libraries
+     if m.language == 'c++':
+         m.libraries.append('stdc++')
++        m.libraries.append('ntl')
++    m.libraries = m.libraries + ['gmp', 'm', 'dl']
+ 
+     m.extra_compile_args = m.extra_compile_args + extra_compile_args
+     m.extra_link_args = m.extra_link_args + extra_link_args
+-    m.library_dirs = m.library_dirs + [os.path.join(SAGE_LOCAL, "lib")]
++    m.library_dirs += ['c_lib', '%s/lib' % SAGE_LOCAL]
+     m.include_dirs = m.include_dirs + include_dirs
+
+ 
+ 

Added: clean.patch
===================================================================
--- clean.patch	                        (rev 0)
+++ clean.patch	2014-12-21 12:50:29 UTC (rev 124298)
@@ -0,0 +1,23 @@
+--- src/setup.py.orig	2014-11-16 10:34:05.521441703 +0100
++++ src/setup.py	2014-11-16 10:34:16.054812569 +0100
+@@ -581,20 +581,6 @@
+ 
+ 
+ #########################################################
+-### Clean
+-#########################################################
+-
+-print('Cleaning up stale installed files....')
+-t = time.time()
+-from sage_setup.clean import clean_install_dir
+-output_dirs = SITE_PACKAGES + glob.glob(os.path.join(SAGE_SRC, 'build', 'lib*'))
+-for output_dir in output_dirs:
+-    print('- cleaning {0}'.format(output_dir))
+-    clean_install_dir(output_dir, python_packages, python_modules, ext_modules)
+-print('Finished cleaning, time: %.2f seconds.' % (time.time() - t))
+-
+-
+-#########################################################
+ ### Distutils
+ #########################################################
+ 

Added: env.patch
===================================================================
--- env.patch	                        (rev 0)
+++ env.patch	2014-12-21 12:50:29 UTC (rev 124298)
@@ -0,0 +1,125 @@
+--- src/bin/sage-env.orig	2014-12-18 09:56:45.542896161 +0100
++++ src/bin/sage-env	2014-12-18 09:57:25.173009379 +0100
+@@ -110,41 +110,7 @@
+ }
+ 
+ 
+-# New value for SAGE_ROOT: either SAGE_ROOT (if given)
+-# or a guessed value based on pwd.
+-if [ -n "$SAGE_ROOT" ]; then
+-    NEW_SAGE_ROOT="$SAGE_ROOT"
+-elif [ -f sage -a -d build ]; then
+-    NEW_SAGE_ROOT="."
+-elif [ -f ../../sage -a -d ../../build ]; then
+-    NEW_SAGE_ROOT="../.."
+-else
+-    # No idea what SAGE_ROOT should be...
+-    echo >&2 "Error: You must set the SAGE_ROOT environment variable or run this"
+-    echo >&2 "script from the SAGE_ROOT or SAGE_ROOT/local/bin/ directory."
+-    return 1
+-fi
+-
+-# Make NEW_SAGE_ROOT absolute
+-NEW_SAGE_ROOT=`cd "$NEW_SAGE_ROOT" && pwd -P`
+-
+-# Sanity check NEW_SAGE_ROOT
+-if [ -f "$NEW_SAGE_ROOT/sage" -a -d "$NEW_SAGE_ROOT/build" ]; then
+-    :
+-else
+-    echo >&2 "Error: SAGE_ROOT is set to a bad value:"
+-    echo >&2 "SAGE_ROOT=$SAGE_ROOT"
+-    echo >&2 "You must correct it or erase it and run this script from the SAGE_ROOT"
+-    echo >&2 "or SAGE_ROOT/local/bin/ directory."
+-    return 1
+-fi
+-
+-# Warn if NEW_SAGE_ROOT does not equal the old SAGE_ROOT
+-if [ "$SAGE_ROOT" != "$NEW_SAGE_ROOT" -a -n "$SAGE_ROOT" ]; then
+-    echo >&2 "Warning: overwriting SAGE_ROOT environment variable:"
+-    echo >&2 "Old SAGE_ROOT=$SAGE_ROOT"
+-    echo >&2 "New SAGE_ROOT=$NEW_SAGE_ROOT"
+-fi
++NEW_SAGE_ROOT="/usr"
+ 
+ # Don't execute the commands more than once for the same version of
+ # sage-env.  Check this after checking the validity of SAGE_ROOT, but
+@@ -245,15 +211,12 @@
+ fi
+ 
+ # Setting Sage-related location environment variables.
+-export SAGE_LOCAL="$SAGE_ROOT/local"
+-export SAGE_ETC="$SAGE_LOCAL/etc"
++export SAGE_LOCAL="$SAGE_ROOT"
++export SAGE_ETC="/etc"
+ export SAGE_SHARE="$SAGE_LOCAL/share"
+ export SAGE_EXTCODE="$SAGE_SHARE/sage/ext"
+-export SAGE_SPKG_INST="$SAGE_LOCAL/var/lib/sage/installed"
+-export SAGE_LOGS="$SAGE_ROOT/logs/pkgs"
+-export SAGE_SRC="$SAGE_ROOT/src"
+-export SAGE_DOC="$SAGE_SRC/doc"
+-export PATH="$SAGE_SRC/bin:$SAGE_LOCAL/bin:$PATH"
++export SAGE_SRC="$SAGE_SHARE/sage/src"
++export SAGE_DOC="$SAGE_SHARE/doc/sage"
+ 
+ # We offer a toolchain option, so if $SAGE_LOCAL/toolchain/toolchain-env exists source it.
+ # Since the user might do something crazy we do not do any checks, but hope for the best.
+@@ -304,9 +266,6 @@
+ 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
+-
+ if [ "$SAGE_SERVER" = "" ]; then
+     SAGE_SERVER="http://www.sagemath.org/"
+     export SAGE_SERVER
+@@ -358,25 +317,17 @@
+     export SAGE_STARTUP_FILE
+ fi
+ 
+-IPYTHONDIR=`find "$SAGE_SPKG_INST" -name "ipython*"`
+-if [ -n "$IPYTHONDIR" ]; then
+-    export IPYTHONDIR="$DOT_SAGE/${IPYTHONDIR##*/}"
+-fi
++export IPYTHONDIR="$DOT_SAGE/ipython"
+ 
+ if [ "$PYTHON_EGG_CACHE" = "" ]; then
+     PYTHON_EGG_CACHE="$DOT_SAGE/.python-eggs"
+     export PYTHON_EGG_CACHE
+ fi
+ 
+-if [ -d "$SAGE_ROOT/local/lib/python" ]; then
+-    PYTHONPATH="$SAGE_ROOT/local/lib/python"
+-    if [ -n "$SAGE_PATH" ]; then
+-        PYTHONPATH="$SAGE_PATH:$PYTHONPATH"
+-    fi
+-    PYTHONHOME="$SAGE_ROOT/local"
+-    export PYTHONPATH
+-    export PYTHONHOME
+-fi
++PYTHONPATH="/usr/lib/sage/site-packages:$PYTHONPATH"
++PYTHONHOME="$SAGE_ROOT"
++export PYTHONPATH
++export PYTHONHOME
+ 
+ if [ -z "${SAGE_ORIG_LD_LIBRARY_PATH_SET}" ]; then
+     SAGE_ORIG_LD_LIBRARY_PATH=$LD_LIBRARY_PATH && export SAGE_ORIG_LD_LIBRARY_PATH
+@@ -424,8 +375,6 @@
+ unset R_HOME
+ unset R_PROFILE
+ 
+-MAXIMA_PREFIX="$SAGE_ROOT/local" && export MAXIMA_PREFIX
+-
+ ############ architecture flags
+ 
+ # Support flags to change the build architecture.  Currently, this is
+@@ -588,9 +537,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
+-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

Added: extensions.patch
===================================================================
--- extensions.patch	                        (rev 0)
+++ extensions.patch	2014-12-21 12:50:29 UTC (rev 124298)
@@ -0,0 +1,13 @@
+diff -up src/module_list.py.orig src/module_list.py
+--- src/module_list.py.orig	2014-05-26 13:34:05.597783829 -0300
++++ src/module_list.py	2014-05-26 13:34:15.908784224 -0300
+@@ -2070,7 +2070,8 @@ ext_modules = [
+ # These extensions are to be compiled only if the
+ # corresponding packages have been installed
+ 
+-from sage.misc.package import is_package_installed
++def is_package_installed(name):
++    return False
+ 
+ if is_package_installed('fes'):
+     ext_modules.extend([
\ No newline at end of file

Added: paths.patch
===================================================================
--- paths.patch	                        (rev 0)
+++ paths.patch	2014-12-21 12:50:29 UTC (rev 124298)
@@ -0,0 +1,32 @@
+--- src/sage/env.py.orig	2014-06-25 10:47:25.827203554 +1200
++++ src/sage/env.py	2014-06-25 10:49:07.667402821 +1200
+@@ -86,21 +86,18 @@
+ _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_LOCAL',      opj('$SAGE_ROOT', 'local'))
+-_add_variable_or_fallback('SAGE_ETC',        opj('$SAGE_LOCAL', 'etc'))
+-_add_variable_or_fallback('SAGE_SHARE',      opj('$SAGE_LOCAL', 'share'))
++_add_variable_or_fallback('SAGE_ROOT',       opj('/usr'))
++_add_variable_or_fallback('SAGE_LOCAL',      opj('/usr'))
++_add_variable_or_fallback('SAGE_ETC',        opj('/etc'))
++_add_variable_or_fallback('SAGE_SHARE',      opj('$SAGE_LOCAL', 'share', 'sage'))
+ 
+ _add_variable_or_fallback('SAGE_SRC',        opj('$SAGE_ROOT', 'src'))
+-_add_variable_or_fallback('SITE_PACKAGES',   site.getsitepackages())
++_add_variable_or_fallback('SITE_PACKAGES',   ['/usr/lib/sage/site-packages']+site.getsitepackages())
+ _add_variable_or_fallback('SAGE_LIB',        SITE_PACKAGES[0])
+ 
+-_add_variable_or_fallback('SAGE_EXTCODE',    opj('$SAGE_SHARE', 'sage', 'ext'))
+-_add_variable_or_fallback('SAGE_LOGS',       opj('$SAGE_ROOT', 'logs', 'pkgs'))
+-_add_variable_or_fallback('SAGE_SPKG_INST',  opj('$SAGE_LOCAL', 'var', 'lib', 'sage', 'installed'))
+-_add_variable_or_fallback('SAGE_DOC',        opj('$SAGE_SRC', 'doc'))
+-_add_variable_or_fallback('DOT_SAGE',        opj(os.environ.get('HOME','$SAGE_ROOT'), '.sage'))
+-_add_variable_or_fallback('SAGE_DOT_GIT',    opj('$SAGE_ROOT', '.git'))
++_add_variable_or_fallback('SAGE_EXTCODE',    opj('$SAGE_SHARE', 'ext'))
++_add_variable_or_fallback('SAGE_DOC',        opj('/usr/share/doc/sage'))
++_add_variable_or_fallback('DOT_SAGE',        opj(os.environ.get('HOME'), '.sage'))
+ 
+ # misc
+ _add_variable_or_fallback('SAGE_URL',                'http://sage.math.washington.edu/sage/')

Added: pexpect-env.patch
===================================================================
--- pexpect-env.patch	                        (rev 0)
+++ pexpect-env.patch	2014-12-21 12:50:29 UTC (rev 124298)
@@ -0,0 +1,32 @@
+diff -ru src.p4/pexpect.py src.new/pexpect.py
+--- src.p4/pexpect.py	2009-01-23 11:01:57.000000000 +0100
++++ src.new/pexpect.py	2012-01-12 13:38:06.000000000 +0100
+@@ -209,7 +209,7 @@
+     Use this class to start and control child applications.
+     """
+ 
+-    def __init__(self, command, args=[], timeout=30, maxread=2000, searchwindowsize=None, logfile=None):
++    def __init__(self, command, args=[], timeout=30, maxread=2000, searchwindowsize=None, logfile=None, env=None):
+         """This is the constructor. The command parameter may be a string
+         that includes a command and any arguments to the command. For example:
+             p = pexpect.spawn ('/usr/bin/ftp')
+@@ -302,6 +302,7 @@
+         self.child_fd = -1 # initially closed
+         self.timeout = timeout
+         self.delimiter = EOF
++        self.env = env    
+         self.logfile = logfile    
+         self.maxread = maxread # Max bytes to read at one time into buffer.
+         self.buffer = '' # This is the read buffer. See maxread.
+@@ -421,7 +422,10 @@
+             # (specifically, Tomcat).
+             signal.signal(signal.SIGHUP, signal.SIG_IGN)
+ 
+-            os.execv(self.command, self.args)
++            if self.env is None:
++                os.execv(self.command, self.args)
++            else:
++                os.execve(self.command, self.args, self.env)
+ 
+         # Parent
+         self.terminated = 0

Added: skip-check.patch
===================================================================
--- skip-check.patch	                        (rev 0)
+++ skip-check.patch	2014-12-21 12:50:29 UTC (rev 124298)
@@ -0,0 +1,21 @@
+--- src/bin/sage.orig	2014-12-18 09:47:27.354829070 +0100
++++ src/bin/sage	2014-12-18 09:48:00.041563401 +0100
+@@ -286,18 +286,6 @@
+ 
+ # Prepare for running Sage, either interactively or non-interactively.
+ sage_setup() {
+-    # Check that we're not in a source tarball which hasn't been built yet (#13561).
+-    if [ ! -d "$SAGE_LOCAL/lib/python/site-packages/sage" ]; then
+-        echo >&2 '************************************************************************'
+-        echo >&2 'It seems that you are attempting to run Sage from an unpacked source'
+-        echo >&2 'tarball, but you have not compiled it yet (or maybe the build has not'
+-        echo >&2 'finished). You should run `make` in the Sage root directory first.'
+-        echo >&2 'If you did not intend to build Sage from source, you should download'
+-        echo >&2 'a binary tarball instead. Read README.txt for more information.'
+-        echo >&2 '************************************************************************'
+-        exit 1
+-    fi
+-
+     # Display the startup banner
+     if [ "$SAGE_BANNER" != "no" ]; then
+         cat "$SAGE_LOCAL/bin/sage-banner"



More information about the arch-commits mailing list