From 9f87dfd54b1d30a9e09422666e23fdc509269f6f Mon Sep 17 00:00:00 2001 From: Nick Hall Date: Mon, 31 Dec 2012 18:18:20 +0000 Subject: [PATCH] Improve check to prevent overwriting const.py svn: r20911 --- setup.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/setup.py b/setup.py index c17802824..fa4817ab9 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')