From 07a363bce2edf87c104cb1ed469853b5edf8e4f2 Mon Sep 17 00:00:00 2001 From: David Douard <david.douard@sdfa3.org> Date: Wed, 26 Feb 2025 22:52:30 +0100 Subject: [PATCH] Add support for swh package using src/swh directory structure --- Makefile.sphinx | 2 +- docs/devel/bin/ln-sphinx-subprojects | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/Makefile.sphinx b/Makefile.sphinx index 01e80e52..8d87c87d 100644 --- a/Makefile.sphinx +++ b/Makefile.sphinx @@ -34,7 +34,7 @@ sphinx/%: $(apidoc_dep) apidoc: $(apidoc_dep) apidoc-stamp: - $(SPHINXAPIDOC) $(APIDOC_OPTS) -o $(APIDOC_DIR) ../swh $(APIDOC_SWH_EXCLUDES) + $(SPHINXAPIDOC) $(APIDOC_OPTS) -o $(APIDOC_DIR) `if [ -d ../src/swh ]; then echo ../src/swh; else echo ../swh; fi` $(APIDOC_SWH_EXCLUDES) # to silent Sphinx warnings about apidoc documents not included in any toctree find $(shell pwd)/apidoc -name "*.rst" | xargs sed -i '1i:orphan:\n' touch $@ diff --git a/docs/devel/bin/ln-sphinx-subprojects b/docs/devel/bin/ln-sphinx-subprojects index 09f2f8c3..a4ad5992 100755 --- a/docs/devel/bin/ln-sphinx-subprojects +++ b/docs/devel/bin/ln-sphinx-subprojects @@ -16,6 +16,8 @@ create_links () { fi if [ -d "../../../${pymodule}/swh" ] ; then cp -r -f --symbolic-link $(realpath ../../../${pymodule}/swh/*) sources/swh/ + elif [ -d "../../../${pymodule}/src/swh" ] ; then + cp -r -f --symbolic-link $(realpath ../../../${pymodule}/src/swh/*) sources/swh/ fi pushd ../../../${pymodule} for EXT in rst md; do -- GitLab