diff --git a/.gitignore b/.gitignore index eff47bedf..1b4a8f6be 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,4 @@ build dist venv +nitrokey-sdk-py* diff --git a/Makefile b/Makefile index 2d144c4e8..210c5bdf0 100644 --- a/Makefile +++ b/Makefile @@ -1,12 +1,31 @@ +NITROKEY_SDK_PY_VERSION ?= v0.2.3 +NITROKEY_SDK_PY_CHECKSUM ?= b0547efe0bce6907f831a80297baf5393825037d3996edd6cf9f1ccc796e736e +NITROKEY_SDK_PY_URL := https://github.com/Nitrokey/nitrokey-sdk-py/archive/refs/tags/$(NITROKEY_SDK_PY_VERSION).tar.gz +NITROKEY_SDK_PY := nitrokey-sdk-py-$(NITROKEY_SDK_PY_VERSION) +NITROKEY_SDK_PY_ARCHIVE := $(NITROKEY_SDK_PY).tar.gz +NITROKEY_SDK_PY_LINK := source/components/software/nitrokey-sdk-py - +.PHONY: all all: venv venv/bin/sphinx-build -j auto -b html -D language=en -d build/en/doctrees source dist/en -venv: +.PHONY: venv +venv: $(NITROKEY_SDK_PY) python -m venv venv venv/bin/pip3 install -r requirements.txt + venv/bin/pip3 install ./$(NITROKEY_SDK_PY) + +$(NITROKEY_SDK_PY): $(NITROKEY_SDK_PY_ARCHIVE) + mkdir "$@" + tar --directory "$@" --extract --strip-components 1 --file "$<" + rm -f $(NITROKEY_SDK_PY_LINK) + ln -s ../../../$(NITROKEY_SDK_PY)/docs $(NITROKEY_SDK_PY_LINK) + +$(NITROKEY_SDK_PY_ARCHIVE): + curl "$(NITROKEY_SDK_PY_URL)" --location --output "$@" + echo "$(NITROKEY_SDK_PY_CHECKSUM) $@" | sha256sum -c +.PHONY: clean clean: - rm -rf dist build venv + rm -rf dist build venv nitrokey-sdk-py* $(NITROKEY_SDK_PY_LINK) diff --git a/source/components/software/index.rst b/source/components/software/index.rst index 2fc32150d..86736050c 100644 --- a/source/components/software/index.rst +++ b/source/components/software/index.rst @@ -7,3 +7,4 @@ Software nk-app2/index nitropy/index + nitrokey-sdk-py/index diff --git a/source/conf.py b/source/conf.py index 3165f8f85..ef4d5bab3 100644 --- a/source/conf.py +++ b/source/conf.py @@ -39,6 +39,7 @@ # extensions coming with Sphinx (named 'sphinx.ext.*') or your custom # ones. extensions = [ + 'sphinx.ext.autodoc', 'sphinx.ext.todo', 'sphinx.ext.coverage', #'sphinx_copybutton', @@ -434,3 +435,9 @@ # Disables the closing of tabs if clicked on the currently active tab sphinx_tabs_disable_tab_closing = True + +# -- Options for autodoc extension ------------------------------------------- + +autodoc_class_signature = 'separated' +autodoc_member_order = 'groupwise' +autodoc_typehints = 'description'