diff --git a/build/pkgs/giac/spkg-configure.m4 b/build/pkgs/giac/spkg-configure.m4 index 53e3a8301cd..0c22692a1a1 100644 --- a/build/pkgs/giac/spkg-configure.m4 +++ b/build/pkgs/giac/spkg-configure.m4 @@ -22,6 +22,7 @@ SAGE_SPKG_CONFIGURE([giac], [ AC_SEARCH_LIBS([ConvertUTF16toUTF8], [giac], [ ], [sage_spkg_install_giac=yes]) ], [sage_spkg_install_giac=yes]) + AC_SUBST(SAGE_ENABLE_giac) m4_popdef([GIAC_MIN_VERSION]) m4_popdef([GIAC_MAX_VERSION]) ]) diff --git a/pkgs/sage-conf/_sage_conf/_conf.py.in b/pkgs/sage-conf/_sage_conf/_conf.py.in index 54a59fdbacf..c14dc14c197 100644 --- a/pkgs/sage-conf/_sage_conf/_conf.py.in +++ b/pkgs/sage-conf/_sage_conf/_conf.py.in @@ -34,6 +34,8 @@ SAGE_NAUTY_BINS_PREFIX = "@SAGE_NAUTY_BINS_PREFIX@" SAGE_ECMBIN = "@SAGE_ECMBIN@" +SAGE_GIAC_ENABLED = "@SAGE_ENABLE_giac@" + # Names or paths of the 4ti2 executables FOURTITWO_HILBERT = "@FOURTITWO_HILBERT@" FOURTITWO_MARKOV = "@FOURTITWO_MARKOV@" diff --git a/src/sage/env.py b/src/sage/env.py index 3548c65f43e..59af97782e2 100644 --- a/src/sage/env.py +++ b/src/sage/env.py @@ -224,6 +224,7 @@ def var(key: str, *fallbacks: Optional[str], force: bool = False) -> Optional[st KENZO_FAS = var("KENZO_FAS") SAGE_NAUTY_BINS_PREFIX = var("SAGE_NAUTY_BINS_PREFIX", "") SAGE_ECMBIN = var("SAGE_ECMBIN", "ecm") +SAGE_GIAC_ENABLED=var("SAGE_GIAC_ENABLED", "yes") RUBIKS_BINS_PREFIX = var("RUBIKS_BINS_PREFIX", "") FOURTITWO_HILBERT = var("FOURTITWO_HILBERT") FOURTITWO_MARKOV = var("FOURTITWO_MARKOV") diff --git a/src/sage/features/giac.py b/src/sage/features/giac.py index 5a7833c1d20..57e120a57c5 100644 --- a/src/sage/features/giac.py +++ b/src/sage/features/giac.py @@ -4,6 +4,7 @@ """ from . import Executable, FeatureTestResult +from sage.env import SAGE_GIAC_ENABLED class Giac(Executable): r""" @@ -23,7 +24,11 @@ def __init__(self): sage: isinstance(Giac(), Giac) True """ - Executable.__init__(self, 'giac', executable='giac', + if SAGE_GIAC_ENABLED == "no": + giac_exe = 'fofobar42barfoo' + else: + giac_exe = 'giac' + Executable.__init__(self, 'giac', executable=giac_exe, spkg='giac', type='optional') def all_features():