`py2app`_ is the bundlebuilder replacement we've all been waiting for. It is implemented as a distutils command, similar to `py2exe`_, that builds Mac OS X applications from Python scripts, extensions, and related data files. It tries very hard to include all dependencies it can find so that your application can be distributed standalone, as Mac OS X applications should be. `py2app`_ 0.1.1 is primarily a bugfix release: * Several problems related to Mac OS X 10.2 compatibility and standalone building have been resolved * Scripts that are not in the same directory as setup.py now work * A new recipe has been added that removes the pydoc -> Tkinter dependency * A recipe has been added for py2app itself * a `wxPython`_ example (superdoodle) has been added. Demonstrates not only how easy it is (finally!) to bundle `wxPython`_ applications, but also how one setup.py can deal with both `py2exe`_ and `py2app`_. * A new experimental tool, py2applet, has been added. Once you've built it (``python setup.py py2app``, of course), you should be able to build simple applications simply by dragging your main script and optionally any packages, data files, Info.plist and icon it needs. Known issues: * Includes *all* files from packages, it should be smart enough to strip unused .py/.pyc/.pyo files (to save space, depending on which optimization flag is used). * The default PyRuntimeLocations can cause problems on machines that have a /Library/Frameworks/Python.framework installed. Workaround is to set a plist that has the following key: ``PyRuntimeLocations=['/System/Library/Frameworks/Python.framework/ Versions/2.3/Python']`` (this will be resolved soon) Download and related links are here: http://undefined.org/python/#py2app .. _`wxPython`: http://www.wxpython.org/ .. _`py2app`: http://undefined.org/python/#py2app .. _`py2exe`: http://starship.python.net/crew/theller/py2exe/
In article <BAA61254-1759-11D9-88CF-000A95686CD8@redivi.com>, Bob Ippolito <bob@redivi.com> wrote:
`py2app`_ is the bundlebuilder replacement we've all been waiting for. It is implemented as a distutils command, similar to `py2exe`_, that builds Mac OS X applications from Python scripts, extensions, and related data files. It tries very hard to include all dependencies it can find so that your application can be distributed standalone, as Mac OS X applications should be.
I look at the 0.1 distro and examples and it really looks promising. However, I did have two questions before I dive into trying to get my app bundled: - Do you have any hints or gotchas for distributing Tkinter apps and have Tcl/Tk bundled inside. I want the target MacOS X 10.3 user to be able to run my app without installing anything. - As an extension to that question...any hints on installing tcl extensions ("snack", specifically) into such a bundled app? -- Russell
On Oct 6, 2004, at 3:34 PM, Russell E. Owen wrote:
In article <BAA61254-1759-11D9-88CF-000A95686CD8@redivi.com>, Bob Ippolito <bob@redivi.com> wrote:
`py2app`_ is the bundlebuilder replacement we've all been waiting for. It is implemented as a distutils command, similar to `py2exe`_, that builds Mac OS X applications from Python scripts, extensions, and related data files. It tries very hard to include all dependencies it can find so that your application can be distributed standalone, as Mac OS X applications should be.
I look at the 0.1 distro and examples and it really looks promising. However, I did have two questions before I dive into trying to get my app bundled: - Do you have any hints or gotchas for distributing Tkinter apps and have Tcl/Tk bundled inside. I want the target MacOS X 10.3 user to be able to run my app without installing anything.
It works exactly like that out of the box.
- As an extension to that question...any hints on installing tcl extensions ("snack", specifically) into such a bundled app?
No idea, give me instructions on how to do it and a minimal example that uses it and I'll see what can be done. -bob
In article <552D13C8-17CF-11D9-A1CC-000A95686CD8@redivi.com>, Bob Ippolito <bob@redivi.com> wrote:
On Oct 6, 2004, at 3:34 PM, Russell E. Owen wrote: ..
In article <BAA61254-1759-11D9-88CF-000A95686CD8@redivi.com>, Bob Ippolito <bob@redivi.com> wrote: ... - As an extension to that question...any hints on installing tcl extensions ("snack", specifically) into such a bundled app?
No idea, give me instructions on how to do it and a minimal example that uses it and I'll see what can be done.
Aqua Tcl extensions live in /Library/Tcl, typically each in its own subfolder. For example snack lives in /Library/Tcl/snack2.2/ When bundled, Tcl can find extensions in Contents/Frameworks/Tcl.framework/Resources/ e.g. for snack: Contents/Frameworks/Tcl.framework/Resources/snack2.2/ (That may not be the best location, but it works. I found it by trial and error.). I can put together a sample app and send it along separately if you like. -- Russell
On Oct 7, 2004, at 3:38 PM, Russell E. Owen wrote:
In article <552D13C8-17CF-11D9-A1CC-000A95686CD8@redivi.com>, Bob Ippolito <bob@redivi.com> wrote:
On Oct 6, 2004, at 3:34 PM, Russell E. Owen wrote: ..
In article <BAA61254-1759-11D9-88CF-000A95686CD8@redivi.com>, Bob Ippolito <bob@redivi.com> wrote: ... - As an extension to that question...any hints on installing tcl extensions ("snack", specifically) into such a bundled app?
No idea, give me instructions on how to do it and a minimal example that uses it and I'll see what can be done.
Aqua Tcl extensions live in /Library/Tcl, typically each in its own subfolder. For example snack lives in /Library/Tcl/snack2.2/
When bundled, Tcl can find extensions in Contents/Frameworks/Tcl.framework/Resources/ e.g. for snack: Contents/Frameworks/Tcl.framework/Resources/snack2.2/
(That may not be the best location, but it works. I found it by trial and error.).
I can put together a sample app and send it along separately if you like.
I'm more interested in having a development environment that mirrors yours to see if it's possible or reasonable to find usage of snack automatically. Depending on how Tcl extensions are linked, it might be necessary to rewrite their mach headers (or else you can, in theory, get the same "version mismatch" problem that Python has). If Tcl can find extensions in Contents/Frameworks/Tcl.framework/Resources when *not* bundled, that might be a good place to put them.. because py2app makes little attempt to strip down frameworks other than Python.framework. For versioned frameworks, it will skip the versions you are not linking to, but everything in that version (and anything outside of versioned directories) will be copied. -bob
participants (2)
-
Bob Ippolito
-
Russell E. Owen