diff options
Diffstat (limited to 'nixpkgs/pkgs/applications/science/math/sage/patches/sympow-cache.patch')
-rw-r--r-- | nixpkgs/pkgs/applications/science/math/sage/patches/sympow-cache.patch | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/nixpkgs/pkgs/applications/science/math/sage/patches/sympow-cache.patch b/nixpkgs/pkgs/applications/science/math/sage/patches/sympow-cache.patch index 20020d610f80..d71f3acbc706 100644 --- a/nixpkgs/pkgs/applications/science/math/sage/patches/sympow-cache.patch +++ b/nixpkgs/pkgs/applications/science/math/sage/patches/sympow-cache.patch @@ -1,5 +1,5 @@ diff --git a/src/sage/lfunctions/sympow.py b/src/sage/lfunctions/sympow.py -index 1640ac4f6a..03578be7b8 100644 +index 92cb01fd73..b123e6accc 100644 --- a/src/sage/lfunctions/sympow.py +++ b/src/sage/lfunctions/sympow.py @@ -50,6 +50,7 @@ from __future__ import print_function, absolute_import @@ -8,14 +8,14 @@ index 1640ac4f6a..03578be7b8 100644 +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): + from sage.misc.all import pager + from sage.misc.verbose import verbose +@@ -78,7 +79,7 @@ class Sympow(SageObject): """ Used to call sympow with given args """ -- cmd = 'sympow %s'%args +- cmd = 'sympow %s' % args + cmd = 'env SYMPOW_CACHEDIR="%s/sympow///" sympow %s' % (DOT_SAGE, args) - v = os.popen(cmd).read().strip() + with os.popen(cmd) as f: + v = f.read().strip() verbose(v, level=2) - return v |