Add a workaround for python-poetry/poetry#7702.
This commit is contained in:
parent
46e0a00a08
commit
5f6b36e91f
17
setup.py
17
setup.py
|
@ -1,13 +1,18 @@
|
||||||
from setuptools import setup
|
from setuptools import setup
|
||||||
from setuptools_scm.git import parse as parse_git
|
|
||||||
|
|
||||||
|
|
||||||
def doc_version():
|
def doc_version():
|
||||||
git = parse_git(".")
|
try:
|
||||||
if git.exact:
|
from setuptools_scm.git import parse as parse_git
|
||||||
return git.format_with("v{tag}")
|
git = parse_git(".")
|
||||||
else:
|
if git.exact:
|
||||||
return "latest"
|
return git.format_with("v{tag}")
|
||||||
|
else:
|
||||||
|
return "latest"
|
||||||
|
except ImportError:
|
||||||
|
# PEP 517 compliant build tools will never reach this code path.
|
||||||
|
# Poetry reaches this code path.
|
||||||
|
return ""
|
||||||
|
|
||||||
|
|
||||||
setup(
|
setup(
|
||||||
|
|
Loading…
Reference in a new issue