This commit is contained in:
Kovid Goyal 2016-06-25 12:49:02 +05:30
parent 05d9209053
commit 8c6ba0e2fa

View File

@ -25,13 +25,18 @@ sys.running_from_setup = True
__version__ = __appname__ = modules = functions = basenames = scripts = None __version__ = __appname__ = modules = functions = basenames = scripts = None
_cache_dir_built = False
def build_cache_dir(): def build_cache_dir():
global _cache_dir_built
ans = os.path.join(os.path.dirname(SRC), '.build-cache') ans = os.path.join(os.path.dirname(SRC), '.build-cache')
try: if not _cache_dir_built:
os.mkdir(ans) _cache_dir_built = True
except EnvironmentError as err: try:
if err.errno != errno.EEXIST: os.mkdir(ans)
raise except EnvironmentError as err:
if err.errno != errno.EEXIST:
raise
return ans return ans
def require_git_master(): def require_git_master():