@@ -35,157 +35,166 @@ distclean: clean ## Clean docs build directory, Python virtual environment, and
35
35
rm docs/plone.api
36
36
rm docs/plone.restapi
37
37
rm docs/volto
38
- @echo
39
38
@echo " Cleaned docs build directory, Python virtual environment, and symlinks."
39
+ @echo
40
40
41
41
venv/bin/python : # # Setup up Python virtual environment and install requirements
42
42
python3 -m venv venv
43
43
venv/bin/pip install -r requirements-initial.txt
44
44
venv/bin/pip install -r requirements.txt
45
- @echo
46
45
@echo " Installation of requirements completed."
46
+ @echo
47
47
48
48
docs/plone.api : # # Setup plone.api docs
49
49
git submodule init
50
50
git submodule update
51
- venv/bin/pip install -e submodules/plone.api/" [test]"
52
51
ln -s ../submodules/plone.api/docs ./docs/plone.api
53
- @echo
54
52
@echo " Documentation of plone.api initialized."
53
+ @echo
54
+
55
+ venv/plone.api-install : docs/plone.api
56
+ touch venv/plone.api-install
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
+ @echo " plone.api installed."
60
+ @echo
55
61
56
62
docs/plone.restapi : # # Setup plone.restapi docs
57
63
git submodule init
58
64
git submodule update
59
65
ln -s ../submodules/plone.restapi ./docs/plone.restapi
60
- @echo
61
66
@echo " Documentation of plone.restapi initialized."
67
+ @echo
62
68
63
69
docs/volto : # # Setup Volto docs
64
70
git submodule init
65
71
git submodule update
66
72
ln -s ../submodules/volto/docs/source ./docs/volto
67
- @echo
68
73
@echo " Documentation of volto initialized."
74
+ @echo
69
75
70
76
.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
-
77
+ deps : venv/bin/python docs/volto docs/plone.restapi venv/plone.api-install # # Create Python virtual environment, install requirements, initialize or update the volto, plone.restapi, and plone.api submodules, create symlinks to the source files, and finally install plone.api.
73
78
74
79
.PHONY : html
75
80
html : deps # # Build html
76
81
cd $(DOCS_DIR ) && $(SPHINXBUILD ) -b html $(ALLSPHINXOPTS ) $(BUILDDIR ) /html
77
- @echo
78
82
@echo " Build finished. The HTML pages are in $( BUILDDIR) /html."
83
+ @echo
79
84
80
85
.PHONY : manual
81
86
manual : deps
82
87
cd $(DOCS_DIR ) && $(SPHINXBUILD ) -b html -t manual . $(BUILDDIR ) /manual
88
+ @echo " Build finished. The manual pages are in $( BUILDDIR) /manual."
89
+ @echo
83
90
84
91
.PHONY : dirhtml
85
92
dirhtml : deps
86
93
cd $(DOCS_DIR ) && $(SPHINXBUILD ) -b dirhtml $(ALLSPHINXOPTS ) $(BUILDDIR ) /dirhtml
87
- @echo
88
94
@echo " Build finished. The HTML pages are in $( BUILDDIR) /dirhtml."
95
+ @echo
89
96
90
97
.PHONY : singlehtml
91
98
singlehtml : deps
92
99
cd $(DOCS_DIR ) && $(SPHINXBUILD ) -b singlehtml $(ALLSPHINXOPTS ) $(BUILDDIR ) /singlehtml
93
- @echo
94
100
@echo " Build finished. The HTML page is in $( BUILDDIR) /singlehtml."
101
+ @echo
95
102
96
103
.PHONY : pickle
97
104
pickle : deps
98
105
cd $(DOCS_DIR ) && $(SPHINXBUILD ) -b pickle $(ALLSPHINXOPTS ) $(BUILDDIR ) /pickle
99
- @echo
100
106
@echo " Build finished; now you can process the pickle files."
107
+ @echo
101
108
102
109
.PHONY : json
103
110
json : deps
104
111
cd $(DOCS_DIR ) && $(SPHINXBUILD ) -b json $(ALLSPHINXOPTS ) $(BUILDDIR ) /json
105
- @echo
106
112
@echo " Build finished; now you can process the JSON files."
113
+ @echo
107
114
108
115
.PHONY : htmlhelp
109
116
htmlhelp : deps
110
117
cd $(DOCS_DIR ) && $(SPHINXBUILD ) -b htmlhelp $(ALLSPHINXOPTS ) $(BUILDDIR ) /htmlhelp
111
- @echo
112
118
@echo " Build finished; now you can run HTML Help Workshop with the" \
113
119
" .hhp project file in $( BUILDDIR) /htmlhelp."
120
+ @echo
114
121
115
122
.PHONY : epub
116
123
epub : deps
117
124
cd $(DOCS_DIR ) && $(SPHINXBUILD ) -b epub $(ALLSPHINXOPTS ) $(BUILDDIR ) /epub
118
- @echo
119
125
@echo " Build finished. The epub file is in $( BUILDDIR) /epub."
126
+ @echo
120
127
121
128
.PHONY : latex
122
129
latex : deps
123
130
cd $(DOCS_DIR ) && $(SPHINXBUILD ) -b latex $(ALLSPHINXOPTS ) $(BUILDDIR ) /latex
124
- @echo
125
131
@echo " Build finished; the LaTeX files are in $( BUILDDIR) /latex."
126
132
@echo " Run \` make' in that directory to run these through (pdf)latex" \
127
133
" (use \` make latexpdf' here to do that automatically)."
134
+ @echo
128
135
129
136
.PHONY : latexpdf
130
137
latexpdf : deps
131
138
cd $(DOCS_DIR ) && $(SPHINXBUILD ) -b latex $(ALLSPHINXOPTS ) $(BUILDDIR ) /latex
132
139
@echo " Running LaTeX files through pdflatex..."
133
140
$(MAKE ) -C $(BUILDDIR ) /latex all-pdf
134
141
@echo " pdflatex finished; the PDF files are in $( BUILDDIR) /latex."
142
+ @echo
135
143
136
144
.PHONY : text
137
145
text : deps
138
146
cd $(DOCS_DIR ) && $(SPHINXBUILD ) -b text $(ALLSPHINXOPTS ) $(BUILDDIR ) /text
139
- @echo
140
147
@echo " Build finished. The text files are in $( BUILDDIR) /text."
148
+ @echo
141
149
142
150
.PHONY : man
143
151
man : deps
144
152
cd $(DOCS_DIR ) && $(SPHINXBUILD ) -b man $(ALLSPHINXOPTS ) $(BUILDDIR ) /man
145
- @echo
146
153
@echo " Build finished. The manual pages are in $( BUILDDIR) /man."
154
+ @echo
147
155
148
156
.PHONY : texinfo
149
157
texinfo : deps
150
158
cd $(DOCS_DIR ) && $(SPHINXBUILD ) -b texinfo $(ALLSPHINXOPTS ) $(BUILDDIR ) /texinfo
151
- @echo
152
159
@echo " Build finished. The Texinfo files are in $( BUILDDIR) /texinfo."
153
160
@echo " Run \` make' in that directory to run these through makeinfo" \
154
161
" (use \` make info' here to do that automatically)."
162
+ @echo
155
163
156
164
.PHONY : info
157
165
info : deps
158
166
cd $(DOCS_DIR ) && $(SPHINXBUILD ) -b texinfo $(ALLSPHINXOPTS ) $(BUILDDIR ) /texinfo
159
167
@echo " Running Texinfo files through makeinfo..."
160
168
make -C $(BUILDDIR ) /texinfo info
161
169
@echo " makeinfo finished; the Info files are in $( BUILDDIR) /texinfo."
170
+ @echo
162
171
163
172
.PHONY : changes
164
173
changes : deps
165
174
cd $(DOCS_DIR ) && $(SPHINXBUILD ) -b changes $(ALLSPHINXOPTS ) $(BUILDDIR ) /changes
166
- @echo
167
175
@echo " The overview file is in $( BUILDDIR) /changes."
176
+ @echo
168
177
169
178
.PHONY : linkcheck
170
179
linkcheck : deps # # Run linkcheck
171
180
cd $(DOCS_DIR ) && $(SPHINXBUILD ) -b linkcheck $(ALLSPHINXOPTS ) $(BUILDDIR ) /linkcheck
172
- @echo
173
181
@echo " Link check complete; look for any errors in the above output " \
174
182
" or in $( BUILDDIR) /linkcheck/ ."
183
+ @echo
175
184
176
185
.PHONY : linkcheckbroken
177
186
linkcheckbroken : deps # # Run linkcheck and show only broken links
178
187
cd $(DOCS_DIR ) && $(SPHINXBUILD ) -b linkcheck $(ALLSPHINXOPTS ) $(BUILDDIR ) /linkcheck | GREP_COLORS=' 0;31' grep -wi " broken\|redirect" --color=always | GREP_COLORS=' 0;31' grep -vi " https://github.com/plone/volto/issues/" --color=always && if test $$ ? = 0; then exit 1; fi || test $$? = 1
179
- @echo
180
188
@echo " Link check complete; look for any errors in the above output " \
181
189
" or in $( BUILDDIR) /linkcheck/ ."
190
+ @echo
182
191
183
192
.PHONY : vale
184
193
vale : deps # # Run Vale style, grammar, and spell checks
185
194
venv/bin/vale sync
186
195
venv/bin/vale --no-wrap $(VALEOPTS ) $(VALEFILES )
187
- @echo
188
196
@echo " Vale is finished; look for any errors in the above output."
197
+ @echo
189
198
190
199
.PHONY : html_meta
191
200
html_meta : deps # # Add meta data headers to all Markdown pages
@@ -196,6 +205,7 @@ doctest: deps
196
205
cd $(DOCS_DIR ) && $(SPHINXBUILD ) -b doctest $(ALLSPHINXOPTS ) $(BUILDDIR ) /doctest
197
206
@echo " Testing of doctests in the sources finished, look at the " \
198
207
" results in $( BUILDDIR) /doctest/output.txt."
208
+ @echo
199
209
200
210
.PHONY : test
201
211
test : clean linkcheckbroken # # Clean docs build, then run linkcheckbroken
@@ -208,6 +218,9 @@ livehtml: deps ## Rebuild Sphinx documentation on changes, with live-reload in
208
218
cd " $( DOCS_DIR) " && ${SPHINXAUTOBUILD} \
209
219
--ignore " *.swp" \
210
220
--port 8050 \
221
+ --watch volto \
222
+ --watch plone.api \
223
+ --watch plone.restapi \
211
224
-b html . " $( BUILDDIR) /html" $(SPHINXOPTS ) $(O )
212
225
213
226
.PHONY : rtd-pr-preview
@@ -216,7 +229,8 @@ rtd-pr-preview: ## Build pull request preview on Read the Docs
216
229
pip install -r requirements.txt
217
230
git submodule init
218
231
git submodule update
219
- pip install -e submodules/plone.api[test]
232
+ pip install plone.api -c submodules/plone.api/constraints.txt
233
+ pip install --no-deps -e submodules/plone.api[test]
220
234
ln -s ../submodules/volto/docs/source ./docs/volto
221
235
ln -s ../submodules/plone.restapi ./docs/plone.restapi
222
236
ln -s ../submodules/plone.api/docs ./docs/plone.api
0 commit comments