Improve check to prevent overwriting const.py

svn: r20910
This commit is contained in:
Nick Hall 2012-12-31 16:41:00 +00:00
parent b2b4b39d03
commit a86b39d078

View File

@ -244,7 +244,7 @@ def write_const_py(command):
locale_dir = os.path.join(command.install_data, 'share', 'locale')
else:
#in build
if os.access(const_py, os.F_OK):
if 'install' in command.distribution.command_obj:
# Prevent overwriting version created during install
return
locale_dir = os.path.join(command.build_base, 'mo')