diff --git a/basesetup.py b/basesetup.py index e61a0560e..2b41ce1d4 100644 --- a/basesetup.py +++ b/basesetup.py @@ -325,9 +325,12 @@ def build_static_extension(self, ext): src_tree_output_dir = re.match('build.*(mdtraj.*)', output_dir).group(1) if not os.path.exists(src_tree_output_dir): - # necessary for windows os.makedirs(src_tree_output_dir) + if not os.path.exists(output_dir): + # necessary for windows + os.makedirs(output_dir) + assert os.path.isdir(src_tree_output_dir) self.compiler.create_static_lib(objects,