diff --git a/docs/.gitignore b/docs/.gitignore --- a/docs/.gitignore +++ b/docs/.gitignore @@ -1,3 +1,4 @@ *-stamp _build/ /swh-* +sources/ diff --git a/docs/Makefile b/docs/Makefile --- a/docs/Makefile +++ b/docs/Makefile @@ -3,7 +3,7 @@ SOURCEDIR = . BUILDDIR = _build HTMLDIR = $(BUILDDIR)/html -SWHPKGDIR = `python3 -c 'import swh; print(swh.__path__[0])'` +SWHPKGDIR = sources/swh/ INSTALL_HOST = pergamon.internal.softwareheritage.org INSTALL_DIR = /srv/softwareheritage/docs/webroot/devel @@ -27,8 +27,8 @@ touch $@ apidoc: apidoc-stamp -apidoc-stamp: images-stamp - $(SPHINXAPIDOC) $(APIDOC_OPTS) -o $(APIDOC_DIR) $(SWHPKGDIR) $(APIDOC_SWH_EXCLUDES) +apidoc-stamp: links-stamp images-stamp + $(SPHINXAPIDOC) --implicit-namespaces $(APIDOC_OPTS) -o $(APIDOC_DIR) $(SWHPKGDIR) $(APIDOC_SWH_EXCLUDES) touch $@ images-stamp: diff --git a/docs/bin/ln-sphinx-subprojects b/docs/bin/ln-sphinx-subprojects --- a/docs/bin/ln-sphinx-subprojects +++ b/docs/bin/ln-sphinx-subprojects @@ -2,6 +2,7 @@ set -e create_links () { + mkdir -p sources/swh/ for pymodule in $(cd ../../ && bin/ls-py-modules) ; do if [ "$pymodule" = 'swh-docs' ] ; then continue @@ -9,6 +10,9 @@ if [ ! -e "$pymodule" -a -d "../../${pymodule}/docs" ] ; then ln -s "../../${pymodule}/docs" "$pymodule" fi + if [ -d "../../${pymodule}/swh" ] ; then + cp -fr --link "../../${pymodule}/swh/" "sources/" + fi done } @@ -21,6 +25,7 @@ rm "$pymodule" fi done + rm -rf sources } if [ "$1" = "--remove" ] ; then