Skip to content

Commit

Permalink
setup: link to the right documentation version from pip metadata.
Browse files Browse the repository at this point in the history
  • Loading branch information
whitequark committed Jul 1, 2020
1 parent 102565f commit d5d3bc4
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion setup.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
from setuptools import setup, find_packages
from setuptools_scm.git import parse as parse_git


def scm_version():
Expand All @@ -14,6 +15,14 @@ def local_scheme(version):
}


def doc_version():
git = parse_git(".")
if git.exact:
return git.format_with("{tag}")
else:
return "latest"


setup(
name="nmigen",
use_scm_version=scm_version(),
Expand Down Expand Up @@ -41,7 +50,7 @@ def local_scheme(version):
]
},
project_urls={
"Documentation": "https://nmigen.info/nmigen/",
"Documentation": "https://nmigen.info/nmigen/{}".format(doc_version()),
"Source Code": "https://github.com/nmigen/nmigen",
"Bug Tracker": "https://github.com/nmigen/nmigen/issues",
},
Expand Down

0 comments on commit d5d3bc4

Please sign in to comment.