sage: move sympow cache to .sage

This commit is contained in:
Timo Kaufmann 2019-08-09 15:03:40 +02:00
parent 5e58c5f900
commit 9ef44b3431
2 changed files with 26 additions and 0 deletions

View File

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

View File

@ -100,6 +100,11 @@ stdenv.mkDerivation rec {
rev = "c11d9cfa23ff9f77681a8f12742f68143eed4504";
sha256 = "0xzra7mbgqvahk9v45bjwir2mqz73hrhhy314jq5nxrb35ysdxyi";
})
# After updating smypow to (https://trac.sagemath.org/ticket/3360) we can
# now set the cache dir to be withing the .sage directory. This is not
# strictly necessary, but keeps us from littering in the user's HOME.
./patches/sympow-cache.patch
];
patches = nixPatches ++ bugfixPatches ++ packageUpgradePatches;