Revert "Change docs to pull version from setup.py"

This reverts commit 45b70c952f.
This commit broke the readthedocs build because RTD is building the docs
without running setup.py. So there is no package metadata.
This commit is contained in:
Jeff Widman
2017-02-12 02:48:44 -08:00
parent 23d52703fd
commit 678ec31229

View File

@@ -13,7 +13,6 @@
import datetime
import os
import pkg_resources
import sys
import time
@@ -56,17 +55,11 @@ copyright = u'2012-{0}'.format(BUILD_DATE.year)
# The version info for the project you're documenting, acts as replacement for
# |version| and |release|, also used in various other places throughout the
# built documents.
try:
release = pkg_resources.get_distribution('Flask-DebugToolbar').version
except pkg_resources.DistributionNotFound:
print('Flask-DebugToolbar must be installed to build the documentation.')
print('Install from source using `pip install -e .` in a virtualenv.')
sys.exit(1)
if 'dev' in release:
release = ''.join(release.partition('dev')[:2])
version = '.'.join(release.split('.')[:2])
#
# The short X.Y version.
version = '0.10'
# The full version, including alpha/beta/rc tags.
release = '0.10.0'
# The language for content autogenerated by Sphinx. Refer to documentation
# for a list of supported languages.