move the team badge generation to the end of the build

Newer versions of Sphinx load the extensions before creating any of
the output directories, so the os.mkdir() call in the badge extension
was failing. Fix the problem by tying the badge step to the
build-finished event Sphinx emits when it reaches the end of its
build.

This change also uncaps Sphinx in the requirements file, since that
cap is not honored in the CI job anyway.

Change-Id: Ia6c232c5bc8c4015e00efe0b3b4182da2490acc7
Signed-off-by: Doug Hellmann <doug@doughellmann.com>
This commit is contained in:
Doug Hellmann 2018-05-14 10:51:00 -04:00
parent 04cf54a078
commit 26700d3bbc
2 changed files with 4 additions and 3 deletions

View File

@ -161,7 +161,8 @@ def _to_svg(badges):
yield FLAT_BADGE_TEMPLATE.format(**badge)
def _generate_teams_badges(app):
def _generate_teams_badges(app, exception=None):
app.info('Generating team badges')
all_teams = projects.get_project_data()
files = []
@ -199,4 +200,4 @@ def _generate_teams_badges(app):
def setup(app):
app.info('loading badges extension')
_generate_teams_badges(app)
app.connect('build-finished', _generate_teams_badges)

View File

@ -1,6 +1,6 @@
# needed for doc build
docutils>=0.11,!=0.13.1 # OSI-Approved Open Source, Public Domain
sphinx>=1.5.0,<1.6.1
sphinx>=1.5.0
PyYAML>=3.1.0
yamllint>=0.5.2
requests-cache