[sagemath] 01/03: Have sympow store cache in DOT_SAGE, otherwise it fails on sbuild

Ximin Luo infinity0 at debian.org
Sat Dec 17 00:10:39 UTC 2016


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

infinity0 pushed a commit to branch master
in repository sagemath.

commit 4590415f8eae058212de5e247f9f35c6b23b3ccf
Author: Ximin Luo <infinity0 at debian.org>
Date:   Sat Dec 17 00:22:58 2016 +0100

    Have sympow store cache in DOT_SAGE, otherwise it fails on sbuild
---
 debian/patches/series                       |  1 +
 debian/patches/u2-fix-sympow-cachedir.patch | 26 ++++++++++++++++++++++++++
 2 files changed, 27 insertions(+)

diff --git a/debian/patches/series b/debian/patches/series
index 477e654..d55d68c 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -26,6 +26,7 @@ u1-fix-dont-require-DISPLAY.patch
 u2-allow-override-sage-local.patch
 u2-fix-trivial-test-cases.patch
 u2-fix-less-trivial-test-cases.patch
+u2-fix-sympow-cachedir.patch
 
 # Patch Sage to work with dependency Debian packages
 # These won't change even if Debian and Sage use the same version
diff --git a/debian/patches/u2-fix-sympow-cachedir.patch b/debian/patches/u2-fix-sympow-cachedir.patch
new file mode 100644
index 0000000..7c635a4
--- /dev/null
+++ b/debian/patches/u2-fix-sympow-cachedir.patch
@@ -0,0 +1,26 @@
+Description: Have sympow store cache in DOT_SAGE
+ If HOME doesn't exist then sympow fails because it can't create HOME/.sympow
+ Ideally this should be fixed in sympow, by supporting a --cache-dir flag
+Author: Ximin Luo <infinity0 at debian.org>
+Forwarded: TODO
+---
+This patch header follows DEP-3: http://dep.debian.net/deps/dep3/
+--- a/sage/src/sage/lfunctions/sympow.py
++++ b/sage/src/sage/lfunctions/sympow.py
+@@ -50,6 +50,7 @@
+ 
+ import os
+ 
++from sage.env import DOT_SAGE
+ from sage.structure.sage_object import SageObject
+ from sage.misc.all import pager, verbose
+ import sage.rings.all
+@@ -76,7 +77,7 @@
+         """
+         Used to call sympow with given args
+         """
+-        cmd = 'sympow %s'%args
++        cmd = 'env HOME="%s" sympow %s' % (DOT_SAGE, args)
+         v = os.popen(cmd).read().strip()
+         verbose(v, level=2)
+         return v

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