Skip to content

Commit 63f7059

Browse files
committed
Add git commit hash to version when not building wheel
1 parent 1eb43de commit 63f7059

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

setup.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,12 +14,15 @@
1414
# alternative forms of installing, as suggested by README.md).
1515
from setuptools import setup
1616
from setuptools.command.build_py import build_py
17-
from mypy.version import base_version
17+
from mypy.version import base_version, __version__
1818
from mypy import git
1919

2020
git.verify_git_integrity_or_abort(".")
2121

22-
version = base_version
22+
if 'bdist_wheel' in sys.argv[1:]:
23+
version = base_version
24+
else:
25+
version = __version__
2326
description = 'Optional static typing for Python'
2427
long_description = '''
2528
Mypy -- Optional Static Typing for Python

0 commit comments

Comments
 (0)