[Pythonmac-SIG] Freeze on Mac
Jason Petrone
jpetrone at cnri.reston.va.us
Mon Jul 14 13:40:15 EDT 2003
On Mon, Jul 14, 2003 at 12:21:43PM -0400, Chris wrote:
> I may have got lost in the shuffle.
>
> Is it possible to freeze an app on the MacOSX so it can be
> distributed without any (separate) MacPython interpreter?
You want bundlebuilder.py, it comes with Python.
'''
bundlebuilder.py -- Tools to assemble MacOS X (application) bundles.
This module contains two classes to build so called "bundles" for
MacOS X. BundleBuilder is a general tool, AppBuilder is a subclass
specialized in building application bundles.
[Bundle|App]Builder objects are instantiated with a bunch of keyword
arguments, and have a build() method that will do all the work. See
the class doc strings for a description of the constructor arguments.
The module contains a main program that can be used in two ways:
% python bundlebuilder.py [options] build
% python buildapp.py [options] build
Where "buildapp.py" is a user-supplied setup.py-like script following
this model:
from bundlebuilder import buildapp
buildapp(<lots-of-keyword-args>)
'''
> Is there a compiler in the works or is PytoC++ the only game in town?
Why do you want to compile to native? There are three common reasons:
- Performance:
Because of python dynamic nature, native compilation is not likely
to give that much of a speed improvement.
- Ease of distribution:
Hopefully bundlebuilder on MacOS, py2exe on win32, and McMillan
Installer everywhere else, solve this problem sufficiently. I
distribute python programs quite frequently, and I take pride in
knowing all but the savviest users are not aware they are using
anything other than a native binary.
- Obfuscation
This is the most compelling reason I know for native compilation.
I have no idea how one could implement effective anti-piracy
measures for a bytecode compiled program.
Jason
More information about the Pythonmac-SIG
mailing list