mirror of
https://github.com/simonw/datasette.git
synced 2025-12-10 16:51:24 +01:00
pip install -e .[docs] for docs dependencies
This commit is contained in:
parent
8b11788231
commit
a7befda136
2 changed files with 7 additions and 12 deletions
|
|
@ -91,7 +91,7 @@ You can build it locally by installing ``sphinx`` and ``sphinx_rtd_theme`` in yo
|
||||||
source venv/bin/activate
|
source venv/bin/activate
|
||||||
|
|
||||||
# Install the dependencies needed to build the docs
|
# Install the dependencies needed to build the docs
|
||||||
pip install sphinx sphinx_rtd_theme
|
pip install -e .[docs]
|
||||||
|
|
||||||
# Now build the docs
|
# Now build the docs
|
||||||
cd docs/
|
cd docs/
|
||||||
|
|
@ -103,16 +103,14 @@ This will create the HTML version of the documentation in ``docs/_build/html``.
|
||||||
|
|
||||||
Any time you make changes to a ``.rst`` file you can re-run ``make html`` to update the built documents, then refresh them in your browser.
|
Any time you make changes to a ``.rst`` file you can re-run ``make html`` to update the built documents, then refresh them in your browser.
|
||||||
|
|
||||||
For added productivity, you can run Sphinx in auto-build mode. This will run a local webserver serving the docs that automatically rebuilds them and refreshes the page any time you hit save in your editor.
|
For added productivity, you can use use `sphinx-autobuild <https://pypi.org/project/sphinx-autobuild/>`__ to run Sphinx in auto-build mode. This will run a local webserver serving the docs that automatically rebuilds them and refreshes the page any time you hit save in your editor.
|
||||||
|
|
||||||
To enable auto-build mode, first install `sphinx-autobuild <https://pypi.org/project/sphinx-autobuild/>`__::
|
``sphinx-autobuild`` will have been installed when you ran ``pip install -e .[docs]``. In your ``docs/`` directory you can start the server by running the following::
|
||||||
|
|
||||||
pip install sphinx-autobuild
|
|
||||||
|
|
||||||
Now start the server by running::
|
|
||||||
|
|
||||||
make livehtml
|
make livehtml
|
||||||
|
|
||||||
|
Now browse to ``http://localhost:8000/`` to view the documentation. Any edits you make should be instantly relected in your browser.
|
||||||
|
|
||||||
.. _contributing_release:
|
.. _contributing_release:
|
||||||
|
|
||||||
Release process
|
Release process
|
||||||
|
|
|
||||||
7
setup.py
7
setup.py
|
|
@ -56,10 +56,7 @@ setup(
|
||||||
""",
|
""",
|
||||||
setup_requires=["pytest-runner"],
|
setup_requires=["pytest-runner"],
|
||||||
extras_require={
|
extras_require={
|
||||||
"docs": [
|
"docs": ["sphinx_rtd_theme", "sphinx-autobuild"],
|
||||||
"sphinx_rtd_theme",
|
|
||||||
"sphinx-autobuild",
|
|
||||||
],
|
|
||||||
"test": [
|
"test": [
|
||||||
"pytest==4.6.1",
|
"pytest==4.6.1",
|
||||||
"pytest-asyncio==0.10.0",
|
"pytest-asyncio==0.10.0",
|
||||||
|
|
@ -67,7 +64,7 @@ setup(
|
||||||
"beautifulsoup4==4.6.1",
|
"beautifulsoup4==4.6.1",
|
||||||
"asgiref==3.1.2",
|
"asgiref==3.1.2",
|
||||||
]
|
]
|
||||||
+ maybe_black
|
+ maybe_black,
|
||||||
},
|
},
|
||||||
tests_require=["datasette[test]"],
|
tests_require=["datasette[test]"],
|
||||||
classifiers=[
|
classifiers=[
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue