Skip to content

Commit 0c36d1b

Browse files
committed
Fix RTD
1 parent e42088b commit 0c36d1b

File tree

1 file changed

+5
-21
lines changed

1 file changed

+5
-21
lines changed

docs/source/conf.py

Lines changed: 5 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,11 @@
77
# pylint: disable=invalid-name
88

99
import datetime
10-
from email import message_from_string
11-
from pathlib import Path
1210

13-
import pkg_resources
11+
import mock_vws
12+
13+
project = 'VWS-Python-Mock'
14+
author = 'Adam Dangoor'
1415

1516
extensions = [
1617
'sphinx.ext.autodoc',
@@ -26,37 +27,20 @@
2627
source_suffix = '.rst'
2728
master_doc = 'index'
2829

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

4833
# The version info for the project you're documenting, acts as replacement for
4934
# |version| and |release|, also used in various other places throughout the
5035
# built documents.
51-
version = distribution.version
36+
version = mock_vws.__version__
5237
release = version.split('+')[0]
5338

5439
substitutions = [
5540
('|github-owner|', 'adamtheturtle'),
5641
('|github-repository|', 'vws-python-mock'),
5742
]
5843

59-
6044
language = None
6145

6246
# The name of the syntax highlighting style to use.

0 commit comments

Comments
 (0)