Skip to content

Commit 7a5fe72

Browse files
committed
Fix RTD
1 parent 95a7448 commit 7a5fe72

File tree

1 file changed

+5
-23
lines changed

1 file changed

+5
-23
lines changed

docs/source/conf.py

Lines changed: 5 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,16 @@
11
#!/usr/bin/env python3
2-
32
"""
43
Configuration for Sphinx.
54
"""
65

76
# pylint: disable=invalid-name
87

98
import datetime
10-
import os
11-
import sys
12-
from email import message_from_string
13-
from pathlib import Path
149

15-
import pkg_resources
10+
import vws
11+
12+
project = 'VWS-Python'
13+
author = 'Adam Dangoor'
1614

1715
extensions = [
1816
'sphinx.ext.autodoc',
@@ -27,29 +25,13 @@
2725
source_suffix = '.rst'
2826
master_doc = 'index'
2927

30-
docs_source_dir = Path(__file__).parent
31-
docs_dir = docs_source_dir.parent
32-
repo_dir = docs_dir.parent
33-
src_dir = repo_dir / 'src'
34-
distributions = {v.key: v for v in set(pkg_resources.working_set)}
35-
(distribution, ) = {
36-
dist
37-
for dist in distributions.values() if dist.location == str(src_dir)
38-
}
39-
project_name = distribution.project_name
40-
41-
pkg_info = distribution.get_metadata('PKG-INFO')
42-
pkg_info_as_message = message_from_string(pkg_info)
43-
44-
project = pkg_info_as_message['Name']
45-
author = pkg_info_as_message['Author']
4628
year = datetime.datetime.now().year
4729
copyright = f'{year}, {author}' # pylint: disable=redefined-builtin
4830

4931
# The version info for the project you're documenting, acts as replacement for
5032
# |version| and |release|, also used in various other places throughout the
5133
# built documents.
52-
version = distribution.version
34+
version = vws.__version__
5335
release = version.split('+')[0]
5436

5537
substitutions = [

0 commit comments

Comments
 (0)