File: u2-fix-sympow-cachedir.patch

package info (click to toggle)
sagemath 8.6-6
  • links: PTS, VCS
  • area: main
  • in suites: buster
  • size: 113,052 kB
  • sloc: python: 996,064; cpp: 6,208; sh: 3,252; ansic: 3,226; objc: 1,407; makefile: 1,087; lisp: 5
file content (25 lines) | stat: -rw-r--r-- 864 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
Description: Set SYMPOW_CACHEDIR to be inside DOT_SAGE
 Otherwise tests fail in sbuild because sympow can't create HOME/.sympow
Author: Ximin Luo <infinity0@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 = 'env -u MALLOC_PERTURB_ sympow %s' % (DOT_SAGE, args)
+        cmd = 'env -u MALLOC_PERTURB_ SYMPOW_CACHEDIR="%s/sympow///" sympow %s' % (DOT_SAGE, args)
         v = os.popen(cmd).read().strip()
         verbose(v, level=2)
         return v