On Tue, 2011-01-11 at 10:19 +0000, João Vale wrote: > Hi, > > My current project seems very similar to yours and I've been using > py2exe without problems (well, almost, QWebView wasn't working because > OpenSSL's libraries were missing on the target "clean" computer, but > after I tracked it down it was easy to fix). > > Regarding py2app, I've been having some troubles mainly because, from > what I've read, you can't use Apple's system python because otherwise > the generated app will always rely on the system's packages, and my > unsuccessful tests seem to support that. > > Ryan, do you have any tips regarding this problem? I installed Python > 2.7 from MacPorts and created a virtualenv to build PySide > (successfully). After this, all hell breaks loose because of the > different Python versions and some MacPorts weirdness.
I don't think I tried the macports python, but I used the download from
python.org without hitting too much weirdness.
Unfortunately I don't remember if I had to do any specific tricks to get
it up and running, because...
> It would be great if you could share how you managed this whole situation. :)
...in the end, I built a custom python toolchain almost from scratch.
Sounds like a lot of work, but it's been worth it to isolate and
understand all of the little details.
Since I hate doing things more than once, I made a python module to
manage the process. It's called "myppy" for "make you a portable
python":
https://github.com/rfk/myppy
It's pretty rough round the edges, but here's how it looks from the
outside when running on a Mac (you can use a similar process on linux as
well, win32 support in the works)
#> myppy /Users/rfk/py.app/ init
...
... builds python and its dependencies
...
#> myppy /Users/rfk/py.app/ install py_pyside
...
... builds Qt, PySide, and their dependencies
... yes, this takes several hours
...
#> myppy /Users/rfk/py.app/ install py_py2app
...
... builds a slightly patched version of py2app
...
#> ls /Users/rfk/py.app/
python pythonw Contents
The "py.app" directory is now a completely isolated python environment,
optimised for small code size and portability. You can take this app
bundle to any Mac running 10.4 or later and have it "just work".
I then set my path to point into this bundle (there's a "bin" directory
hiding away under Contents/) and use it instead of the system python.
The advantage of doing things this way is that I know everything is
built as properly portable fat binaries targeting the 10.4 SDK, rather
than having to depend on system libraries and/or macports to build
things right.
If anyone's brave enough to take myppy for a spin, feel free to email me
directly and I'll try my best to help you out with it.
Ryan
> On Mon, Jan 10, 2011 at 9:50 PM, Ryan Kelly <[email protected]> wrote:
> > On Tue, 2011-01-11 at 08:42 +1100, Ryan Kelly wrote:
> >> On Mon, 2011-01-10 at 13:10 +0000, Purma Jukka wrote:
> >> > Hi,
> >> >
> >> > I'm planning to move my Python+Qt project from PyQt4 to PySide before
> >> > making it public and adding license texts. ( demo:
> >> > http://www.youtube.com/watch?v=UcH9Drp0FpE ) Soon after that I should
> >> > have at least Mac standalone app and Windows executable available for
> >> > interested people, but at this point I am a bit worried if I can get
> >> > the existing deployment tools like py2app, py2exe to work with PySide.
> >> > I noticed that cx_freeze is one new option too. My project uses only
> >> > QtCore and QtGui and is mostly done in Mac OS X Snow Leopard. My
> >> > access to Windows machines is quite rare, so I need a reliable method
> >> > for building .exe:s.
> >> >
> >> > My question is, are there any people who are currently actively and
> >> > successfully deploying mac apps and windows .exes out from their
> >> > PySide projects? What tools are working and is the overall process
> >> > "like it should be" or something that will change with the progress of
> >> > PySide (in near months)?
> >>
> >> I have successfully built win32 versions with py2exe, mac versions with
> >> py2app and linux versions with cxfreeze. Like you, I use only QtCore
> >> and QtGui.
> >
> >
> > And if I may shamelessly plug another of my projects, I should mention
> > that I used esky to control the freezing process:
> >
> > http://pypi.python.org/pypi/esky/
> >
> >
> > Esky is an auto-update framework for frozen python apps, which wraps the
> > common freezers such as py2exe and py2app and provides a nice API for
> > building, distributing and installed updated versions.
> >
> >
> > Cheers,
> >
> > Ryan
> >
> > --
> > Ryan Kelly
> > http://www.rfk.id.au | This message is digitally signed. Please visit
> > [email protected] | http://www.rfk.id.au/ramblings/gpg/ for details
> >
> >
> > _______________________________________________
> > PySide mailing list
> > [email protected]
> > http://lists.openbossa.org/listinfo/pyside
> >
> >
>
--
Ryan Kelly
http://www.rfk.id.au | This message is digitally signed. Please visit
[email protected] | http://www.rfk.id.au/ramblings/gpg/ for details
signature.asc
Description: This is a digitally signed message part
_______________________________________________ PySide mailing list [email protected] http://lists.openbossa.org/listinfo/pyside
