diff -rupN a/bindings/python/capstone/__init__.py b/bindings/python/capstone/__init__.py --- a/bindings/python/capstone/__init__.py 2018-07-18 09:17:10.000000000 -0700 +++ b/bindings/python/capstone/__init__.py 2018-08-17 15:09:28.988353900 -0700 @@ -207,7 +207,7 @@ if not hasattr(sys.modules[__name__], '_ if sys.platform == 'darwin': _lib = "libcapstone.dylib" elif sys.platform in ('win32', 'cygwin'): - _lib = "capstone.dll" + _lib = "libcapstone.dll" else: _lib = "libcapstone.so" diff -rupN a/bindings/python/setup.py b/bindings/python/setup.py --- a/bindings/python/setup.py 2018-07-18 09:17:10.000000000 -0700 +++ b/bindings/python/setup.py 2018-08-17 16:11:44.551487800 -0700 @@ -60,8 +60,8 @@ if SYSTEM == 'darwin': LIBRARY_FILE = "libcapstone.dylib" STATIC_LIBRARY_FILE = 'libcapstone.a' elif SYSTEM in ('win32', 'cygwin'): - VERSIONED_LIBRARY_FILE = "capstone.dll" - LIBRARY_FILE = "capstone.dll" + VERSIONED_LIBRARY_FILE = "libcapstone.dll" + LIBRARY_FILE = "libcapstone.dll" STATIC_LIBRARY_FILE = None else: VERSIONED_LIBRARY_FILE = "libcapstone.so.4" @@ -157,7 +157,10 @@ class custom_sdist(sdist): class custom_build(build): def run(self): if 'LIBCAPSTONE_PATH' in os.environ: - log.info('Skipping building C extensions since LIBCAPSTONE_PATH is set') + log.info('Copying existing libcapstone to Python lib directory') + clean_bins() + os.mkdir(LIBS_DIR) + shutil.copy(os.environ['LIBCAPSTONE_PATH'], LIBS_DIR) else: log.info('Building C extensions') build_libraries()