mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
...
This commit is contained in:
parent
05d9209053
commit
8c6ba0e2fa
@ -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():
|
||||||
|
Loading…
x
Reference in New Issue
Block a user