[sagemath] 02/02: Patch distribution paths for databases, gap and singular into env.py.

Tobias Hansen thansen at moszumanska.debian.org
Sat Jan 21 22:00:56 UTC 2017


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

thansen pushed a commit to branch experimental
in repository sagemath.

commit 015518c6f07653c9ed695db4b3af31010f101d82
Author: Tobias Hansen <thansen at debian.org>
Date:   Sat Jan 21 21:59:53 2017 +0000

    Patch distribution paths for databases, gap and singular into env.py.
---
 debian/changelog                 |  1 +
 debian/patches/d1-sage-env.patch | 40 ++++++++++++++++++++++++++++++++++++++--
 2 files changed, 39 insertions(+), 2 deletions(-)

diff --git a/debian/changelog b/debian/changelog
index 18f5399..ea52c90 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -20,6 +20,7 @@ sagemath (7.5.1-1) UNRELEASED; urgency=medium
     - d0-paths.patch
     - d0-singular.patch
     - d1-install-paths.patch
+    - d1-sage-env.patch (also patch env.py from here)
     - dt-disable-parallel-sphinx.patch
     - dt-more-fix-test-cases.patch (parts were applied upstream)
 
diff --git a/debian/patches/d1-sage-env.patch b/debian/patches/d1-sage-env.patch
index 89dbcdd..66b66ad 100644
--- a/debian/patches/d1-sage-env.patch
+++ b/debian/patches/d1-sage-env.patch
@@ -1,5 +1,5 @@
-Description: Patch sage-env
- Note that this file is only used during the package build and not installed.
+Description: Patch sage-env and env.py
+ Note that the patched sage-env is only used during the package build and not installed.
  Instead the file debian/adhoc/sage-env is installed.
  .
  The LD_LIBRARY_PATH can probably be forwarded upstream, either way is fine.
@@ -222,3 +222,39 @@ Author: Tobias Hansen <thansen at debian.org>, Ximin Luo <infinity0 at debian.org>
              sage_directory = os.path.join(path, document, 'sage')
  
              # Walk through all of the files in the sage_directory
+--- a/sage/src/sage/env.py
++++ b/sage/src/sage/env.py
+@@ -20,6 +20,7 @@
+ import os
+ import socket
+ import site
++import sysconfig
+ from . import version
+ 
+ opj = os.path.join
+@@ -134,11 +135,11 @@
+ _add_variable_or_fallback('SAGE_IMPORTALL',          'yes')
+ 
+ # additional packages locations
+-_add_variable_or_fallback('CONWAY_POLYNOMIALS_DATA_DIR',  opj('$SAGE_SHARE','conway_polynomials'))
+-_add_variable_or_fallback('GRAPHS_DATA_DIR',  opj('$SAGE_SHARE','graphs'))
+-_add_variable_or_fallback('ELLCURVE_DATA_DIR',opj('$SAGE_SHARE','ellcurves'))
+-_add_variable_or_fallback('POLYTOPE_DATA_DIR',opj('$SAGE_SHARE','reflexive_polytopes'))
+-_add_variable_or_fallback('GAP_ROOT_DIR',     opj('$SAGE_LOCAL','gap','latest'))
++_add_variable_or_fallback('CONWAY_POLYNOMIALS_DATA_DIR', '/usr/share/sagemath/conway_polynomials')
++_add_variable_or_fallback('GRAPHS_DATA_DIR',             '/usr/share/sagemath/graphs')
++_add_variable_or_fallback('ELLCURVE_DATA_DIR',           '/usr/share/sagemath/ellcurves'))
++_add_variable_or_fallback('POLYTOPE_DATA_DIR',           '/usr/share/sagemath/reflexive_polytopes')
++_add_variable_or_fallback('GAP_ROOT_DIR',                '/usr/share/gap')
+ 
+ # locate singular shared object
+ if UNAME[:6] == "CYGWIN":
+@@ -148,7 +149,7 @@
+ else:
+     extension = "so"
+ # library name changed from libsingular to libSingular btw 3.x and 4.x
+-SINGULAR_SO = SAGE_LOCAL+"/lib/libSingular."+extension
++SINGULAR_SO = "/usr/lib/%s/libsingular-Singular.so" % sysconfig.get_config_var('MULTIARCH')
+ _add_variable_or_fallback('SINGULAR_SO', SINGULAR_SO)
+ 
+ # post process

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