diff options
Diffstat (limited to 'sci-mathematics/sage/files/sage-4.5.1-fix-SAGE_LOCAL.patch')
-rw-r--r-- | sci-mathematics/sage/files/sage-4.5.1-fix-SAGE_LOCAL.patch | 166 |
1 files changed, 166 insertions, 0 deletions
diff --git a/sci-mathematics/sage/files/sage-4.5.1-fix-SAGE_LOCAL.patch b/sci-mathematics/sage/files/sage-4.5.1-fix-SAGE_LOCAL.patch new file mode 100644 index 0000000..8e55061 --- /dev/null +++ b/sci-mathematics/sage/files/sage-4.5.1-fix-SAGE_LOCAL.patch @@ -0,0 +1,166 @@ +--- sage/misc/cython.py.orig 2010-06-28 16:37:01.000000000 +0000 ++++ sage/misc/cython.py 2010-07-31 15:47:39.704490103 +0000 +@@ -16,7 +16,7 @@ + + import os, sys + +-from misc import SPYX_TMP, SAGE_ROOT ++from misc import SPYX_TMP, SAGE_LOCAL, SAGE_ROOT + from sage.misc.misc import UNAME + + def cblas(): +@@ -43,10 +43,10 @@ + else: + return 'atlas' + +-include_dirs = ['%s/local/include/csage/'%SAGE_ROOT, +- '%s/local/include/'%SAGE_ROOT, \ +- '%s/local/include/python%s/'%(SAGE_ROOT, sys.version[:3]), \ +- '%s/local/lib/python%s/site-packages/numpy/core/include'%(SAGE_ROOT, sys.version[:3]), \ ++include_dirs = ['%s/include/csage/'%SAGE_LOCAL, ++ '%s/include/'%SAGE_LOCAL, \ ++ '%s/include/python%s/'%(SAGE_LOCAL, sys.version[:3]), \ ++ '%s/lib/python%s/site-packages/numpy/core/include'%(SAGE_LOCAL, sys.version[:3]), \ + '%s/devel/sage/sage/ext/'%SAGE_ROOT, \ + '%s/devel/sage/'%SAGE_ROOT, \ + '%s/devel/sage/sage/gsl/'%SAGE_ROOT] +@@ -160,9 +160,9 @@ + ..., + 'ntl', + 'csage'], +- ['.../local/include/csage/', +- '.../local/include/', +- '.../local/include/python2.6/', ++ ['.../include/csage/', ++ '.../include/', ++ '.../include/python2.6/', + '.../devel/sage/sage/ext/', + '.../devel/sage/', + '.../devel/sage/sage/gsl/'], +@@ -187,9 +187,9 @@ + + sage: inc + ['bar', +- '.../local/include/csage/', +- '.../local/include/', +- '.../local/include/python2.6/', ++ '.../include/csage/', ++ '.../include/', ++ '.../include/python2.6/', + '.../devel/sage/sage/ext/', + '.../devel/sage/', + '.../devel/sage/sage/gsl/'] +@@ -323,7 +323,7 @@ + sys.exit(1) + else: + SAGE_ROOT = os.environ['SAGE_ROOT'] +- SAGE_LOCAL = SAGE_ROOT + '/local/' ++ SAGE_LOCAL = os.environ['SAGE_LOCAL'] + + extra_link_args = ['-L' + SAGE_LOCAL + '/lib'] + extra_compile_args = ['-w','-O2'] +--- sage/misc/misc.py.orig 2010-07-12 08:12:30.000000000 +0000 ++++ sage/misc/misc.py 2010-07-31 15:12:14.163485912 +0000 +@@ -40,7 +40,7 @@ + from banner import version, banner + + SAGE_ROOT = os.environ["SAGE_ROOT"] +-SAGE_LOCAL = SAGE_ROOT + '/local/' ++SAGE_LOCAL = os.environ["SAGE_LOCAL"] + SAGE_DOC = os.environ["SAGE_DOC"] + HOSTNAME = socket.gethostname().replace('-','_').replace('/','_').replace('\\','_') + +@@ -123,7 +123,7 @@ + + + def delete_tmpfiles(): +- # !!!If you change this, see also SAGE_ROOT/local/bin/sage-doctest!!! ++ # !!!If you change this, see also SAGE_LOCAL/bin/sage-doctest!!! + import shutil + try: + if os.path.exists(SAGE_TMP): +@@ -1883,7 +1883,7 @@ + r""" + Return a string describing the current branch and that the library + is being loaded. This is called by the +- ``SAGE_ROOT/local/bin/sage-sage`` script. ++ ``SAGE_LOCAL/bin/sage-sage`` script. + + INPUT: + +--- sage/interfaces/maxima.py.orig 2010-07-31 14:57:21.214485610 +0000 ++++ sage/interfaces/maxima.py 2010-07-31 14:58:04.565485703 +0000 +@@ -461,7 +461,7 @@ + ##import sage.rings.all + import sage.rings.complex_number + +-from sage.misc.misc import verbose, DOT_SAGE, SAGE_ROOT ++from sage.misc.misc import verbose, DOT_SAGE, SAGE_LOCAL + + from sage.misc.multireplace import multiple_replace + +@@ -497,7 +497,7 @@ + # setting inchar and outchar.. + eval_using_file_cutoff = 256 + self.__eval_using_file_cutoff = eval_using_file_cutoff +- STARTUP = '%s/local/bin/sage-maxima.lisp'%SAGE_ROOT ++ STARTUP = '%s/bin/sage-maxima.lisp'%SAGE_LOCAL + + # We set maxima's configuration directory to $DOT_SAGE/maxima + # This avoids that sage's maxima inadvertently loads +--- sage/server/trac/trac.py.orig 2010-06-28 16:37:01.000000000 +0000 ++++ sage/server/trac/trac.py 2010-07-31 15:02:28.897486472 +0000 +@@ -120,7 +120,7 @@ + print " cd %s" % os.path.abspath(os.path.join(directory, 'conf')) + print " htdigest passwd %s <username>" % address + print "\nTo grant full admin permissions to a user:" +- print " %s %s permission add <username> TRAC_ADMIN" % (os.path.join(SAGE_ROOT, 'local/bin/trac-admin'), os.path.abspath(directory)) ++ print " %s %s permission add <username> TRAC_ADMIN" % (os.path.join(SAGE_LOCAL, 'bin/trac-admin'), os.path.abspath(directory)) + print "\nThen restart the trac server." + print "*" * 80 + open(passwd,'w').close() +--- sage/quadratic_forms/quadratic_form__automorphisms.py.orig 2010-07-31 15:07:42.812485694 +0000 ++++ sage/quadratic_forms/quadratic_form__automorphisms.py 2010-07-31 15:07:51.953487938 +0000 +@@ -8,7 +8,7 @@ + from sage.modules.free_module_element import vector + from sage.rings.arith import GCD + from sage.misc.sage_eval import sage_eval +-from sage.misc.misc import SAGE_ROOT ++from sage.misc.misc import SAGE_LOCAL + + import tempfile, os + from random import random +@@ -431,7 +431,7 @@ + #os.system("less " + F.name) + + ## Call the Souvigner automorphism code +- souvigner_auto_path = SAGE_ROOT + "/local/bin/Souvigner_AUTO" ## FIX THIS LATER!!! ++ souvigner_auto_path = SAGE_LOCAL + "/bin/Souvigner_AUTO" ## FIX THIS LATER!!! + G1 = tempfile.NamedTemporaryFile(prefix='tmp_auto_ouput', suffix=".txt") + #print "Output filename = ", G1.name + os.system(souvigner_auto_path + " '" + F.name + "' > '" + G1.name +"'") +--- sage/quadratic_forms/quadratic_form__equivalence_testing.py.orig 2010-07-31 15:06:50.524485472 +0000 ++++ sage/quadratic_forms/quadratic_form__equivalence_testing.py 2010-07-31 15:07:18.341485703 +0000 +@@ -1,3 +1,4 @@ ++ + from sage.matrix.constructor import Matrix + from sage.misc.mrange import mrange + from sage.rings.arith import hilbert_symbol, prime_divisors, is_prime, valuation, GCD, legendre_symbol +@@ -7,7 +8,7 @@ + from quadratic_form__genus import CS_genus_symbol_list + + +-from sage.misc.misc import SAGE_ROOT ++from sage.misc.misc import SAGE_LOCAL + + import tempfile, os + +@@ -65,7 +66,7 @@ + #os.system("less " + F.name) + + ## Call the Souvigner automorphism code +- souvigner_isom_path = SAGE_ROOT + "/local/bin/Souvigner_ISOM" ++ souvigner_isom_path = SAGE_LOCAL + "/bin/Souvigner_ISOM" + G1 = tempfile.NamedTemporaryFile(prefix='tmp_isom_ouput', suffix=".txt") + #print "Output filename = ", G1.name + #print "Executing the shell command: " + souvigner_isom_path + " '" + F.name + "' > '" + G1.name + "'" |