about summary refs log tree commit diff
path: root/pkgs/applications/science/math/sage/patches/sympow-cache.patch
diff options
context:
space:
mode:
Diffstat (limited to 'pkgs/applications/science/math/sage/patches/sympow-cache.patch')
-rw-r--r--pkgs/applications/science/math/sage/patches/sympow-cache.patch21
1 files changed, 21 insertions, 0 deletions
diff --git a/pkgs/applications/science/math/sage/patches/sympow-cache.patch b/pkgs/applications/science/math/sage/patches/sympow-cache.patch
new file mode 100644
index 000000000000..20020d610f80
--- /dev/null
+++ b/pkgs/applications/science/math/sage/patches/sympow-cache.patch
@@ -0,0 +1,21 @@
+diff --git a/src/sage/lfunctions/sympow.py b/src/sage/lfunctions/sympow.py
+index 1640ac4f6a..03578be7b8 100644
+--- a/src/sage/lfunctions/sympow.py
++++ b/src/sage/lfunctions/sympow.py
+@@ -50,6 +50,7 @@ from __future__ import print_function, absolute_import
+ 
+ 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 @@ class Sympow(SageObject):
+         """
+         Used to call sympow with given args
+         """
+-        cmd = 'sympow %s'%args
++        cmd = 'env SYMPOW_CACHEDIR="%s/sympow///" sympow %s' % (DOT_SAGE, args)
+         v = os.popen(cmd).read().strip()
+         verbose(v, level=2)
+         return v