If the destination directory for calibre_style doesn't exist, create it before trying to copy there

This commit is contained in:
Joel Goguen 2013-05-31 21:29:39 -03:00
parent 26a9b30db1
commit 876e0d662f

View File

@ -535,6 +535,8 @@ class Build(Command):
src = (glob.glob('*.so') + glob.glob('release/*.dll') + src = (glob.glob('*.so') + glob.glob('release/*.dll') +
glob.glob('*.dylib')) glob.glob('*.dylib'))
ext = 'pyd' if iswindows else 'so' ext = 'pyd' if iswindows else 'so'
if not os.path.exists(dest):
os.makedirs(dest)
shutil.copy2(src[0], self.j(dest, 'calibre_style.'+ext)) shutil.copy2(src[0], self.j(dest, 'calibre_style.'+ext))
finally: finally:
os.chdir(ocwd) os.chdir(ocwd)