diff options
author | Jason R. Coombs <jaraco@jaraco.com> | 2013-06-18 08:44:39 -0500 |
---|---|---|
committer | Jason R. Coombs <jaraco@jaraco.com> | 2013-06-18 08:44:39 -0500 |
commit | fb8c7cf0abc9ce58b8a6f0621c0a9909fb9b8eff (patch) | |
tree | 95cae06260f49e011fc045000fc1531dbc0e0cf5 /setuptools/command/install_scripts.py | |
parent | 32ba6930fa97bbeac9392cac3ed49aac87fd1018 (diff) | |
parent | db678072da41b75408680dab3e23c1b76573bf1d (diff) | |
download | python-setuptools-git-fb8c7cf0abc9ce58b8a6f0621c0a9909fb9b8eff.tar.gz |
Merge with upstream
--HG--
branch : distribute
Diffstat (limited to 'setuptools/command/install_scripts.py')
-rwxr-xr-x | setuptools/command/install_scripts.py | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/setuptools/command/install_scripts.py b/setuptools/command/install_scripts.py index 251190ba..105dabca 100755 --- a/setuptools/command/install_scripts.py +++ b/setuptools/command/install_scripts.py @@ -39,15 +39,16 @@ class install_scripts(_install_scripts): def write_script(self, script_name, contents, mode="t", *ignored): """Write an executable file to the scripts directory""" - from setuptools.command.easy_install import chmod + from setuptools.command.easy_install import chmod, current_umask log.info("Installing %s script to %s", script_name, self.install_dir) target = os.path.join(self.install_dir, script_name) self.outfiles.append(target) + mask = current_umask() if not self.dry_run: ensure_directory(target) f = open(target,"w"+mode) f.write(contents) f.close() - chmod(target,0x1ED) # 0755 + chmod(target, 0x1FF-mask) # 0777 |