diff options
author | Jason R. Coombs <jaraco@jaraco.com> | 2017-01-20 11:19:29 -0500 |
---|---|---|
committer | Jason R. Coombs <jaraco@jaraco.com> | 2017-01-20 11:19:29 -0500 |
commit | ce5a9260dd3821270d0000b1a15aa73b65838789 (patch) | |
tree | 23616b05ed43da7ddd75c31898e90f209160a89c /docs | |
parent | dc04e99cfb8c23747b91ff9155b45074149faae7 (diff) | |
parent | 9f6eea591eaae483be11d13ebad06958a6a1e2c8 (diff) | |
download | pytest-runner-ce5a9260dd3821270d0000b1a15aa73b65838789.tar.gz |
Merge skeleton
Diffstat (limited to 'docs')
-rw-r--r-- | docs/conf.py | 20 |
1 files changed, 14 insertions, 6 deletions
diff --git a/docs/conf.py b/docs/conf.py index 2b17634..2d86231 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -1,7 +1,9 @@ #!/usr/bin/env python3 # -*- coding: utf-8 -*- -import pkg_resources +import os +import sys +import subprocess extensions = [ 'sphinx.ext.autodoc', @@ -9,11 +11,16 @@ extensions = [ ] # General information about the project. -project = 'pytest-runner' -copyright = '2015,2016 Jason R. Coombs' -# The short X.Y version. -version = pkg_resources.require(project)[0].version +root = os.path.join(os.path.dirname(__file__), '..') +setup_script = os.path.join(root, 'setup.py') +fields = ['--name', '--version', '--url', '--author'] +dist_info_cmd = [sys.executable, setup_script] + fields +output_bytes = subprocess.check_output(dist_info_cmd, cwd=root) +project, version, url, author = output_bytes.decode('utf-8').strip().split('\n') + +copyright = '2015-2017 ' + author + # The full version, including alpha/beta/rc tags. release = version @@ -24,11 +31,12 @@ link_files = { using=dict( GH='https://github.com', project=project, + url=url, ), replace=[ dict( pattern=r"(Issue )?#(?P<issue>\d+)", - url='{GH}/pytest-dev/{project}/issues/{issue}', + url='{url}/issues/{issue}', ), dict( pattern=r"^(?m)((?P<scm_version>v?\d+(\.\d+){1,2}))\n[-=]+\n", |