aboutsummaryrefslogtreecommitdiffstats
path: root/setuptools/command/easy_install.py
diff options
context:
space:
mode:
authorJason R. Coombs <jaraco@jaraco.com>2013-08-13 23:48:42 -0400
committerJason R. Coombs <jaraco@jaraco.com>2013-08-13 23:48:42 -0400
commit372be090c5acab13a5cc88893c50c09a7b7ec56e (patch)
tree409a3336c6e01529c994eb131d6c4e901575cc23 /setuptools/command/easy_install.py
parent78baec3378b60814b0062d4f89a9fe6bec41885a (diff)
downloadexternal_python_setuptools-372be090c5acab13a5cc88893c50c09a7b7ec56e.tar.gz
external_python_setuptools-372be090c5acab13a5cc88893c50c09a7b7ec56e.tar.bz2
external_python_setuptools-372be090c5acab13a5cc88893c50c09a7b7ec56e.zip
Warn when scripts are installed but PATHEXT isn't set
--HG-- extra : histedit_source : a1c329f92ee71a707955e352b63987af9de6e120
Diffstat (limited to 'setuptools/command/easy_install.py')
-rwxr-xr-xsetuptools/command/easy_install.py4
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)