mirror of
https://github.com/kennethreitz-archive/pyinstaller.git
synced 2026-06-05 23:50:17 +00:00
Setup UPX properly with Python 2.4 under Windows
git-svn-id: http://svn.pyinstaller.org/trunk@251 8dd32b29-ccff-0310-8a9a-9233e24343b1
This commit is contained in:
@@ -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())
|
||||
|
||||
@@ -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):
|
||||
|
||||
Reference in New Issue
Block a user