Skip to content

Commit

Permalink
src/sage/features/sphinx.py: Add jupyter_sphinx
Browse files Browse the repository at this point in the history
  • Loading branch information
Matthias Koeppe committed Aug 12, 2024
1 parent 0c1825e commit b8313e4
Showing 1 changed file with 29 additions and 1 deletion.
30 changes: 29 additions & 1 deletion src/sage/features/sphinx.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,5 +39,33 @@ def __init__(self):
PythonModule.__init__(self, 'sphinx', spkg='sphinx', type='standard')


class JupyterSphinx(PythonModule):
r"""
A :class:`sage.features.Feature` describing the presence of
:ref:`jupyter_sphinx <spkg_jupyter_sphinx>`.
It is provided by a standard package in the Sage distribution,
but it can be disabled by ``configure --disable-doc`` and
``configure --disable-notebook``.
EXAMPLES::
sage: from sage.features.sphinx import JupyterSphinx
sage: JupyterSphinx().is_present() # optional - jupyter_sphinx
FeatureTestResult('jupyter_sphinx', True)
"""
def __init__(self):
r"""
TESTS::
sage: from sage.features.sphinx import JupyterSphinx
sage: isinstance(JupyterSphinx(), JupyterSphinx)
True
"""
PythonModule.__init__(self, 'jupyter_sphinx',
spkg='jupyter_sphinx', type='standard')


def all_features():
return [Sphinx()]
return [Sphinx(),
JupyterSphinx()]

0 comments on commit b8313e4

Please sign in to comment.