summaryrefslogtreecommitdiff
path: root/setuptools/command/install_scripts.py
diff options
context:
space:
mode:
authorJason R. Coombs <jaraco@jaraco.com>2014-06-22 09:23:42 -0400
committerJason R. Coombs <jaraco@jaraco.com>2014-06-22 09:23:42 -0400
commitf6b5e29275f9a54bda847de79760f24a613a3d28 (patch)
tree6669f1ad56d804b1018e2412480ff255d991fc20 /setuptools/command/install_scripts.py
parent97fbee720d6dd5bda37dc2a945d60ec056d49d9e (diff)
parent8e3f9d3253d1d0fb820dad4249d5110d017595c1 (diff)
downloadpython-setuptools-git-f6b5e29275f9a54bda847de79760f24a613a3d28.tar.gz
Merge Pull Request 67 from bb://agronholm/bitbucket
Diffstat (limited to 'setuptools/command/install_scripts.py')
-rwxr-xr-xsetuptools/command/install_scripts.py13
1 files changed, 8 insertions, 5 deletions
diff --git a/setuptools/command/install_scripts.py b/setuptools/command/install_scripts.py
index ac373193..eb79fa3c 100755
--- a/setuptools/command/install_scripts.py
+++ b/setuptools/command/install_scripts.py
@@ -1,7 +1,9 @@
+from distutils import log
import distutils.command.install_scripts as orig
-from pkg_resources import Distribution, PathMetadata, ensure_directory
import os
-from distutils import log
+
+from pkg_resources import Distribution, PathMetadata, ensure_directory
+
class install_scripts(orig.install_scripts):
"""Do normal script install, plus any egg_info wrapper scripts"""
@@ -29,7 +31,7 @@ class install_scripts(orig.install_scripts):
ei_cmd.egg_name, ei_cmd.egg_version,
)
bs_cmd = self.get_finalized_command('build_scripts')
- executable = getattr(bs_cmd,'executable',sys_executable)
+ executable = getattr(bs_cmd, 'executable', sys_executable)
is_wininst = getattr(
self.get_finalized_command("bdist_wininst"), '_is_running', False
)
@@ -39,6 +41,7 @@ class install_scripts(orig.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, 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)
@@ -46,7 +49,7 @@ class install_scripts(orig.install_scripts):
mask = current_umask()
if not self.dry_run:
ensure_directory(target)
- f = open(target,"w"+mode)
+ f = open(target, "w" + mode)
f.write(contents)
f.close()
- chmod(target, 0o777-mask)
+ chmod(target, 0o777 - mask)