Skip to content
Snippets Groups Projects
Commit 6f1059b2 authored by Nicolas Dandrimont's avatar Nicolas Dandrimont
Browse files

Partially revert "Refactor the sphinx-dev build environment to get rid of the link-stamp step"

This reverts commit 457c9f64.

This commit removed both the source copy step and the actual linking of the docs
sources. Turns out that the latter is "somewhat" necessary for a proper doc
build.

Close T2386
parent c1544b0f
No related branches found
No related tags found
No related merge requests found
......@@ -21,10 +21,14 @@ APIDOC_SWH_EXCLUDES = $(patsubst %,$(SWHPKGDIR)/%,$(APIDOC_EXCLUDES))
html: sphinx/html
sphinx/html: apidoc-stamp images-stamp rec-build-stamp
sphinx/html: links-stamp apidoc-stamp images-stamp rec-build-stamp
links-stamp:
bin/ln-sphinx-subprojects
touch $@
apidoc: apidoc-stamp
apidoc-stamp: images-stamp
apidoc-stamp: links-stamp images-stamp
$(SPHINXAPIDOC) --implicit-namespaces $(APIDOC_OPTS) -o $(APIDOC_DIR) $(SWHPKGDIR) $(APIDOC_SWH_EXCLUDES)
touch $@
......@@ -40,6 +44,7 @@ rec-build-stamp: $(wildcard ../../swh-*/docs/*.rst)
touch $@
clean: sphinx/clean
bin/ln-sphinx-subprojects --remove
$(MAKE) -C images clean
rm -f *-stamp
rm -f $(APIDOC_DIR)/*
......
#!/bin/bash
set -e
create_links () {
mkdir -p sources
for pymodule in $(cd ../../ && bin/ls-py-modules) ; do
if [ "$pymodule" = 'swh-docs' ] ; then
continue
fi
if [ ! -e "$pymodule" -a -d "../../${pymodule}/docs" ] ; then
ln -s "../../${pymodule}/docs" "$pymodule"
fi
done
}
remove_links () {
for pymodule in $(cd ../../ && bin/ls-py-modules) ; do
if [ "$pymodule" = 'swh-docs' ] ; then
continue
fi
if [ -L "$pymodule" ] ; then
rm "$pymodule"
fi
done
}
if [ "$1" = "--remove" ] ; then
remove_links
else
create_links
fi
......@@ -17,12 +17,12 @@ commands =
{envpython} -m pifpaf run postgresql -- make -C docs {posargs:html}
[testenv:sphinx-dev]
setenv =
SWHPKGDIR = {envsitepackagesdir}/swh
deps =
django < 3
-rrequirements-swh-dev.txt
pifpaf
setenv =
SWHPKGDIR = {envsitepackagesdir}/swh
commands =
{envpython} -m pifpaf run postgresql -- make -C docs {posargs:html}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment