3
0
Fork 0
mirror of https://github.com/Z3Prover/z3 synced 2025-04-13 04:28:17 +00:00

Add environment variable for controlling version suffixes

This commit is contained in:
Audrey Dutcher 2018-07-28 18:11:11 -07:00
parent a7f7872f45
commit d74edbcb2b

View file

@ -46,13 +46,14 @@ def _clean_bins():
shutil.rmtree(HEADERS_DIR, ignore_errors=True)
def _z3_version():
post = os.getenv('Z3_VERSION_SUFFIX', '')
fn = os.path.join(SRC_DIR, 'scripts', 'mk_project.py')
if os.path.exists(fn):
if os.path.exists(fn):
with open(fn) as f:
for line in f:
n = re.match(".*set_version\((.*), (.*), (.*), (.*)\).*", line)
if not n is None:
return n.group(1) + '.' + n.group(2) + '.' + n.group(3) + '.' + n.group(4)
return n.group(1) + '.' + n.group(2) + '.' + n.group(3) + '.' + n.group(4) + post
return "?.?.?.?"
def _configure_z3():