20 lines
894 B
Diff
20 lines
894 B
Diff
- we don't know `SAGE_VENV/bin` contains `sage`, but `sys.argv[0]` should
|
|
be the full path to `sage-ipython` and the same directory should have `sage`
|
|
|
|
--- a/src/sage/misc/sage_ostools.pyx
|
|
+++ b/src/sage/misc/sage_ostools.pyx
|
|
@@ -32,12 +32,11 @@ def have_program(program, path=None):
|
|
True
|
|
sage: have_program('there_is_not_a_program_with_this_name')
|
|
False
|
|
- sage: from sage.env import SAGE_VENV
|
|
- sage: have_program('sage', os.path.join(SAGE_VENV, 'bin'))
|
|
+ sage: have_program('sage', os.path.dirname(sys.argv[0]))
|
|
True
|
|
sage: have_program('sage', '/there_is_not_a_path_with_this_name')
|
|
False
|
|
- sage: have_program('there_is_not_a_program_with_this_name', os.path.join(SAGE_VENV, 'bin'))
|
|
+ sage: have_program('there_is_not_a_program_with_this_name', "/bin")
|
|
False
|
|
"""
|
|
if path is None:
|