Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

setup.py: copy generated python files correctly #5975

Merged
merged 1 commit into from
Apr 13, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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