Skip to content

Commit adb6a30

Browse files
Fix Makefile dependencies for installing plone.api (#1907)
* Fix Makefile dependencies for installing plone.api * Don't skip RTD build if Makefile was touched * Try to fix rtd build --------- Co-authored-by: Steve Piercy <[email protected]>
1 parent a122987 commit adb6a30

File tree

2 files changed

+9
-5
lines changed

2 files changed

+9
-5
lines changed

.readthedocs.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ build:
1818
# If there are no changes (git diff exits with 0) we force the command to return with 183.
1919
# This is a special exit code on Read the Docs that will cancel the build immediately.
2020
- |
21-
if [ "$READTHEDOCS_VERSION_TYPE" = "external" ] && git diff --quiet origin/6.0 -- docs/ .readthedocs.yaml requirements-initial.txt requirements.txt;
21+
if [ "$READTHEDOCS_VERSION_TYPE" = "external" ] && git diff --quiet origin/6.0 -- docs/ Makefile .readthedocs.yaml requirements-initial.txt requirements.txt;
2222
then
2323
exit 183;
2424
fi

Makefile

+8-4
Original file line numberDiff line numberDiff line change
@@ -48,11 +48,15 @@ venv/bin/python: ## Setup up Python virtual environment and install requirement
4848
docs/plone.api: ## Setup plone.api docs
4949
git submodule init
5050
git submodule update
51-
venv/bin/pip install -e submodules/plone.api/"[test]"
5251
ln -s ../submodules/plone.api/docs ./docs/plone.api
5352
@echo
5453
@echo "Documentation of plone.api initialized."
5554

55+
.PHONY: install-api
56+
install-api: docs/plone.api
57+
venv/bin/pip install plone.api -c submodules/plone.api/constraints.txt
58+
venv/bin/pip install --no-deps -e submodules/plone.api/"[test]"
59+
5660
docs/plone.restapi: ## Setup plone.restapi docs
5761
git submodule init
5862
git submodule update
@@ -68,8 +72,7 @@ docs/volto: ## Setup Volto docs
6872
@echo "Documentation of volto initialized."
6973

7074
.PHONY: deps
71-
deps: venv/bin/python docs/volto docs/plone.restapi docs/plone.api ## Create Python virtual environment, install requirements, initialize or update the volto, plone.restapi, and plone.api submodules, and finally create symlinks to the source files.
72-
75+
deps: venv/bin/python docs/volto docs/plone.restapi install-api ## Create Python virtual environment, install requirements, initialize or update the volto, plone.restapi, and plone.api submodules, and finally create symlinks to the source files.
7376

7477
.PHONY: html
7578
html: deps ## Build html
@@ -219,7 +222,8 @@ rtd-pr-preview: ## Build pull request preview on Read the Docs
219222
pip install -r requirements.txt
220223
git submodule init
221224
git submodule update
222-
pip install -e submodules/plone.api[test]
225+
pip install plone.api -c submodules/plone.api/constraints.txt
226+
pip install --no-deps -e submodules/plone.api[test]
223227
ln -s ../submodules/volto/docs/source ./docs/volto
224228
ln -s ../submodules/plone.restapi ./docs/plone.restapi
225229
ln -s ../submodules/plone.api/docs ./docs/plone.api

0 commit comments

Comments
 (0)