[Notes] [Git][BuildStream/buildstream][chandan/toxify] 2 commits: Move sphinx build functionality to tox



Title: GitLab

Chandan Singh pushed to branch chandan/toxify at BuildStream / buildstream

Commits:

3 changed files:

Changes:

  • .gitlab-ci.yml
    ... ... @@ -154,20 +154,13 @@ tests-fedora-missing-deps:
    154 154
     
    
    155 155
     # Automatically build documentation for every commit, we want to know
    
    156 156
     # if building documentation fails even if we're not deploying it.
    
    157
    -# Note: We still do not enforce a consistent installation of python3-sphinx,
    
    158
    -#       as it will significantly grow the backing image.
    
    159 157
     docs:
    
    160 158
       stage: test
    
    159
    +  variables:
    
    160
    +    BST_FORCE_SESSION_REBUILD: 1
    
    161 161
       script:
    
    162
    -  - export BST_SOURCE_CACHE="$(pwd)/cache/integration-cache/sources"
    
    163
    -  # Currently sphinx_rtd_theme does not support Sphinx >1.8, this breaks search functionality
    
    164
    -  - pip3 install sphinx==1.7.9
    
    165
    -  - pip3 install sphinx-click
    
    166
    -  - pip3 install sphinx_rtd_theme
    
    167
    -  - cd dist && ./unpack.sh && cd buildstream
    
    168
    -  - make BST_FORCE_SESSION_REBUILD=1 -C doc
    
    169
    -  - cd ../..
    
    170
    -  - mv dist/buildstream/doc/build/html public
    
    162
    +  - env BST_SOURCE_CACHE="$(pwd)/cache/integration-cache/sources" tox -e docs
    
    163
    +  - mv doc/build/html public
    
    171 164
       except:
    
    172 165
       - schedules
    
    173 166
       artifacts:
    

  • CONTRIBUTING.rst
    ... ... @@ -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
    
    ... ... @@ -1552,6 +1541,12 @@ with::
    1552 1541
     Alternatively, any IDE plugin that uses pytest should automatically
    
    1553 1542
     detect the ``.pylintrc`` in the project's root directory.
    
    1554 1543
     
    
    1544
    +In case BuildStream's dependencies were updated since you last ran the
    
    1545
    +tests, you might see some errors like
    
    1546
    +``pytest: error: unrecognized arguments: --codestyle``. If this happens, you
    
    1547
    +will need to force ``tox`` to recreate the test environment(s). To do so, you
    
    1548
    +can run ``tox`` with ``-r`` or  ``--recreate`` option.
    
    1549
    +
    
    1555 1550
     .. note::
    
    1556 1551
     
    
    1557 1552
        By default, we do not allow use of site packages in our ``tox``
    

  • tox.ini
    ... ... @@ -9,5 +9,25 @@ deps =
    9 9
         -rtools/dev-requirements.txt
    
    10 10
         -rtools/plugin-requirements.txt
    
    11 11
     passenv =
    
    12
    +    BST_FORCE_BACKEND
    
    12 13
         GI_TYPELIB_PATH
    
    13 14
         INTEGRATION_CACHE
    
    15
    +
    
    16
    +[testenv:docs]
    
    17
    +commands =
    
    18
    +    make -C doc
    
    19
    +# Currently sphinx_rtd_theme does not support Sphinx >1.8, this breaks search functionality
    
    20
    +deps =
    
    21
    +    sphinx==1.7.9
    
    22
    +    sphinx-click
    
    23
    +    sphinx_rtd_theme
    
    24
    +    -rtools/requirements.txt
    
    25
    +    -rtools/plugin-requirements.txt
    
    26
    +passenv =
    
    27
    +    BST_FORCE_SESSION_REBUILD
    
    28
    +    BST_SOURCE_CACHE
    
    29
    +    HOME
    
    30
    +    LANG
    
    31
    +    LC_ALL
    
    32
    +whitelist_externals =
    
    33
    +    make



  • [Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]