From e535afce22c9f290eb726a69b0e4fbdee5aff9ca Mon Sep 17 00:00:00 2001 From: giovannibajo Date: Mon, 6 Feb 2006 18:01:23 +0000 Subject: [PATCH] Setup UPX properly with Python 2.4 under Windows git-svn-id: http://svn.pyinstaller.org/trunk@251 8dd32b29-ccff-0310-8a9a-9233e24343b1 --- Build.py | 13 +++++++++++++ doc/CHANGES.txt | 3 +++ 2 files changed, 16 insertions(+) diff --git a/Build.py b/Build.py index 47643ff..279baa8 100755 --- a/Build.py +++ b/Build.py @@ -42,6 +42,19 @@ if config['pythonVersion'] != sys.version: if config['hasRsrcUpdate']: import icon, versionInfo +def setupUPXFlags(): + f = os.environ.get("UPX", "") + is24 = hasattr(sys, "version_info") and sys.version_info[:2] >= (2,4) + if iswin and is24: + # Binaries built with Visual Studio 7.1 require --strip-loadconf + # or they won't compress. + f = "--strip-loadconf " + f + f = "--best " + f + os.environ["UPX"] = f + +if config['hasUPX']: + setupUPXFlags() + def build(spec): global SPECPATH, BUILDPATH, WARNFILE, rthooks rthooks = eval(open(os.path.join(HOMEPATH, 'rthooks.dat'), 'r').read()) diff --git a/doc/CHANGES.txt b/doc/CHANGES.txt index 6b37c72..e4a12f6 100644 --- a/doc/CHANGES.txt +++ b/doc/CHANGES.txt @@ -22,6 +22,9 @@ Current changes since PyInstaller 1.0 single-file executables, even when using the newest Python version! + (Linux) Ignore linux-gate.so while calculating dependencies (fix provided by Vikram Aggarwal). + + (Windows) With Python 2.4, setup UPX properly so to be able to compress + binaries generated with Visual Studio .NET 2003 (such as most of the + extensions). PyInstaller 1.0 (with respect to McMillan's Python Installer 5b5):