File tree Expand file tree Collapse file tree 1 file changed +5
-23
lines changed
Expand file tree Collapse file tree 1 file changed +5
-23
lines changed Original file line number Diff line number Diff line change 11#!/usr/bin/env python3
2-
32"""
43Configuration for Sphinx.
54"""
65
76# pylint: disable=invalid-name
87
98import 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
1715extensions = [
1816 'sphinx.ext.autodoc' ,
2725source_suffix = '.rst'
2826master_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' ]
4628year = datetime .datetime .now ().year
4729copyright = 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__
5335release = version .split ('+' )[0 ]
5436
5537substitutions = [
You can’t perform that action at this time.
0 commit comments