mirror of
https://github.com/Z3Prover/z3
synced 2025-04-06 17:44:08 +00:00
Merge branch 'master' of https://github.com/Z3Prover/z3
This commit is contained in:
commit
e96d93ee42
|
@ -171,32 +171,23 @@ def mk_dist_dir():
|
|||
if is_verbose():
|
||||
print("Generated distribution folder at '%s'" % dist_path)
|
||||
|
||||
ZIPOUT = None
|
||||
|
||||
def mk_zip_visitor(pattern, dir, files):
|
||||
for filename in files:
|
||||
if fnmatch(filename, pattern):
|
||||
fname = os.path.join(dir, filename)
|
||||
if not os.path.isdir(fname):
|
||||
ZIPOUT.write(fname)
|
||||
|
||||
def get_dist_path():
|
||||
return get_z3_name()
|
||||
|
||||
def mk_zip():
|
||||
global ZIPOUT
|
||||
dist_path = get_dist_path()
|
||||
old = os.getcwd()
|
||||
try:
|
||||
os.chdir(DIST_DIR)
|
||||
zfname = '%s.zip' % dist_path
|
||||
ZIPOUT = zipfile.ZipFile(zfname, 'w', zipfile.ZIP_DEFLATED)
|
||||
os.walk(dist_path, mk_zip_visitor, '*')
|
||||
zipout = zipfile.ZipFile(zfname, 'w', zipfile.ZIP_DEFLATED)
|
||||
for root, dirs, files in os.walk(dist_path):
|
||||
for f in files:
|
||||
zipout.write(os.path.join(root, f))
|
||||
if is_verbose():
|
||||
print("Generated '%s'" % zfname)
|
||||
except:
|
||||
pass
|
||||
ZIPOUT = None
|
||||
os.chdir(old)
|
||||
|
||||
def cp_license():
|
||||
|
|
|
@ -510,15 +510,11 @@ def dos2unix(fname):
|
|||
if is_verbose():
|
||||
print("dos2unix '%s'" % fname)
|
||||
|
||||
def dos2unix_tree_core(pattern, dir, files):
|
||||
for filename in files:
|
||||
if fnmatch(filename, pattern):
|
||||
fname = os.path.join(dir, filename)
|
||||
if not os.path.isdir(fname):
|
||||
dos2unix(fname)
|
||||
|
||||
def dos2unix_tree():
|
||||
os.walk('src', dos2unix_tree_core, '*')
|
||||
for root, dirs, files in os.walk('src'):
|
||||
for f in files:
|
||||
dos2unix(os.path.join(root, f))
|
||||
|
||||
|
||||
def check_eol():
|
||||
if not IS_WINDOWS:
|
||||
|
|
|
@ -186,32 +186,23 @@ def mk_dist_dir():
|
|||
mk_dist_dir_core(False)
|
||||
mk_dist_dir_core(True)
|
||||
|
||||
ZIPOUT = None
|
||||
|
||||
def mk_zip_visitor(pattern, dir, files):
|
||||
for filename in files:
|
||||
if fnmatch(filename, pattern):
|
||||
fname = os.path.join(dir, filename)
|
||||
if not os.path.isdir(fname):
|
||||
ZIPOUT.write(fname)
|
||||
|
||||
def get_dist_path(x64):
|
||||
return get_z3_name(x64)
|
||||
|
||||
def mk_zip_core(x64):
|
||||
global ZIPOUT
|
||||
dist_path = get_dist_path(x64)
|
||||
old = os.getcwd()
|
||||
try:
|
||||
os.chdir(DIST_DIR)
|
||||
zfname = '%s.zip' % dist_path
|
||||
ZIPOUT = zipfile.ZipFile(zfname, 'w', zipfile.ZIP_DEFLATED)
|
||||
os.walk(dist_path, mk_zip_visitor, '*')
|
||||
zipout = zipfile.ZipFile(zfname, 'w', zipfile.ZIP_DEFLATED)
|
||||
for root, dirs, files in os.walk(dist_path):
|
||||
for f in files:
|
||||
zipout.write(os.path.join(root, f))
|
||||
if is_verbose():
|
||||
print("Generated '%s'" % zfname)
|
||||
except:
|
||||
pass
|
||||
ZIPOUT = None
|
||||
os.chdir(old)
|
||||
|
||||
# Create a zip file for each platform
|
||||
|
|
Loading…
Reference in a new issue