From fbadf0344d4b9ac6917e8546b5529c20082f4733 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Fri, 23 Dec 2016 08:44:55 -0500 Subject: [PATCH] Also get the URL from the project metadata --- docs/conf.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/docs/conf.py b/docs/conf.py index adc9df7..d52e40d 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -14,9 +14,9 @@ extensions = [ root = os.path.join(os.path.dirname(__file__), '..') setup_script = os.path.join(root, 'setup.py') -dist_info_cmd = [sys.executable, setup_script, '--name', '--version'] +dist_info_cmd = [sys.executable, setup_script, '--name', '--version', '--url'] output_bytes = subprocess.check_output(dist_info_cmd, cwd=root) -project, version = output_bytes.decode('utf-8').split() +project, version, url = output_bytes.decode('utf-8').split() copyright = '2016 Jason R. Coombs' @@ -30,11 +30,12 @@ link_files = { using=dict( GH='https://github.com', project=project, + url=url, ), replace=[ dict( pattern=r"(Issue )?#(?P\d+)", - url='{GH}/jaraco/{project}/issues/{issue}', + url='{url}/issues/{issue}', ), dict( pattern=r"^(?m)((?Pv?\d+(\.\d+){1,2}))\n[-=]+\n",