From 161569159089bde2516bebd5f99b3b25c562ad6b Mon Sep 17 00:00:00 2001 From: Michael Orlitzky Date: Fri, 2 Apr 2021 15:13:10 -0400 Subject: [PATCH] Trac #29617: treat empty MAXIMA_FAS and KENZO_FAS as None. When these variables are defined to be the empty string, we now assume that ECL knows where to find the corresponding files. --- src/sage/features/kenzo.py | 2 +- src/sage/interfaces/kenzo.py | 2 +- src/sage/interfaces/maxima_lib.py | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/sage/features/kenzo.py b/src/sage/features/kenzo.py index ba36288eadd..b6c068eac83 100644 --- a/src/sage/features/kenzo.py +++ b/src/sage/features/kenzo.py @@ -47,7 +47,7 @@ def _is_present(self): try: from sage.env import KENZO_FAS - if KENZO_FAS is not None: + if KENZO_FAS: ecl_eval("(require :kenzo \"{}\")".format(KENZO_FAS)) else: ecl_eval("(require :kenzo)") diff --git a/src/sage/interfaces/kenzo.py b/src/sage/interfaces/kenzo.py index b0a8874132c..e6a09930a65 100644 --- a/src/sage/interfaces/kenzo.py +++ b/src/sage/interfaces/kenzo.py @@ -107,7 +107,7 @@ # are replaced with underscores to get valid Python identifiers. if Kenzo().is_present(): from sage.env import KENZO_FAS - if KENZO_FAS is not None: + if KENZO_FAS: ecl_eval("(require :kenzo \"{}\")".format(KENZO_FAS)) else: ecl_eval("(require :kenzo)") diff --git a/src/sage/interfaces/maxima_lib.py b/src/sage/interfaces/maxima_lib.py index 40367c52426..058003470d9 100644 --- a/src/sage/interfaces/maxima_lib.py +++ b/src/sage/interfaces/maxima_lib.py @@ -99,7 +99,7 @@ ## We begin here by initializing Maxima in library mode ## i.e. loading it into ECL ecl_eval("(setf *load-verbose* NIL)") -if MAXIMA_FAS is not None: +if MAXIMA_FAS: ecl_eval("(require 'maxima \"{}\")".format(MAXIMA_FAS)) else: ecl_eval("(require 'maxima)")