PDA

View Full Version : [0.9] Python Ext Builder



trbs
30 Aug 2007, 8:35 AM
Announcing the Python JSB Builder 0.9

Download Python Builder here (http://extjs-py-builder.googlecode.com/svn/trunk/build_ext_packages.py)

The python builder has it's own google hosted project, so that people's suggestions can be incorporated, at http://code.google.com/p/extjs-py-builder/

Notes / Futures:

If your Python installation doesn't have them already, you'll need to install elementtree or cElementTree. If you cannot install elementree system-wide you must set the PYTHONPATH environment variable so that Python can still find the package where ever it's installed.

The script runs on any Python version starting from 2.3. It should also run on Windows but that's not tested or supported. It's designed to be run on Unix style machines like: MacOSX, Linux, *BSD and Solaris. Since Python is installed on many Unix systems by default it should run flawlessly on almost any webserver.

If you have administrative rights on the system and you want the build process to be very fast, you can install Python's just-in-time compiler called Psyco. This speeds up execution time (mostly jsmin) by more then 10 times.

It can use various styles of (aggressive) minimization strategies. Like: jsmin, shrinksafe,
a packer (packing is compression, and for production it's much better to use gzip then packers!!!!) and very soon yui-compressor support.

If you have issues, find bugs, feature requests, please use the issue tracker and post in this thread.

ChangeLog

0.1: first public version (April 6, 2007)
0.2: added options and jsmin, fallback on elementtree (April 14, 2007)
0.3: reduced size by running rhino compressor on source files
0.4: intermediated release, fixes to much to list here
0.5: added options again, more error messages
0.6: added jspacker
0.7: fix for python2.3
0.7.1: added psyco support (greatly speedsup jsmin)
0.8: added yui-compressor (for javascript, css will follow soon)
0.9: fixed import of elementtree for python2.5 (thanks aconran!)

aconran
6 Aug 2008, 11:06 PM
To get this up and running with Python 2.5.2 I had to change the import statement.

From:


from elementtree.ElementTree import ElementTree as ET


To:


from xml.etree.ElementTree import ElementTree as ET

trbs
7 Aug 2008, 12:06 AM
To get this up and running with Python 2.5.2 I had to change the import statement.

From:


from elementtree.ElementTree import ElementTree as ET


To:


from xml.etree.ElementTree import ElementTree as ET


Thanks aconran !
Updated the code to check for the buildin Python2.5 version.

oddy
1 Jul 2009, 3:43 AM
I checkout ExtJS from http://extjs-public.googlecode.com/svn/extjs-3.x
And launch build_ext_packages.py like:
build_ext_packages.py -CSJP "C:\Work\JS\extjs-3.x"
And I've got: "Target directory is not a ExtJS svn checkout directory"

C:\Work\JS\extjs-3.x IS my SVN checkout root directory

dj
2 Jul 2009, 5:46 AM
I checkout ExtJS from http://extjs-public.googlecode.com/svn/extjs-3.x
And launch build_ext_packages.py like:
build_ext_packages.py -CSJP "C:\Work\JS\extjs-3.x"
And I've got: "Target directory is not a ExtJS svn checkout directory"

C:\Work\JS\extjs-3.x IS my SVN checkout root directory
The python builder doesn't work with the new JSON "makefile" format. See http://extjs.com/forum/showthread.php?p=351828#post351828

dj
2 Jul 2009, 5:56 AM
The python builder doesn't work with the new JSON "makefile" format. See http://extjs.com/forum/showthread.php?p=351828#post351828
I just noticed that you don't have a real SVN version. http://extjs-public.googlecode.com/svn/extjs-3.x does not mirror the Ext SVN. It only includes the released versions (the ZIP files you can download on this site) and has a different directory structure. If you want to build new versions off this, use http://extjs-public.googlecode.com/svn/extjs-3.x/release/ as root directory.

jsakalos
6 Jul 2009, 11:17 PM
Hi trbs,

do you have any plans to update py-builder to use new *.jsb2 project files of Ext 3.x branch?

oddy
6 Aug 2009, 3:56 AM
I just noticed that you don't have a real SVN version. http://extjs-public.googlecode.com/svn/extjs-3.x does not mirror the Ext SVN. It only includes the released versions (the ZIP files you can download on this site) and has a different directory structure. If you want to build new versions off this, use http://extjs-public.googlecode.com/svn/extjs-3.x/release/ as root directory.
extjs-3.x is just a directory. SVN path for it is http://code.extjs.com/svn/ext/trunk