forked from M-Labs/artiq
support overriding versioneer
This commit is contained in:
parent
861ad0a62c
commit
40a0cf806d
@ -481,6 +481,12 @@ def get_versions():
|
||||
# py2exe/bbfreeze/non-CPython implementations don't do __file__, in which
|
||||
# case we can only use expanded keywords.
|
||||
|
||||
override = os.getenv("VERSIONEER_OVERRIDE")
|
||||
if override:
|
||||
return {"version": override, "full-revisionid": None,
|
||||
"dirty": None,
|
||||
"error": None, "date": None}
|
||||
|
||||
cfg = get_config()
|
||||
verbose = cfg.verbose
|
||||
|
||||
|
@ -901,6 +901,12 @@ def get_versions():
|
||||
# py2exe/bbfreeze/non-CPython implementations don't do __file__, in which
|
||||
# case we can only use expanded keywords.
|
||||
|
||||
override = os.getenv("VERSIONEER_OVERRIDE")
|
||||
if override:
|
||||
return {"version": override, "full-revisionid": None,
|
||||
"dirty": None,
|
||||
"error": None, "date": None}
|
||||
|
||||
cfg = get_config()
|
||||
verbose = cfg.verbose
|
||||
|
||||
@ -1404,6 +1410,12 @@ def get_versions(verbose=False):
|
||||
|
||||
Returns dict with two keys: 'version' and 'full'.
|
||||
"""
|
||||
override = os.getenv("VERSIONEER_OVERRIDE")
|
||||
if override:
|
||||
return {"version": override, "full-revisionid": None,
|
||||
"dirty": None,
|
||||
"error": None, "date": None}
|
||||
|
||||
if "versioneer" in sys.modules:
|
||||
# see the discussion in cmdclass.py:get_cmdclass()
|
||||
del sys.modules["versioneer"]
|
||||
|
Loading…
Reference in New Issue
Block a user