Remove autogen_config

Jeremy Tuloup 4 years ago
parent b1706303e7
commit 85ddb6f5f9

@ -53,15 +53,11 @@ clean:
rm -rf $(BUILDDIR)/*
rm -rf source/config.rst
html: source/config.rst
html:
$(SPHINXBUILD) -b html $(ALLSPHINXOPTS) $(BUILDDIR)/html
@echo
@echo "Build finished. The HTML pages are in $(BUILDDIR)/html."
source/config.rst:
python3 autogen_config.py
@echo "Created docs for config options"
dirhtml:
$(SPHINXBUILD) -b dirhtml $(ALLSPHINXOPTS) $(BUILDDIR)/dirhtml
@echo
@ -176,7 +172,7 @@ linkcheck:
@echo
@echo "Link check complete; look for any errors in the above output " \
"or in $(BUILDDIR)/linkcheck/output.txt."
spelling:
$(SPHINXBUILD) -b spelling $(ALLSPHINXOPTS) $(BUILDDIR)/spelling
@echo "Spell check complete; look for any errors in the above output " \

@ -1,45 +0,0 @@
#!/usr/bin/env python
import os
from notebook.notebookapp import NotebookApp
header = """\
.. _config:
Config file and command line options
====================================
The notebook server can be run with a variety of command line arguments.
A list of available options can be found below in the :ref:`options section
<options>`.
Defaults for these options can also be set by creating a file named
``jupyter_notebook_config.py`` in your Jupyter folder. The Jupyter
folder is in your home directory, ``~/.jupyter``.
To create a ``jupyter_notebook_config.py`` file, with all the defaults
commented out, you can use the following command line::
$ jupyter notebook --generate-config
.. _options:
Options
-------
This list of options can be generated by running the following and hitting
enter::
$ jupyter notebook --help
"""
try:
destination = os.path.join(os.path.dirname(__file__), 'source/config.rst')
except:
destination = os.path.join(os.getcwd(), 'config.rst')
with open(destination, 'w') as f:
f.write(header)
f.write(NotebookApp().document_config_options())

@ -46,16 +46,6 @@ print("===============================")
for item in sys.path:
print(item)
# Check if docs are being built by ReadTheDocs
# If so, generate a config.rst file and populate it with documentation about
# configuration options
if os.environ.get('READTHEDOCS', ''):
# Readthedocs doesn't run our Makefile, so we do this to force it to generate
# the config docs.
with open('../autogen_config.py') as f:
exec(compile(f.read(), '../autogen_config.py', 'exec'), {})
# -- General configuration ------------------------------------------------
# If your documentation needs a minimal Sphinx version, state it here.

Loading…
Cancel
Save