From 876e0d662f2f4d03ee224c96fb166faacc093c4b Mon Sep 17 00:00:00 2001 From: Joel Goguen Date: Fri, 31 May 2013 21:29:39 -0300 Subject: [PATCH] If the destination directory for calibre_style doesn't exist, create it before trying to copy there --- setup/extensions.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/setup/extensions.py b/setup/extensions.py index a2ed890e71..3b4a37a806 100644 --- a/setup/extensions.py +++ b/setup/extensions.py @@ -535,6 +535,8 @@ class Build(Command): src = (glob.glob('*.so') + glob.glob('release/*.dll') + glob.glob('*.dylib')) 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)) finally: os.chdir(ocwd)