From fab052a75bc1666c10602b3302b1d5c99d6020a9 Mon Sep 17 00:00:00 2001 From: heck Date: Fri, 6 Nov 2020 01:17:44 +0100 Subject: [PATCH] Fix sphinx make targets Re structure documentation, more simple for now. --- Makefile | 5 ++++- docs/source/conf.py | 3 +-- docs/source/documentation.rst | 13 ------------- docs/source/index.rst | 3 --- docs/source/install.rst | 32 ++++++++++++++++++++++++++++++++ docs/source/testing.rst | 7 ------- 6 files changed, 37 insertions(+), 26 deletions(-) delete mode 100644 docs/source/documentation.rst delete mode 100644 docs/source/testing.rst diff --git a/Makefile b/Makefile index 449b53c..a1bbb25 100644 --- a/Makefile +++ b/Makefile @@ -8,6 +8,9 @@ all: dist compile: python3 setup.py build_ext $(DEBUG_OPT) $(PREFIX_OPT) +compile-inplace: + python3 setup.py build_ext $(DEBUG_OPT) $(PREFIX_OPT) --inplace + # Packaging # ========= # create wheel and egg package in dist/ @@ -65,7 +68,7 @@ develop: compile # Documentation # ============= -docs: +docs: compile-inplace make html -C docs/ diff --git a/docs/source/conf.py b/docs/source/conf.py index 8e3ed74..d8c5892 100644 --- a/docs/source/conf.py +++ b/docs/source/conf.py @@ -11,12 +11,11 @@ # If extensions (or modules to document with autodoc) are in another directory, # add these directories to sys.path here. If the directory is relative to the # documentation root, use os.path.abspath to make it absolute, like shown here. -# + import os import sys sys.path.insert(0, os.path.abspath('../../src')) # -- Project information ----------------------------------------------------- -#from pkg_resources import get_distribution project = "pEpPythonAdapter" copyright = "2020, Volker Birk, heck, juga" diff --git a/docs/source/documentation.rst b/docs/source/documentation.rst deleted file mode 100644 index 929eae9..0000000 --- a/docs/source/documentation.rst +++ /dev/null @@ -1,13 +0,0 @@ -Building the documentation -========================= - -This documentation uses `Sphinx `_ - -It can be built in different formats. - -Run ``cd docs; make`` to see the possible formats. - -Run ``cd docs; make html`` to build the documentation in HTML format. - -You can see the generated HTML documentation in a browser opening the directory -`docs/build/html`. diff --git a/docs/source/index.rst b/docs/source/index.rst index f9b4955..8c59365 100644 --- a/docs/source/index.rst +++ b/docs/source/index.rst @@ -11,11 +11,8 @@ Welcome to pEpPythonAdapter's documentation! :caption: Contents: install - testing - documentation software_using api/pEp - Indices and tables ================== diff --git a/docs/source/install.rst b/docs/source/install.rst index f1790f5..8c4a45b 100644 --- a/docs/source/install.rst +++ b/docs/source/install.rst @@ -76,6 +76,7 @@ You can do this from a clean clone of the repo, no prior actions required, the w will be compiled and installed into the venv. ``make venv`` + ``make test`` @@ -94,6 +95,37 @@ changes to the C/C++ part of the module (_pEp). If you change just python code, If you do changes to the C/C++ part you need to issue ``make develop`` again, to recompile the extension and install the new binary (.so/.dylib) of the module into the venv. +Documentation +------------- +The documentation of the pEpPythonAdapter uses `Sphinx `_ +Refer to the `Sphinx installation instructions `_ to install it. + +To generate the documentation in the HTML format, there is a make target "docs" +But first, you need to create/activate the venv or set the LD_LIBRARY_PATH manually. + +``make venv`` + +``make docs`` + +You can see the generated HTML documentation in a browser opening the directory +`docs/build/html`. + +Housekeeping +------------ +There are the following "clean" targets. + +To delete all the generated documentation, run: + +``make docs-clean`` + +To delete all the "derived" files including eggs, wheels, shared libs, build files and caches, run: + +``make clean`` + +To delete all of make clean plus the venv (should equal a complete reset), run: +``make clean-all`` + + Docker ------ diff --git a/docs/source/testing.rst b/docs/source/testing.rst deleted file mode 100644 index ad67ca2..0000000 --- a/docs/source/testing.rst +++ /dev/null @@ -1,7 +0,0 @@ -Testing -======= - -See :ref:`install` to install the dependencies. - -To run the tests that use `pytest`, install the testing dependencies running -``pip install .[test]``.