aboutsummaryrefslogtreecommitdiffstats
path: root/setuptools/command/easy_install.py
diff options
context:
space:
mode:
authorPJ Eby <distutils-sig@python.org>2005-12-26 19:21:41 +0000
committerPJ Eby <distutils-sig@python.org>2005-12-26 19:21:41 +0000
commit199f4f67ed81ef2f4fa3130bc6be0654e0d6dfd8 (patch)
treee8e77fa452d269d5e4928a12407f266735f5f79c /setuptools/command/easy_install.py
parentf3bed845a331cf3dde69997fc9235b32f2b09c2f (diff)
downloadexternal_python_setuptools-199f4f67ed81ef2f4fa3130bc6be0654e0d6dfd8.tar.gz
external_python_setuptools-199f4f67ed81ef2f4fa3130bc6be0654e0d6dfd8.tar.bz2
external_python_setuptools-199f4f67ed81ef2f4fa3130bc6be0654e0d6dfd8.zip
Make the install_scripts command respect the "build_scripts -e"
option when installing generated scripts using the --single-version-externally-managed option. --HG-- branch : setuptools extra : convert_revision : svn%3A6015fed2-1504-0410-9fe1-9d1591cc4771/sandbox/trunk/setuptools%4041815
Diffstat (limited to 'setuptools/command/easy_install.py')
-rwxr-xr-xsetuptools/command/easy_install.py10
1 files changed, 5 insertions, 5 deletions
diff --git a/setuptools/command/easy_install.py b/setuptools/command/easy_install.py
index 40504afc..c8ad0e50 100755
--- a/setuptools/command/easy_install.py
+++ b/setuptools/command/easy_install.py
@@ -9,7 +9,6 @@ file, or visit the `EasyInstall home page`__.
__ http://peak.telecommunity.com/DevCenter/EasyInstall
"""
-
import sys, os.path, zipimport, shutil, tempfile, zipfile, re, stat
from glob import glob
from setuptools import Command
@@ -23,6 +22,7 @@ from setuptools.package_index import PackageIndex, parse_bdist_wininst
from setuptools.package_index import URL_SCHEME
from setuptools.command import bdist_egg, egg_info
from pkg_resources import *
+sys_executable = os.path.normpath(sys.executable)
__all__ = [
'samefile', 'easy_install', 'PthDistributions', 'extract_wininst_cfg',
@@ -1118,7 +1118,7 @@ class PthDistributions(Environment):
Environment.remove(self,dist)
-def get_script_header(script_text):
+def get_script_header(script_text, executable=sys_executable):
"""Create a #! line, getting options (if any) from script_text"""
from distutils.command.build_scripts import first_line_re
first, rest = (script_text+'\n').split('\n',1)
@@ -1129,7 +1129,6 @@ def get_script_header(script_text):
options = match.group(1) or ''
if options:
options = ' '+options
- executable = os.path.normpath(sys.executable)
return "#!%(executable)s%(options)s\n" % locals()
def main(argv=None, **kw):
@@ -1146,10 +1145,11 @@ def auto_chmod(func, arg, exc):
exc = sys.exc_info()
raise exc[0], (exc[1][0], exc[1][1] + (" %s %s" % (func,arg)))
-def get_script_args(dist):
+
+def get_script_args(dist, executable=sys_executable):
"""Yield write_script() argument tuples for a distribution's entrypoints"""
spec = str(dist.as_requirement())
- header = get_script_header("")
+ header = get_script_header("", executable)
for group in 'console_scripts', 'gui_scripts':
for name,ep in dist.get_entry_map(group).items():
script_text = (