diff --git a/src/sage/features/info.py b/src/sage/features/info.py new file mode 100644 index 00000000000..fd3ad17e22a --- /dev/null +++ b/src/sage/features/info.py @@ -0,0 +1,31 @@ +# sage_setup: distribution = sagemath-environment +r""" +Feature for testing the presence of ``info``, from GNU Info +""" + +from . import Executable + +class Info(Executable): + r""" + A :class:`~sage.features.Feature` describing the presence of :ref:`info `. + + EXAMPLES:: + + sage: from sage.features.info import Info + sage: Info().is_present() # needs info + FeatureTestResult('info', True) + + """ + def __init__(self): + r""" + TESTS:: + + sage: from sage.features.info import Info + sage: isinstance(Info(), Info) + True + """ + Executable.__init__(self, 'info', executable='info', + spkg='info', type='standard') + +def all_features(): + return [Info()]