[Docs] Fix build errors getting Deluge version

The use of pkg_resource.require caused an unwanted requirements lookup
that errored out the sphinx build when no dependencies are installed.

This is fixed by switching to pkg_resources.get_distribution.

Also changed the tox docs env to not install Deluge as the setup.py
now contains install_requires which is unwanted.
This commit is contained in:
Calum Lind 2018-11-01 23:18:05 +00:00
commit 20431cc771
3 changed files with 17 additions and 14 deletions

View file

@ -150,7 +150,7 @@ copyright = '2008-%s, Deluge Team' % current_year # noqa: A001
if get_version:
version = get_version(prefix='deluge-', suffix='.dev0')
else:
version = pkg_resources.require('Deluge')[0].version
version = pkg_resources.get_distribution('Deluge').version
# The full version, including alpha/beta/rc tags.
release = version