From 9bb09bff623c855a2cf06f8618293f2053933664 Mon Sep 17 00:00:00 2001 From: Brian Wickman Date: Fri, 24 Apr 2015 11:47:03 -0700 Subject: [PATCH 1/2] Fix installer. --- pex/installer.py | 1 + 1 file changed, 1 insertion(+) diff --git a/pex/installer.py b/pex/installer.py index 38958a6b4..17f497055 100644 --- a/pex/installer.py +++ b/pex/installer.py @@ -35,6 +35,7 @@ class InstallerBase(object): SETUP_BOOTSTRAP_MODULE = "sys.path.insert(0, %(path)r); import %(module)s" SETUP_BOOTSTRAP_FOOTER = """ __file__ = 'setup.py' +sys.argv[0] = 'setup.py' exec(compile(open(__file__).read().replace('\\r\\n', '\\n'), __file__, 'exec')) """ From f1310dbe3771b4cb964197a20e6f31e2740bd7bc Mon Sep 17 00:00:00 2001 From: Brian Wickman Date: Fri, 24 Apr 2015 11:50:58 -0700 Subject: [PATCH 2/2] Remove crutch from pex.testing that was pasting over Packager bug. --- pex/testing.py | 3 --- 1 file changed, 3 deletions(-) diff --git a/pex/testing.py b/pex/testing.py index 7d0731086..54c14c08a 100644 --- a/pex/testing.py +++ b/pex/testing.py @@ -79,9 +79,6 @@ def write_zipfile(directory, dest, reverse=False): package_data={'my_package': ['package_data/*.dat']}, ) '''), - 'MANIFEST.in': dedent(''' - include setup.py - '''), 'scripts/hello_world': '#!/usr/bin/env python\nprint("hello world!")\n', 'scripts/shell_script': '#!/usr/bin/env bash\necho hello world\n', 'my_package/__init__.py': 0,