From a86b39d07884386f48c3fb91739f3609001c617e Mon Sep 17 00:00:00 2001 From: Nick Hall Date: Mon, 31 Dec 2012 16:41:00 +0000 Subject: [PATCH] Improve check to prevent overwriting const.py svn: r20910 --- setup.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/setup.py b/setup.py index 96d674273..b8cd4cdfd 100644 --- a/setup.py +++ b/setup.py @@ -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')