[ANN] squisher 0.3

A

Adam Atlas

http://cheeseshop.python.org/pypi/squisher/0.3

I've posted the third version of my experimental packaging program
Squisher. Squisher can take a directory representing a Python package
(i.e. a directory with __init__.py) and "squish" it into a single .pyc
file that you can import, or run on the command line, just like any
other .py/.pyc file.

The hook is that it can be thus imported *without* necessarily having
Squisher itself installed. All you do is run Squisher on a directory
(or an existing zip file if you wish), and you get a single file you
can import with any normal Python installation.

It is complementary to Eggs in a way. They're good for having packages
globally installed and keeping them up-to-date, but very often you may
want the simple convenience of dropping a .pyc in a directory and
importing it. Furthermore, since Squished packages are just zip files
with a special Python bytecode header (and Eggs are just zipfiles with
internal metadata added), you can actually run it on an Egg and get a
file that can be used as an Egg *or* a Squished package just by
renaming it.

Try it out... I've found it useful so far. It is still pretty
experimental, so I wouldn't advise using it as a serious packaging
mechanism yet, but I hope that with time it will become very stable
and complete. Bug reports/patches welcome.

--

Changelog for anyone who tried the previous releases:
- Added a couple of patches courtesy of Gary Duzan -- a Python 2.3
compatibility fix, and a fix for importing compiled modules when
running a .pyc from the command line.
- Changed from GPL to BSD license. Also clarified that the generated
bytecode is considered public domain.
- It now detects if you pass it an already-squished module -- if so,
it will simply update the bytecode header if necessary.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,777
Messages
2,569,604
Members
45,234
Latest member
SkyeWeems

Latest Threads

Top