aboutsummaryrefslogtreecommitdiffstats
path: root/setuptools/command/easy_install.py
diff options
context:
space:
mode:
authorJason R. Coombs <jaraco@jaraco.com>2015-01-04 21:31:05 -0500
committerJason R. Coombs <jaraco@jaraco.com>2015-01-04 21:31:05 -0500
commit3ababa264dc404e9f8eae01045a4531b0b5bd692 (patch)
tree6c1a9b609fb941ccbaec4bd973c4c04c99b78c5c /setuptools/command/easy_install.py
parentbd9d38030cee59eb0e2ef9c8fb98fda5b1ff470f (diff)
downloadexternal_python_setuptools-3ababa264dc404e9f8eae01045a4531b0b5bd692.tar.gz
external_python_setuptools-3ababa264dc404e9f8eae01045a4531b0b5bd692.tar.bz2
external_python_setuptools-3ababa264dc404e9f8eae01045a4531b0b5bd692.zip
Update install_scripts to use CommandSpec for generating script headers.
Diffstat (limited to 'setuptools/command/easy_install.py')
-rwxr-xr-xsetuptools/command/easy_install.py13
1 files changed, 13 insertions, 0 deletions
diff --git a/setuptools/command/easy_install.py b/setuptools/command/easy_install.py
index bb0d8694..5667864b 100755
--- a/setuptools/command/easy_install.py
+++ b/setuptools/command/easy_install.py
@@ -1862,6 +1862,19 @@ class CommandSpec(list):
launcher = os.environ.get('__PYVENV_LAUNCHER__', _default)
@classmethod
+ def from_param(cls, param):
+ """
+ Construct a CommandSpec from a parameter to build_scripts, which may
+ be None.
+ """
+ if isinstance(param, cls):
+ return param
+ if param is None:
+ return cls.from_environment()
+ # otherwise, assume it's a string.
+ return cls.from_string(param)
+
+ @classmethod
def from_environment(cls):
return cls.from_string(cls.launcher)