Allow dlls to be copied out of prebuilt directory

This commit is contained in:
Andrew Dutcher 2016-11-16 06:51:42 -08:00
parent 876570c8d7
commit 188a1d78d3
2 changed files with 9 additions and 0 deletions

View file

View file

@ -106,8 +106,11 @@ def build_libraries():
got_all = True
for dll in ALL_WINDOWS_DLLS:
dllpath = os.path.join(sys.prefix, 'bin', dll)
dllpath2 = os.path.join(ROOT_DIR, 'prebuilt', dll)
if os.path.exists(dllpath):
shutil.copy(dllpath, LIBS_DIR)
elif os.path.exists(dllpath2):
shutil.copy(dllpath2, LIBS_DIR)
else:
got_all = False
@ -117,6 +120,12 @@ def build_libraries():
if 'upload' in sys.argv:
sys.exit(1)
# check if a prebuilt library exists
# if so, use it instead of building
if os.path.exists(os.path.join(ROOT_DIR, 'prebuilt', LIBRARY_FILE)):
shutil.copy(os.path.join(ROOT_DIR, 'prebuild', LIBRARY_FILE), LIBS_DIR)
return
# otherwise, build!!
os.chdir(BUILD_DIR)