This commit is contained in:
Mario Vilas 2015-03-17 15:02:29 +01:00 committed by Nguyen Anh Quynh
parent 85120cce23
commit 0950943392
1 changed files with 6 additions and 4 deletions

10
bindings/python/setup.py Normal file → Executable file
View File

@ -98,7 +98,7 @@ class custom_build_clib(build_clib):
build_clib.finalize_options(self) build_clib.finalize_options(self)
def build_libraries(self, libraries): def build_libraries(self, libraries):
if SYSTEM == "win32": if SYSTEM in ("win32", "cygwin"):
# if Windows prebuilt library is available, then include it # if Windows prebuilt library is available, then include it
if is_64bits and os.path.exists(PATH_LIB64): if is_64bits and os.path.exists(PATH_LIB64):
SETUP_DATA_FILES.append(PATH_LIB64) SETUP_DATA_FILES.append(PATH_LIB64)
@ -133,10 +133,12 @@ class custom_build_clib(build_clib):
if SYSTEM == "darwin": if SYSTEM == "darwin":
SETUP_DATA_FILES.append("src/libcapstone.dylib") SETUP_DATA_FILES.append("src/libcapstone.dylib")
elif SYSTEM != "win32": elif SYSTEM == "win32":
SETUP_DATA_FILES.append("src/libcapstone.so")
else: # Windows
SETUP_DATA_FILES.append("src/build/capstone.dll") SETUP_DATA_FILES.append("src/build/capstone.dll")
elif SYSTEM == "cygwin":
SETUP_DATA_FILES.append("src/capstone.dll")
else: # Unix
SETUP_DATA_FILES.append("src/libcapstone.so")
os.chdir("..") os.chdir("..")
except: except: