Skip to content

Commit

Permalink
setup.py: copy generated python files correctly (#5975)
Browse files Browse the repository at this point in the history
  • Loading branch information
rhelmot authored Apr 13, 2022
1 parent b264e6c commit 032768b
Showing 1 changed file with 4 additions and 10 deletions.
14 changes: 4 additions & 10 deletions src/api/python/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -154,16 +154,10 @@ def _copy_bins():

_clean_bins()

python_dir = None
if RELEASE_DIR is not None:
python_dir = os.path.join(RELEASE_DIR, 'bin', 'python')
elif SRC_DIR == SRC_DIR_LOCAL:
python_dir = os.path.join(SRC_DIR, 'src', 'api', 'python')
if python_dir is not None:
py_z3_build_dir = os.path.join(BUILD_DIR, 'python', 'z3')
root_z3_dir = os.path.join(ROOT_DIR, 'z3')
shutil.copy(os.path.join(py_z3_build_dir, 'z3core.py'), root_z3_dir)
shutil.copy(os.path.join(py_z3_build_dir, 'z3consts.py'), root_z3_dir)
py_z3_build_dir = os.path.join(BUILD_DIR, 'python', 'z3')
root_z3_dir = os.path.join(ROOT_DIR, 'z3')
shutil.copy(os.path.join(py_z3_build_dir, 'z3core.py'), root_z3_dir)
shutil.copy(os.path.join(py_z3_build_dir, 'z3consts.py'), root_z3_dir)

# STEP 2: Copy the shared library, the executable and the headers

Expand Down

0 comments on commit 032768b

Please sign in to comment.