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

Re: [pygame] Removing PyObjc Dependency



Hi Brian,

Pygame already has several undocumented extension modules, so what's one more. I don't foresee any problems with it being OS X only. And Setup is certainly the place to control inclusion. I don't think you need to tamper with config.py though. I avoided modifying it myself since it is shared across platforms. Additions for one platform could too easily break it for others. A quick look at writesetupfile shows that it checks that an extension has all its dep vars defined before including it in Setup (unverified). So if the sdlmain_osx entry in Setup.in references some variable only provided in an OS X build then it will be omitted from other builds. Only changes to config_darwin.py are needed.

Lenard

Brian Fisher wrote:
In a local not-committed version, I ported a combination of the pyobjc dependent python code and SDL's SDLmain.m to an objective c file called sdlmain_osx.m that becomes an extension module names pygame.sdlmain_osx (which I plan on being undocumented), and it builds with Python 2.6 on Leopard and the built pygame works fine with all the scripts I could find. Before I checked it in though, I wanted to ask a question about build process stuff...

So the thing I wanted advice on is how to include a file & a module for mac os x builds only - that's something I'm not doing at all right now, and I don't think we have an example of a platform specific extension module being built in, right? So I'm thinking I'll just hacking something new in to config.py's writesetupfile function (maybe make a setup_darwin.in <http://setup_darwin.in> file and translate that file into setup after setup.in <http://setup.in> is processed?) Nobody sees any problem with adding an undocumented extension module to one platform like this, do they? Any obviously better approaches?




--
Lenard Lindstrom
<len-l@xxxxxxxxx>