python: setup.py should not install the core, and no need to put BUILD_CORE_ONLY into config.mk

This commit is contained in:
Nguyen Anh Quynh 2015-01-28 05:05:12 +08:00
parent 35d4e449e1
commit 1de34c1aef

View File

@ -101,21 +101,8 @@ class custom_build_clib(build_clib):
os.chdir("src")
# generate autoconfig.mk
os.system("echo BUILD_CORE_ONLY ?= yes >> config.mk")
os.chmod("make.sh", stat.S_IREAD|stat.S_IEXEC)
os.system("./make.sh install")
# copy core library to installed directory
shared_lib_extension = "so" if "linux2" in SYSTEM else "dylib"
shared_lib = "libcapstone.%s" % shared_lib_extension
target_lib_path = os.path.join("../build/lib/capstone", shared_lib)
print "%s -> %s" % (shared_lib, target_lib_path)
shutil.copyfile(shared_lib, target_lib_path)
os.system("BUILD_CORE_ONLY=yes ./make.sh")
os.chdir("..")