mirror of
https://github.com/Z3Prover/z3
synced 2025-06-06 14:13:23 +00:00
Include Python API files in distributions.
This commit is contained in:
parent
ef9230d8f8
commit
7f923c6a33
5 changed files with 94 additions and 10 deletions
|
@ -26,6 +26,7 @@ DOTNET_ENABLED=True
|
|||
DOTNET_KEY_FILE=None
|
||||
JAVA_ENABLED=True
|
||||
GIT_HASH=False
|
||||
PYTHON_ENABLED=True
|
||||
|
||||
def set_verbose(flag):
|
||||
global VERBOSE
|
||||
|
@ -55,6 +56,7 @@ def display_help():
|
|||
print(" --nodotnet do not include .NET bindings in the binary distribution files.")
|
||||
print(" --dotnet-key=<file> sign the .NET assembly with the private key in <file>.")
|
||||
print(" --nojava do not include Java bindings in the binary distribution files.")
|
||||
print(" --nopython do not include Python bindings in the binary distribution files.")
|
||||
print(" --githash include git hash in the Zip file.")
|
||||
exit(0)
|
||||
|
||||
|
@ -69,7 +71,8 @@ def parse_options():
|
|||
'nojava',
|
||||
'nodotnet',
|
||||
'dotnet-key=',
|
||||
'githash'
|
||||
'githash',
|
||||
'nopython'
|
||||
])
|
||||
for opt, arg in options:
|
||||
if opt in ('-b', '--build'):
|
||||
|
@ -84,6 +87,8 @@ def parse_options():
|
|||
FORCE_MK = True
|
||||
elif opt == '--nodotnet':
|
||||
DOTNET_ENABLED = False
|
||||
elif opt == '--nopython':
|
||||
PYTHON_ENABLED = False
|
||||
elif opt == '--dotnet-key':
|
||||
DOTNET_KEY_FILE = arg
|
||||
elif opt == '--nojava':
|
||||
|
@ -111,6 +116,8 @@ def mk_build_dir(path):
|
|||
if GIT_HASH:
|
||||
opts.append('--githash=%s' % mk_util.git_hash())
|
||||
opts.append('--git-describe')
|
||||
if PYTHON_ENABLED:
|
||||
opts.append('--python')
|
||||
if subprocess.call(opts) != 0:
|
||||
raise MKException("Failed to generate build directory at '%s'" % path)
|
||||
|
||||
|
@ -181,6 +188,7 @@ def mk_dist_dir():
|
|||
mk_util.DOTNET_ENABLED = DOTNET_ENABLED
|
||||
mk_util.DOTNET_KEY_FILE = DOTNET_KEY_FILE
|
||||
mk_util.JAVA_ENABLED = JAVA_ENABLED
|
||||
mk_util.PYTHON_ENABLED = PYTHON_ENABLED
|
||||
mk_unix_dist(build_path, dist_path)
|
||||
if is_verbose():
|
||||
print("Generated distribution folder at '%s'" % dist_path)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue