mirror of
https://github.com/capstone-engine/capstone.git
synced 2024-11-27 15:30:33 +00:00
Add ability to copy prebuilt libraries from prebuilt directory during python build
This commit is contained in:
parent
e22577e42d
commit
9d3e929ae6
0
bindings/python/prebuilt/.gitkeep
Normal file
0
bindings/python/prebuilt/.gitkeep
Normal file
@ -117,6 +117,14 @@ def build_libraries():
|
||||
# copy public headers
|
||||
shutil.copytree(os.path.join(BUILD_DIR, 'include'), os.path.join(HEADERS_DIR, 'capstone'))
|
||||
|
||||
# if prebuilt libraries are available, use those and cancel build
|
||||
if os.path.exists(os.path.join(ROOT_DIR, 'prebuilt', LIBRARY_FILE)) and \
|
||||
(not STATIC_LIBRARY_FILE or os.path.exists(os.path.join(ROOT_DIR, 'prebuilt', STATIC_LIBRARY_FILE))):
|
||||
shutil.copy(os.path.join(ROOT_DIR, 'prebuilt', LIBRARY_FILE), LIBS_DIR)
|
||||
if STATIC_LIBRARY_FILE is not None:
|
||||
shutil.copy(os.path.join(ROOT_DIR, 'prebuilt', STATIC_LIBRARY_FILE), LIBS_DIR)
|
||||
return
|
||||
|
||||
os.chdir(BUILD_DIR)
|
||||
|
||||
# platform description refers at https://docs.python.org/2/library/sys.html#sys.platform
|
||||
|
Loading…
Reference in New Issue
Block a user