From fb050b68ce6014604e1531968a3ef7d47bf1da18 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Tue, 13 Aug 2013 23:34:30 -0400 Subject: Use .pya extension instead of simply .py to avoid creating scripts that are importable as modules. --- setuptools/command/easy_install.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/setuptools/command/easy_install.py b/setuptools/command/easy_install.py index 6322c9b6..53f2e7cf 100755 --- a/setuptools/command/easy_install.py +++ b/setuptools/command/easy_install.py @@ -1844,8 +1844,8 @@ class WindowsScriptWriter(ScriptWriter): @classmethod def _get_script_args(cls, type_, name, header, script_text): "For Windows, add a .py extension" - ext = dict(console='.py', gui='.pyw')[type_] - old = ['.py', '-script.py', '.pyc', '.pyo', '.pyw', '.exe'] + ext = dict(console='.pya', gui='.pyw')[type_] + old = ['.pya', '.py', '-script.py', '.pyc', '.pyo', '.pyw', '.exe'] old.remove(ext) header = cls._adjust_header(type_, header) blockers = [name+x for x in old] -- cgit v1.2.1