def make_dir_structure(base_dir):
def maybe_makedir(*args):<EOL><INDENT>p = join(base_dir, *args)<EOL>if exists(p) and not isdir(p):<EOL><INDENT>raise IOError("<STR_LIT>".format(p))<EOL><DEDENT>if not exists(p):<EOL><INDENT>makedirs(p)<EOL><DEDENT><DEDENT>maybe_makedir(DOWNLOAD_DIR)<EOL>maybe_makedir(PACKAGE_DIR)<EOL>maybe_makedir(OLD_DIR)<EOL>
Make the build directory structure.