From 483942c1a57a06b5b6820895674b38dfe5ec1200 Mon Sep 17 00:00:00 2001 From: Leonardo de Moura Date: Sun, 28 Oct 2012 12:19:34 -0700 Subject: [PATCH] python example Signed-off-by: Leonardo de Moura --- scripts/mk_make.py | 1 + scripts/mk_util.py | 7 +++++++ 2 files changed, 8 insertions(+) diff --git a/scripts/mk_make.py b/scripts/mk_make.py index 2bf58a6b6..7e1cc79bb 100644 --- a/scripts/mk_make.py +++ b/scripts/mk_make.py @@ -78,6 +78,7 @@ add_cpp_example('cpp_example', 'c++') add_c_example('c_example', 'c') add_c_example('maxsat') add_dotnet_example('dotnet_example', 'dotnet') +add_z3py_example('python') update_version(4, 2, 0, 0) mk_auto_src() diff --git a/scripts/mk_util.py b/scripts/mk_util.py index eb63ea5f5..75075d31f 100644 --- a/scripts/mk_util.py +++ b/scripts/mk_util.py @@ -200,6 +200,13 @@ def set_z3py_dir(p): if VERBOSE: print "Python bindinds directory was detected." +def add_z3py_example(p): + full = '%s/%s' % (EXAMPLE_DIR, p) + for py in filter(lambda f: f.endswith('.py'), os.listdir(full)): + shutil.copyfile('%s/%s' % (full, py), '%s/%s' % (BUILD_DIR, py)) + if is_verbose(): + print "Copied Z3Py example '%s' to '%s'" % (py, BUILD_DIR) + _UNIQ_ID = 0 def mk_fresh_name(prefix):