[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

Re: [pygame] help: how to make a mac osx installer?



With respect to removing the PyObjC dependency, what the pyobjc piece
does seems pretty straightforward and wel contained - PyObjC stuff is
used only n the macosx.py file, and is only called from
PyGame_Video_AutoInit in the C source. Basically the code makes sure
that the python process can have window manager access if it doesn't
have it with CPSEnableForegroundOperation (i.e. so you can make a
window when run from the command-line), then it sets up the menus and
default app icon. It also hooks up app termination to an SDL_QUIT
message and sets up a workaround for some SDL problem that existed
before 1.2.8.

The only things that don't seem to map right back into Objective C
code is the stuff for CPSEnableForegroundOperation and loading the
bits of the default icon (cause the icon could be loaded from python
pkg_resources stuff)

you can see a little tidbit about what the code in question is doing
from Bob' ippolito's blog post here:
http://bob.pythonmac.org/archives/category/python/packman/

It seems worthwhile to remove the dependency, but it's enough out of
my comfort zone right now I think I'll focus on getting installers for
the leopard 2.5.1 python and pyobjc for a user 2.5.1 python

On Jan 24, 2008 1:49 PM, René Dudfield <renesd@xxxxxxxxx> wrote:
> btw.
>
> I just tested that installer on another apple mac book, and it seems
> to work (after installing pyobjc).  It's a 10.4 machine.
>
> Do you feel like looking into how much work removing the pyobjc
> requirement would be?
>
>
>
>
> On Jan 25, 2008 8:43 AM, Brian Fisher <brian@xxxxxxxxxxxxxxxxxxx> wrote:
> > Pygame already works with both, I think the difficulties are simply in
> > getting a working installer of the appropriate pyobjc for your
> > python/OS version.
> >
> > ... also, it may actually be possible just to remove any pygame
> > dependencies on pyobjc entirely
> >
> >
> > On Jan 24, 2008 1:40 PM, René Dudfield <renesd@xxxxxxxxx> wrote:
> > > sorry.  What we probably need to do is just make pygame work with
> > > pyobjc 2.x or 1.4x
> > >
> > > Which has probably been done already by Noah and the mac ports?
> > >
> > >
> > >
> > > On Jan 25, 2008 8:31 AM, René Dudfield <renesd@xxxxxxxxx> wrote:
> > > > Maybe we could release a couple of different versions.
> > > >
> > > > That seems to be the easiest way forward.  But it'd be nicer for users
> > > > if there were less files to have to choose from to download.
> > > >
> > > > As far as I know pyobc 2.x doesn't work on 10.x,  So we'd have to
> > > > include both pyobc 2.x and 1.4.x for the python from python.org.
> > > >
> > > > I'll see how easy it will be to include both pyobjc 1.4x and 2.x...
> > > >
> > > > cu.
> > > >
> > > >
> > > >
> > > >
> > > >
> > > > On Jan 24, 2008 7:22 PM, Brian Fisher <brian@xxxxxxxxxxxxxxxxxxx> wrote:
> > > > > It doesn't seem to want to install on the leopard 2.5.1 python - I get
> > > > > the error:
> > > > > "You cannot install pygame 1.8.0rc3 on this volume. pygame requires
> > > > > System Python 2.5 to install."
> > > > >
> > > > > I expect there is probably a way to make the installer accept either
> > > > > 2.5.1 python, I think the pyglet people may have had to deal with that
> > > > > (having the installer accept both the leopard python and a user
> > > > > installed 2.5.1) before?
> > > > >
> > > > > Another approach would be building the pygame installer with the OS
> > > > > python on Leopard - I haven't tried that yet.
> > > > >
> > > > > ---
> > > > >
> > > > > also, I decided to try installing 2.5.1 from python.org, and it
> > > > > installs fine into that one, however a simple test raises an exception
> > > > > "ImportError: PyObjC 1.2 or later is required to use pygame on Mac OS
> > > > > X" on import pygame. Others have said on the list that PyObjC 1.2
> > > > > won't work on Leopard, but I think PyObjC 2.0 can be built/installed
> > > > > from source here: http://svn.red-bean.com/pyobjc/trunk. So it seems
> > > > > manageable to run on a user installed 2.5.1 on leopard, but would need
> > > > > more work to be streamlined.
> > > > >
> > > > > So what would other Leopard users want from a pygame install? I think
> > > > > I'd personally like to use the Leopard python for simplicity in that
> > > > > it's a fixed target, but I imagine some people would perfer not to
> > > > > mess with OS components?
> > > > >
> > > > >
> > > > >
> > > > > On Jan 23, 2008 10:24 PM, René Dudfield <renesd@xxxxxxxxx> wrote:
> > > > > >
> > > > > > Can you please try this (UNTESTED!!!) file?
> > > > > >
> > > > > >  http://rene.f0o.com/~rene/stuff/pygame-1.8.0rc3-py2.5-macosx10.4.mpkg.zip
> > > > > >
> > > > > >
> > > > > >
> > > > > >
> > > > > > On Jan 24, 2008 4:57 PM, Brian Fisher <brian@xxxxxxxxxxxxxxxxxxx> wrote:
> > > > > >
> > > > > >
> > > > > > > When running the installer I get this:
> > > > > > > "You cannot install pygame 1.8.0rc3 on this volume. pygame requires
> > > > > > > /Applications/Autodesk/maya2008/Maya.app/Contents/Frameworks Python
> > > > > > > 2.5 to install."
> > > > > > >
> > > > > > > The maya part of things is rather unexpected. Also is this supposed to
> > > > > > > work on the leopard system python? How did you install the python you
> > > > > > > built the installer with?
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > > On Jan 23, 2008 7:52 PM, René Dudfield < renesd@xxxxxxxxx> wrote:
> > > > > > > >
> > > > > > > > I forgot to install bdist_mpkg before running setup.py bdist_mpkg
> > > > > > > >
> > > > > > > > Install this:
> > > > > > > > http://pypi.python.org/pypi/bdist_mpkg/
> > > > > > > >
> > > > > > > > Then run python setup.py bdist_mpkg
> > > > > > > >
> > > > > > > > Here is the resulting (UNTESTED!!!) file:
> > > > > > > >
> > > > > > http://rene.f0o.com/~rene/stuff/pygame-1.8.0rc3-py2.5-macosx10.4.mpkg.zip
> > > > > > > >
> > > > > > > >
> > > > > > > > cheers,
> > > > > > > >
> > > > > > > >
> > > > > > > >
> > > > > > > >
> > > > > > > >
> > > > > > > > On Jan 24, 2008 1:09 PM, Noah Kantrowitz < kantrn@xxxxxxx> wrote:
> > > > > > > > >
> > > > > > > > >
> > > > > > > > >
> > > > > > > > > René Dudfield wrote:
> > > > > > > > > > hello,
> > > > > > > > > >
> > > > > > > > > > does anyone know how to make a mac osx installer for pygame?
> > > > > > > > > >
> > > > > > > > > > How do you do it?
> > > > > > > > > >
> > > > > > > > > >
> > > > > > > > > Macports should let me do it. I'll poke in the AM.
> > > > > > > > >
> > > > > > > > > --Noah
> > > > > > > > >
> > > > > > > > >
> > > > > > > >
> > > > > > > >
> > > > > > >
> > > > > >
> > > > > >
> > > > >
> > > >
> > >
> >
>