File: u2-fix-sympow-cachedir.patch

package info (click to toggle)
sagemath 9.2-2
  • links: PTS, VCS
  • area: main
  • in suites: bullseye
  • size: 126,716 kB
  • sloc: python: 1,070,573; cpp: 5,380; ansic: 4,064; sh: 3,976; objc: 1,407; makefile: 1,089; javascript: 292; lisp: 5
file content (25 lines) | stat: -rw-r--r-- 821 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
 from sage.misc.verbose import verbose
@@ -78,7 +79,7 @@
         """
         Used to call sympow with given args
         """
-        cmd = 'sympow %s' % args
+        cmd = 'SYMPOW_CACHEDIR="%s/sympow///" sympow %s' % (DOT_SAGE, args)
         with os.popen(cmd) as f:
             v = f.read().strip()
         verbose(v, level=2)