[javascriptlint-commit] SF.net SVN: javascriptlint:[288] trunk/setup.py
Status: Beta
Brought to you by:
matthiasmiller
|
From: <mat...@us...> - 2009-10-26 02:46:47
|
Revision: 288
http://javascriptlint.svn.sourceforge.net/javascriptlint/?rev=288&view=rev
Author: matthiasmiller
Date: 2009-10-26 02:46:37 +0000 (Mon, 26 Oct 2009)
Log Message:
-----------
Augment the py2exe build to run the executable through upx.
Modified Paths:
--------------
trunk/setup.py
Modified: trunk/setup.py
===================================================================
--- trunk/setup.py 2009-10-22 15:39:55 UTC (rev 287)
+++ trunk/setup.py 2009-10-26 02:46:37 UTC (rev 288)
@@ -7,7 +7,7 @@
import subprocess
import sys
-class _MakefileError(Exception):
+class _BuildError(Exception):
pass
def _runmakefiles(distutils_dir, build_opt=1, target=None):
@@ -22,12 +22,12 @@
ret = subprocess.call(['make', '-f', 'Makefile.ref', '-C',
'spidermonkey/src', 'XCFLAGS=-MT'] + args)
if ret != 0:
- raise _MakefileError, 'Error running make.'
+ raise _BuildError, 'Error running make.'
# Then copy the files to the build directory.
ret = subprocess.call(['make', '-f', 'Makefile.SpiderMonkey'] + args)
if ret != 0:
- raise _MakefileError, 'Error running make.'
+ raise _BuildError, 'Error running make.'
class _MyBuild(distutils.command.build.build):
def run(self):
@@ -79,12 +79,22 @@
except ImportError:
pass
else:
+ class _MyPy2Exe(py2exe.build_exe.py2exe):
+ def run(self):
+ py2exe.build_exe.py2exe.run(self)
+ for exe in self.console_exe_files:
+ ret = subprocess.call(['upx', '-9', exe])
+ if ret != 0:
+ raise _BuildError, 'Error running upx on %s' % exe
+ args['cmdclass']['py2exe'] = _MyPy2Exe
+
args.update(
console = ['jsl'],
options = {
'py2exe': {
'excludes': ['javascriptlint.spidermonkey_'],
- 'bundle_files': 1
+ 'bundle_files': 1,
+ 'optimize': 2,
}
},
zipfile = None
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|