Skip to content

Commit

Permalink
chore(docs): ship sphinx documentation in the mtda-service package
Browse files Browse the repository at this point in the history
Signed-off-by: Cedric Hombourger <cedric.hombourger@siemens.com>
  • Loading branch information
chombourger committed Jan 22, 2024
1 parent 8eb7d6c commit af40ab0
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 4 deletions.
11 changes: 8 additions & 3 deletions debian/control
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,11 @@ Maintainer: Cedric Hombourger <cedric.hombourger@siemens.com>
Build-Depends: debhelper (>=10) | dh-systemd,
dh-python,
libpython3-all-dev,
python3-all-dev,
python3-setuptools
python3-all-dev:any,
python3-setuptools,
python3-sphinx:native <!nodoc>,
python3-sphinx-rtd-theme:native <!nodoc>
Rules-Requires-Root: no
Standards-Version: 4.5.0
Homepage: https://github.com/siemens/mtda
X-Python3-Version: >= 3.7
Expand All @@ -27,7 +30,9 @@ Depends: mtda-common,
python3-zmq,
python3-zstandard,
usbrelay,
${misc:Depends}
${misc:Depends},
${sphinxdoc:Depends}
Built-Using: ${sphinxdoc:Built-Using}
Replaces: mtda-usb-functions
Suggests: nbd-server
Description: Multi-Tenant Device Access service
Expand Down
2 changes: 2 additions & 0 deletions debian/docs
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
README.md
build/html
12 changes: 11 additions & 1 deletion debian/rules
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,20 @@ PY_TARGET=$(shell python3 -c "import sysconfig; print(sysconfig.get_path('stdlib
MTDA_DIST=$(PY_TARGET)/dist-packages/mtda

%:
dh $@ --with python3 --buildsystem=pybuild
dh $@ --with python3,sphinxdoc --buildsystem=pybuild

override_dh_auto_test:

override_dh_auto_build: export http_proxy=127.0.0.1:9
override_dh_auto_build: export https_proxy=127.0.0.1:9
override_dh_auto_build:
dh_auto_build
ifneq ($(filter nodoc,$(DEB_BUILD_PROFILES)),)
echo -e "\nnodoc build profile enabled, therefor not building docs.\n"
else
PYTHONPATH=. python3 -m sphinx -N -bhtml docs/ build/html
endif

override_dh_auto_install:
dh_auto_install
:
Expand Down

0 comments on commit af40ab0

Please sign in to comment.