Chandan Singh pushed to branch chandan/toxify at BuildStream / buildstream
Commits:
11 changed files:
- .gitlab-ci.yml
- CONTRIBUTING.rst
- MANIFEST.in
- setup.py
- dev-requirements.in → tools/dev-requirements.in
- dev-requirements.txt → tools/dev-requirements.txt
- plugin-requirements.in → tools/plugin-requirements.in
- plugin-requirements.txt → tools/plugin-requirements.txt
- requirements.in → tools/requirements.in
- requirements.txt → tools/requirements.txt
- tox.ini
Changes:
... | ... | @@ -162,16 +162,12 @@ tests-fedora-missing-deps: |
162 | 162 |
# as it will significantly grow the backing image.
|
163 | 163 |
docs:
|
164 | 164 |
stage: test
|
165 |
+ variables:
|
|
166 |
+ BST_FORCE_SESSION_REBUILD: 1
|
|
165 | 167 |
script:
|
166 | 168 |
- export BST_SOURCE_CACHE="$(pwd)/cache/integration-cache/sources"
|
167 |
- # Currently sphinx_rtd_theme does not support Sphinx >1.8, this breaks search functionality
|
|
168 |
- - pip3 install sphinx==1.7.9
|
|
169 |
- - pip3 install sphinx-click
|
|
170 |
- - pip3 install sphinx_rtd_theme
|
|
171 |
- - cd dist && ./unpack.sh && cd buildstream
|
|
172 |
- - make BST_FORCE_SESSION_REBUILD=1 -C doc
|
|
173 |
- - cd ../..
|
|
174 |
- - mv dist/buildstream/doc/build/html public
|
|
169 |
+ - tox -e docs
|
|
170 |
+ - mv doc/build/html public
|
|
175 | 171 |
except:
|
176 | 172 |
- schedules
|
177 | 173 |
artifacts:
|
... | ... | @@ -1222,27 +1222,13 @@ For further information about using the reStructuredText with sphinx, please see |
1222 | 1222 |
|
1223 | 1223 |
Building Docs
|
1224 | 1224 |
~~~~~~~~~~~~~
|
1225 |
-The documentation build is not integrated into the ``setup.py`` and is
|
|
1226 |
-difficult (or impossible) to do so, so there is a little bit of setup
|
|
1227 |
-you need to take care of first.
|
|
1228 |
- |
|
1229 |
-Before you can build the BuildStream documentation yourself, you need
|
|
1230 |
-to first install ``sphinx`` along with some additional plugins and dependencies,
|
|
1231 |
-using pip or some other mechanism::
|
|
1232 |
- |
|
1233 |
- # Install sphinx
|
|
1234 |
- pip3 install --user sphinx
|
|
1235 |
- |
|
1236 |
- # Install some sphinx extensions
|
|
1237 |
- pip3 install --user sphinx-click
|
|
1238 |
- pip3 install --user sphinx_rtd_theme
|
|
1239 |
- |
|
1240 |
- # Additional optional dependencies required
|
|
1241 |
- pip3 install --user arpy
|
|
1225 |
+Before you can build the docs, you will end to ensure that you have installed
|
|
1226 |
+the required :ref:`buid dependencies <contributing_build_deps>` as mentioned
|
|
1227 |
+in the testing section above.
|
|
1242 | 1228 |
|
1243 | 1229 |
To build the documentation, just run the following::
|
1244 | 1230 |
|
1245 |
- make -C doc
|
|
1231 |
+ tox -e docs
|
|
1246 | 1232 |
|
1247 | 1233 |
This will give you a ``doc/build/html`` directory with the html docs which
|
1248 | 1234 |
you can view in your browser locally to test.
|
... | ... | @@ -1260,9 +1246,10 @@ will make the docs build reuse already downloaded sources:: |
1260 | 1246 |
|
1261 | 1247 |
export BST_SOURCE_CACHE=~/.cache/buildstream/sources
|
1262 | 1248 |
|
1263 |
-To force rebuild session html while building the doc, simply build the docs like this::
|
|
1249 |
+To force rebuild session html while building the doc, simply run `tox` with the
|
|
1250 |
+``BST_FORCE_SESSION_REBUILD`` environment variable set, like so::
|
|
1264 | 1251 |
|
1265 |
- make BST_FORCE_SESSION_REBUILD=1 -C doc
|
|
1252 |
+ env BST_FORCE_SESSION_REBUILD=1 tox -e docs
|
|
1266 | 1253 |
|
1267 | 1254 |
|
1268 | 1255 |
Man pages
|
... | ... | @@ -1478,6 +1465,8 @@ The elaborate documentation for pytest can be found here: http://doc.pytest.org/ |
1478 | 1465 |
Don't get lost in the docs if you don't need to, follow existing examples instead.
|
1479 | 1466 |
|
1480 | 1467 |
|
1468 |
+.. _contributing_build_deps:
|
|
1469 |
+ |
|
1481 | 1470 |
Installing build dependencies
|
1482 | 1471 |
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
1483 | 1472 |
Some of BuildStream's dependencies have non-python build dependencies. When
|
... | ... | @@ -32,12 +32,12 @@ include .pylintrc |
32 | 32 |
recursive-include buildstream/_protos *.proto
|
33 | 33 |
|
34 | 34 |
# Requirements files
|
35 |
-include requirements.in
|
|
36 |
-include requirements.txt
|
|
37 |
-include dev-requirements.in
|
|
38 |
-include dev-requirements.txt
|
|
39 |
-include plugin-requirements.in
|
|
40 |
-include plugin-requirements.txt
|
|
35 |
+include tools/requirements.in
|
|
36 |
+include tools/requirements.txt
|
|
37 |
+include tools/dev-requirements.in
|
|
38 |
+include tools/dev-requirements.txt
|
|
39 |
+include tools/plugin-requirements.in
|
|
40 |
+include tools/plugin-requirements.txt
|
|
41 | 41 |
|
42 | 42 |
# Versioneer
|
43 | 43 |
include versioneer.py
|
... | ... | @@ -270,10 +270,10 @@ def get_cmdclass(): |
270 | 270 |
#####################################################
|
271 | 271 |
# Gather requirements #
|
272 | 272 |
#####################################################
|
273 |
-with open('dev-requirements.in') as dev_reqs:
|
|
273 |
+with open('tools/dev-requirements.in') as dev_reqs:
|
|
274 | 274 |
dev_requires = dev_reqs.read().splitlines()
|
275 | 275 |
|
276 |
-with open('requirements.in') as install_reqs:
|
|
276 |
+with open('tools/requirements.in') as install_reqs:
|
|
277 | 277 |
install_requires = install_reqs.read().splitlines()
|
278 | 278 |
|
279 | 279 |
#####################################################
|
1 | 1 |
[tox]
|
2 |
-envlist = py35,py36,py37
|
|
2 |
+envlist = py35,py36,py37,docs
|
|
3 | 3 |
skip_missing_interpreters = true
|
4 | 4 |
|
5 | 5 |
[testenv]
|
6 | 6 |
commands = pytest {posargs}
|
7 | 7 |
deps =
|
8 |
- -rrequirements.txt
|
|
9 |
- -rdev-requirements.txt
|
|
10 |
- -rplugin-requirements.txt
|
|
8 |
+ -rtools/requirements.txt
|
|
9 |
+ -rtools/dev-requirements.txt
|
|
10 |
+ -rtools/plugin-requirements.txt
|
|
11 | 11 |
passenv =
|
12 | 12 |
GI_TYPELIB_PATH
|
13 |
+ BST_FORCE_BACKEND
|
|
14 |
+ |
|
15 |
+[testenv:docs]
|
|
16 |
+commands=
|
|
17 |
+ make -C doc
|
|
18 |
+# Currently sphinx_rtd_theme does not support Sphinx >1.8, this breaks search functionality
|
|
19 |
+deps =
|
|
20 |
+ sphinx==1.7.9
|
|
21 |
+ sphinx-click
|
|
22 |
+ sphinx_rtd_theme
|
|
23 |
+ -rtools/requirements.txt
|
|
24 |
+ -rtools/plugin-requirements.txt
|
|
25 |
+passenv =
|
|
26 |
+ BST_SOURCE_CACHE
|
|
27 |
+ BST_FORCE_SESSION_REBUILD
|