diff options
| author | Jason R. Coombs <jaraco@jaraco.com> | 2013-08-13 23:48:42 -0400 |
|---|---|---|
| committer | Jason R. Coombs <jaraco@jaraco.com> | 2013-08-13 23:48:42 -0400 |
| commit | bc2c024002ed1b30a5a749d178d8f998bb417512 (patch) | |
| tree | 2c3afe85b90e8846ad0d540c5656698e149613fb /setuptools/command | |
| parent | fb050b68ce6014604e1531968a3ef7d47bf1da18 (diff) | |
| download | python-setuptools-bitbucket-bc2c024002ed1b30a5a749d178d8f998bb417512.tar.gz | |
Warn when scripts are installed but PATHEXT isn't set
Diffstat (limited to 'setuptools/command')
| -rwxr-xr-x | setuptools/command/easy_install.py | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/setuptools/command/easy_install.py b/setuptools/command/easy_install.py index 53f2e7cf..a0171e3d 100755 --- a/setuptools/command/easy_install.py +++ b/setuptools/command/easy_install.py @@ -23,6 +23,7 @@ import stat import random import platform import textwrap +import warnings from glob import glob from distutils import log, dir_util @@ -1845,6 +1846,9 @@ class WindowsScriptWriter(ScriptWriter): def _get_script_args(cls, type_, name, header, script_text): "For Windows, add a .py extension" ext = dict(console='.pya', gui='.pyw')[type_] + if ext not in os.environ['PATHEXT'].lower().split(';'): + warnings.warn("%s not listed in PATHEXT; scripts will not be " + "recognized as executables." % ext, UserWarning) old = ['.pya', '.py', '-script.py', '.pyc', '.pyo', '.pyw', '.exe'] old.remove(ext) header = cls._adjust_header(type_, header) |
