setup: link to the right documentation version from pip metadata.
This commit is contained in:
parent
102565f6de
commit
d5d3bc4b1a
11
setup.py
11
setup.py
|
@ -1,4 +1,5 @@
|
|||
from setuptools import setup, find_packages
|
||||
from setuptools_scm.git import parse as parse_git
|
||||
|
||||
|
||||
def scm_version():
|
||||
|
@ -14,6 +15,14 @@ def scm_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(),
|
||||
|
@ -41,7 +50,7 @@ setup(
|
|||
]
|
||||
},
|
||||
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",
|
||||
},
|
||||
|
|
Loading…
Reference in a new issue