Skip to content
Myr

Fix tox docs-html builds

Before adoption: this commit came in with the history the project adopted, so no landing records it.

These have been broken for about a month now because of the upgrade to Sphinx 2. This upgrade happened automatically because we do not have the version pinned. Luckily this issue appears to only be from having Python 2 syntax in the docs script, so making that compatible with Python 3 fixes the error and allows the docs to pass.

authored by Kevin Brown · committed by Kevin Brown · parent c4c4088 · Browse files · 1 file+4 added−4 removed
This commit

State

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Diff stats

1 file+4 added−4 removed

  • other:+4 added−4 removed

1 file+4 added−4 removed

modified:docs/conf.py+4 added-4 removed
44 unmodified lines
45import pkg_resources46try:47 release = pkg_resources.get_distribution('Jinja2').version48except ImportError:49 print 'To build the documentation, The distribution information of Jinja2'50 print 'Has to be available. Either install the package into your'51 print 'development environment or run "setup.py develop" to setup the'52 print 'metadata. A virtualenv is recommended!'49 print('To build the documentation, The distribution information of Jinja2')50 print('Has to be available. Either install the package into your')51 print('development environment or run "setup.py develop" to setup the')52 print('metadata. A virtualenv is recommended!')53 sys.exit(1)54if 'dev' in release:55 release = release.split('dev')[0] + 'dev'56version = '.'.join(release.split('.')[:2])
104 unmodified lines