diff --git a/src/sage/doctest/control.py b/src/sage/doctest/control.py index 973a90a4777..853964bc29c 100644 --- a/src/sage/doctest/control.py +++ b/src/sage/doctest/control.py @@ -30,7 +30,7 @@ import types import sage.misc.flatten from sage.structure.sage_object import SageObject -from sage.env import DOT_SAGE, SAGE_LIB, SAGE_SRC, SAGE_LOCAL, SAGE_EXTCODE +from sage.env import DOT_SAGE, SAGE_LIB, SAGE_SRC, SAGE_VENV, SAGE_EXTCODE from sage.misc.temporary_file import tmp_dir from cysignals.signals import AlarmInterrupt, init_cysignals @@ -1079,7 +1079,7 @@ def run_val_gdb(self, testing=False): return 2 opt = self.options if opt.gdb: - cmd = '''exec gdb -x "%s" --args '''%(os.path.join(SAGE_LOCAL,"bin","sage-gdb-commands")) + cmd = '''exec gdb -x "%s" --args '''%(os.path.join(SAGE_VENV, "bin", "sage-gdb-commands")) flags = "" if opt.logfile: sage_cmd += " --logfile %s"%(opt.logfile) diff --git a/src/sage/misc/sage_ostools.pyx b/src/sage/misc/sage_ostools.pyx index fb4e66b4910..f4f39c875fd 100644 --- a/src/sage/misc/sage_ostools.pyx +++ b/src/sage/misc/sage_ostools.pyx @@ -32,7 +32,8 @@ def have_program(program, path=None): True sage: have_program('there_is_not_a_program_with_this_name') False - sage: have_program('sage', os.path.join(SAGE_LOCAL, 'bin')) + sage: from sage.env import SAGE_VENV + sage: have_program('sage', os.path.join(SAGE_VENV, 'bin')) True sage: have_program('sage', '/there_is_not_a_path_with_this_name') False diff --git a/src/sage/repl/ipython_kernel/install.py b/src/sage/repl/ipython_kernel/install.py index 073fae573c8..59285a710a1 100644 --- a/src/sage/repl/ipython_kernel/install.py +++ b/src/sage/repl/ipython_kernel/install.py @@ -18,7 +18,7 @@ import errno from sage.env import ( - SAGE_DOC, SAGE_LOCAL, SAGE_EXTCODE, + SAGE_DOC, SAGE_VENV, SAGE_EXTCODE, SAGE_VERSION, MATHJAX_DIR, JSMOL_DIR, THREEJS_DIR, ) @@ -188,7 +188,7 @@ def _kernel_cmd(self): '{connection_file}'] """ return [ - os.path.join(SAGE_LOCAL, 'bin', 'sage'), + os.path.join(SAGE_VENV, 'bin', 'sage'), '--python', '-m', 'sage.repl.ipython_kernel', '-f', '{connection_file}',