From joelgluck at yahoo.com Thu Jan 1 19:47:35 2009 From: joelgluck at yahoo.com (Joel Gluck) Date: Thu, 1 Jan 2009 13:47:35 -0500 Subject: [Pythonmac-SIG] py2app + pygame: how to exclude pygame icon? Message-ID: <8BC4EC6F-FFAE-4E5A-A389-B866E00B44A0@yahoo.com> Hi all, Am using py2app and hitting this problem: py2app's built-in recipe for pygame is causing the pygame icon to appear when I run the app from the dock. It goes something like this: 1) The icon file I provide for my app appears in the dock by default, thanks to python setup.py py2app --iconfile my_icon.icns. 2) However, when I click on that icon in the dock, it briefly changes to the pygame icon (snake with game controller in mouth) and bounces up and down, before my app runs. 3) I tried adding a call at the start of my app to pygame.display.set_icon() to override the pygame icon with my own icon -- this causes the bouncing pygame icon to change back to my app's icon immediately before my app takes over the screen. However, I still see the pygame icon for a moment or two. This may sound like a small issue, but I'm about to submit the app for testing to a "serious" client, and I know they would not appreciate the pygame icon. So, is there a way to either: 1) Exclude pygame_icon.icns on the command line (I tried --excludes and --dylib-excludes to no avail); or 2) Change the default recipe for pygame; 3) Invoke some other magic to fix this? BTW: I also tried to remove pygame_icon.icns manually after the app was created (deleting it from site-packages.zip, then recreating the ..zip file), but this broke something else. TIA...! Happy holidays, Joel Joel Gluck, MEd, RDT Metta Software Somerville, MA, USA -------------- next part -------------- An HTML attachment was scrubbed... URL: From chris.van.bael at gmail.com Thu Jan 1 20:14:04 2009 From: chris.van.bael at gmail.com (Chris Van Bael) Date: Thu, 1 Jan 2009 20:14:04 +0100 Subject: [Pythonmac-SIG] py2app + pygame: how to exclude pygame icon? In-Reply-To: <8BC4EC6F-FFAE-4E5A-A389-B866E00B44A0@yahoo.com> References: <8BC4EC6F-FFAE-4E5A-A389-B866E00B44A0@yahoo.com> Message-ID: <5465ee790901011114n12251efas1461b5b69d04da87@mail.gmail.com> On Thu, Jan 1, 2009 at 7:47 PM, Joel Gluck wrote: > Hi all, > Am using py2app and hitting this problem: py2app's built-in recipe for > pygame is causing the pygame icon to appear when I run the app from the > dock. Could you not just replace the pygame icon with your icon? So still have a file named pygame_icon.icns, but the contents would be your icon? From joelgluck at yahoo.com Fri Jan 2 07:06:52 2009 From: joelgluck at yahoo.com (Joel Gluck) Date: Fri, 2 Jan 2009 01:06:52 -0500 Subject: [Pythonmac-SIG] py2app + pygame: how to exclude pygame icon? References: <56B5003F-5E31-4311-805D-7EDBBBF0FEC2@yahoo.com> Message-ID: <482F04F8-E837-410F-964F-6043ECB945D3@yahoo.com> To: Chris Van Bael Hi Chris, Thanks for the suggestion! I actually tried it earlier, by opening site-packages.zip, replacing the icon with one of the same name (but my own design) and recreating the .zip -- unfortunately, it broke the app (refused to run, with an odd error). I also looked for a way I could replace the original pygame_icon.icns, which I tracked down to somewhere inside the python.framework file -- I tried to delete or replace it, but kept getting an error that I did not have permission (even though I'm the admin login, and even went to program info and changed the permissions there to let everyone write the file!) So: I'm still stuck -- any other ideas would be MOST welcome! Thanks for trying, Joel On Jan 1, 2009, at 2:14 PM, Chris Van Bael wrote: > On Thu, Jan 1, 2009 at 7:47 PM, Joel Gluck > wrote: >> Hi all, >> Am using py2app and hitting this problem: py2app's built-in recipe >> for >> pygame is causing the pygame icon to appear when I run the app from >> the >> dock. > > Could you not just replace the pygame icon with your icon? > So still have a file named pygame_icon.icns, but the contents would be > your icon? -------------- next part -------------- An HTML attachment was scrubbed... URL: From pdorange at mac.com Fri Jan 2 18:29:59 2009 From: pdorange at mac.com (Pierre-Alain Dorange) Date: Fri, 2 Jan 2009 18:29:59 +0100 Subject: [Pythonmac-SIG] py2app which version ? Message-ID: <1isxhr3.1a2yfbxl3q6xeN%pdorange@mac.com> Hi, I just update my system (MacOS X 10.5) and now i got the default python 2.5.2. My software (a little game using pygame 1.8.1) works fine but when i create a bundle with py2app, the application crash at launch... I install the trunk i used before (0.4.2) but the application still crash. Looking on internet i found several py2app and i don't what to use... On the official site : official site : py2app 0.1.8 : http://undefined.org/python/py2app.html#downloads py2app 0.4.2 : http://svn.pythonmac.org/py2app/py2app/trunk/ py2App 0.3 : http://svn.red-bean.com/bob/py2app/trunk/ I don't know which is the best and how install it. Before going to MacOS 10.5 i used 10.4 and i install myself Python 2.5, pygame 1.8 and py2app 0.4.2. It was working fine with this environnement. How can i do now with 10.5, may i install a personal python 2.5.2 or it's better to use the default system one (2.5.2 also)... -- Pierre-Alain Dorange From gary.church1 at comcast.net Sat Jan 3 01:20:35 2009 From: gary.church1 at comcast.net (Gary Church) Date: Fri, 2 Jan 2009 16:20:35 -0800 Subject: [Pythonmac-SIG] python version confusion; can someone provide some clarity, please? Message-ID: <784F6DED-5829-4D9C-92CF-7282150D215E@comcast.net> Hello and happy new year! I'm new to python and to this list but am a happy several year convert to OS X (now using leopard). I hope this isn't some kind of noob question that upsets the subscribers to this list :-) I realize that leopard ships with its own python installation but that it is somewhat outdated compared to what's currently available (the latest being python 3.0). Not long ago, I installed, I believe, MacPython (ver. 2.5). At least when I enter "which python" I get: Macintosh-4:~ gary$ which python /usr/bin/python and when I enter "python" from within my home directory, I get: Macintosh-4:~ gary$ python Python 2.5.1 (r251:54863, Jan 17 2008, 19:35:17) [GCC 4.0.1 (Apple Inc. build 5465)] on darwin Type "help", "copyright", "credits" or "license" for more information. >>> But suppose I want to install version 2.6 or the newly released 3.0; where do they get installed (will they overwrite previous installations) and if they occupy their own territory, how do I run the various versions? I assume each separate version has its own version of IDLE too... Is there some way of finding out which pythons I have currently installed and their locations (paths?) Thanks for your help, Gary Gary Church gary.church1 at comcast.net From vip at avatar.com.au Sat Jan 3 02:12:27 2009 From: vip at avatar.com.au (DavidW) Date: Sat, 3 Jan 2009 12:12:27 +1100 Subject: [Pythonmac-SIG] python version confusion; can someone provide some clarity, please? In-Reply-To: <784F6DED-5829-4D9C-92CF-7282150D215E@comcast.net> References: <784F6DED-5829-4D9C-92CF-7282150D215E@comcast.net> Message-ID: <3D31CC65-6CDA-4DA9-A3FC-DFC6E92DD40D@avatar.com.au> Hi Gary - welcome to the list. This is a frequent question so a search of the archive might help, but here's my explanation: http://www.avatar.com.au/sonipy/pythonInstall.html HNY, David On 03/01/2009, at 11:20 AM, Gary Church wrote: > Hello and happy new year! > > I'm new to python and to this list but am a happy several year > convert to OS X (now using leopard). > > I hope this isn't some kind of noob question that upsets the > subscribers to this list :-) > > I realize that leopard ships with its own python installation but > that it is somewhat outdated compared to what's currently available > (the latest being python 3.0). Not long ago, I installed, I believe, > MacPython (ver. 2.5). At least when I enter "which python" I get: > > Macintosh-4:~ gary$ which python > /usr/bin/python > > and when I enter "python" from within my home directory, I get: > > Macintosh-4:~ gary$ python > Python 2.5.1 (r251:54863, Jan 17 2008, 19:35:17) > [GCC 4.0.1 (Apple Inc. build 5465)] on darwin > Type "help", "copyright", "credits" or "license" for more information. > >>> > > But suppose I want to install version 2.6 or the newly released 3.0; > where do they get installed (will they overwrite previous > installations) and if they occupy their own territory, how do I run > the various versions? I assume each separate version has its own > version of IDLE too... > > Is there some way of finding out which pythons I have currently > installed and their locations (paths?) > > Thanks for your help, > Gary > > Gary Church > gary.church1 at comcast.net > > > > _______________________________________________ > Pythonmac-SIG maillist - Pythonmac-SIG at python.org > http://mail.python.org/mailman/listinfo/pythonmac-sig > ________________________________________________ David Worrall. - Experimental Polymedia: www.avatar.com.au - Education for Financial Independence: www.mindthemarkets.com.au Australian research affiliations: - Capital Markets Cooperative Research Centre: www.cmcrc.com - Sonic Communications Research Group: creative.canberra.edu.au/scrg - MARCS Auditory Laboratories: marcs.uws.edu.au From joelgluck at yahoo.com Sat Jan 3 05:17:58 2009 From: joelgluck at yahoo.com (Joel Gluck) Date: Fri, 2 Jan 2009 23:17:58 -0500 Subject: [Pythonmac-SIG] py2app: how to exclude pygame_icon.icns ? In-Reply-To: <6a36e7290812291224r4db65a96y93107b88f4314218@mail.gmail.com> References: <77F40406-CD61-4EA1-A1DA-3EBC800BE20D@yahoo.com> <6a36e7290812291224r4db65a96y93107b88f4314218@mail.gmail.com> Message-ID: <3E217F05-32C1-4942-90FE-F8388611CED7@yahoo.com> Hi Bob, Thanks for pointing me to the right place -- I was able to replace the pygame icon with my own as a temporary fix. I have two more questions (I know, you're not supporting py2app anymore, but you're basically the guru of this code so I thought I'd at least try to go directly to the source...!): 1) My built .app is missing frameworks pygame depends on. I'm trying to include them by using py2app's "frameworks" option, but it doesn't seem to work as advertised -- no matter how many ways I devise to give it a "comma-separated list of additional frameworks", it only adds the first framework in the list. (This is true whether from the command line or within the setup file as a py2app option.) Using the frameworks option multiple times does not seem to work. Is there a secret method? Currently I'm doing: APP = ['savi.py'] DATA_FILES = ['../gameplay', 'data', 'en'] OPTIONS = { 'argv_emulation': True, "iconfile": "mac_savi_icon.icns", "dist_dir":"mac_dist", "bdist_base":"mac_build", "frameworks": ["SDL_image.framework", "SDL_ttf.framework", "SDL_mixer.framework", "SDL.framework"], "includes":["Numeric"] } setup( app=APP, data_files=DATA_FILES, options={'py2app': OPTIONS}, setup_requires=['py2app'], version="0.2.3" ) 2) When I run "python setup.py py2app", it seems to run fine for a while but then hits a snag -- here's a traceback: copying /Library/Frameworks/SDL.framework/Versions/A/SDL -> /Users/ joel/Documents/OT Video Games/SAVI Learning Tool Prototype ver 2.3/ mac_dist/savi.app/Contents/Frameworks/SDL.framework/Versions/A linking /Users/joel/Documents/OT Video Games/SAVI Learning Tool Prototype ver 2.3/mac_dist/savi.app/Contents/Frameworks/SDL.framework/ Versions/Current -> A Traceback (most recent call last): File "/Users/joel/Library/Python/2.5/site-packages/py2app-0.3.6- py2.5.egg/py2app/build_app.py", line 548, in _run self.run_normal() File "/Users/joel/Library/Python/2.5/site-packages/py2app-0.3.6- py2.5.egg/py2app/build_app.py", line 619, in run_normal self.create_binaries(py_files, pkgdirs, extensions, loader_files) File "/Users/joel/Library/Python/2.5/site-packages/py2app-0.3.6- py2.5.egg/py2app/build_app.py", line 731, in create_binaries mm.mm.run_file(fmwk) File "build/bdist.macosx-10.3-i386/egg/macholib/MachOGraph.py", line 68, in run_file self.scan_node(m) File "build/bdist.macosx-10.3-i386/egg/macholib/MachOGraph.py", line 91, in scan_node m = self.load_file(filename, caller=node) File "build/bdist.macosx-10.3-i386/egg/macholib/MachOGraph.py", line 78, in load_file return self.load_file(newname, caller=caller) File "build/bdist.macosx-10.3-i386/egg/macholib/MachOGraph.py", line 80, in load_file m = self.createNode(MachO, name) File "build/bdist.macosx-10.3-i386/egg/macholib/ MachOStandalone.py", line 23, in createNode res = super(FilteredMachOGraph, self).createNode(cls, name) File "build/bdist.macosx-10.3-i386/egg/altgraph/ObjectGraph.py", line 148, in createNode m = cls(name, *args, **kw) File "build/bdist.macosx-10.3-i386/egg/macholib/MachO.py", line 61, in __init__ self.load(file(filename, 'rb')) File "build/bdist.macosx-10.3-i386/egg/macholib/MachO.py", line 71, in load self.load_fat(fh) File "build/bdist.macosx-10.3-i386/egg/macholib/MachO.py", line 82, in load_fat self.load_header(fh, arch.offset, arch.size) File "build/bdist.macosx-10.3-i386/egg/macholib/MachO.py", line 106, in load_header hdr = MachOHeader(self, fh, offset, size, magic, hdr, endian) File "build/bdist.macosx-10.3-i386/egg/macholib/MachO.py", line 146, in __init__ self.load(fh) File "build/bdist.macosx-10.3-i386/egg/macholib/MachO.py", line 178, in load raise ValueError("Unknown load command: %d" % (cmd_load.cmd,)) ValueError: Unknown load command: 27 > /Users/joel/Documents/OT Video Games/SAVI Learning Tool Prototype ver 2.3/build/bdist.macosx-10.3-i386/egg/macholib/MachO.py(178)load() (Pdb) cont I've tried using the debugger to determine what's going on but it remains a mystery. (OTOH, if I type "cont", it immediately ends the script and returns to the Unix prompt.) Any thoughts? Thanks for any help you're willing to provide -- from your sunny retirement as py2app maintainer! -- Joel, working desperately on a deadline... -------------- next part -------------- An HTML attachment was scrubbed... URL: From bob at redivi.com Sat Jan 3 05:31:31 2009 From: bob at redivi.com (Bob Ippolito) Date: Fri, 2 Jan 2009 20:31:31 -0800 Subject: [Pythonmac-SIG] py2app: how to exclude pygame_icon.icns ? In-Reply-To: <3E217F05-32C1-4942-90FE-F8388611CED7@yahoo.com> References: <77F40406-CD61-4EA1-A1DA-3EBC800BE20D@yahoo.com> <6a36e7290812291224r4db65a96y93107b88f4314218@mail.gmail.com> <3E217F05-32C1-4942-90FE-F8388611CED7@yahoo.com> Message-ID: <6a36e7290901022031w62b5c0ffyb6fcea9a3e242e2b@mail.gmail.com> Unknown load command: 27 means it's seeing a load command (low level Mach-O stuff) that it doesn't understand, which is reasonable because I don't think I've updated the code since 10.4 or so and there are probably some new ones. I only really worked on py2app, etc.when I was building Mac apps, and I haven't in a few years. I spend my open source time working on more server-side stuff. On Fri, Jan 2, 2009 at 8:17 PM, Joel Gluck wrote: > Hi Bob, > Thanks for pointing me to the right place -- I was able to replace the > pygame icon with my own as a temporary fix. > I have two more questions (I know, you're not supporting py2app anymore, but > you're basically the guru of this code so I thought I'd at least try to go > directly to the source...!): > 1) My built .app is missing frameworks pygame depends on. I'm trying to > include them by using py2app's "frameworks" option, but it doesn't seem to > work as advertised -- no matter how many ways I devise to give it a > "comma-separated list of additional frameworks", it only adds the first > framework in the list. (This is true whether from the command line or within > the setup file as a py2app option.) Using the frameworks option multiple > times does not seem to work. Is there a secret method? Currently I'm doing: > APP = ['savi.py'] > DATA_FILES = ['../gameplay', 'data', 'en'] > OPTIONS = { 'argv_emulation': True, > "iconfile": "mac_savi_icon.icns", > "dist_dir":"mac_dist", > "bdist_base":"mac_build", > "frameworks": ["SDL_image.framework", "SDL_ttf.framework", > "SDL_mixer.framework", "SDL.framework"], > "includes":["Numeric"] } > setup( app=APP, > data_files=DATA_FILES, > options={'py2app': OPTIONS}, > setup_requires=['py2app'], > version="0.2.3" ) > 2) When I run "python setup.py py2app", it seems to run fine for a while but > then hits a snag -- here's a traceback: > copying /Library/Frameworks/SDL.framework/Versions/A/SDL -> > /Users/joel/Documents/OT Video Games/SAVI Learning Tool Prototype ver > 2.3/mac_dist/savi.app/Contents/Frameworks/SDL.framework/Versions/A > linking /Users/joel/Documents/OT Video Games/SAVI Learning Tool Prototype > ver 2.3/mac_dist/savi.app/Contents/Frameworks/SDL.framework/Versions/Current > -> A > Traceback (most recent call last): > File > "/Users/joel/Library/Python/2.5/site-packages/py2app-0.3.6-py2.5.egg/py2app/build_app.py", > line 548, in _run > self.run_normal() > File > "/Users/joel/Library/Python/2.5/site-packages/py2app-0.3.6-py2.5.egg/py2app/build_app.py", > line 619, in run_normal > self.create_binaries(py_files, pkgdirs, extensions, loader_files) > File > "/Users/joel/Library/Python/2.5/site-packages/py2app-0.3.6-py2.5.egg/py2app/build_app.py", > line 731, in create_binaries > mm.mm.run_file(fmwk) > File "build/bdist.macosx-10.3-i386/egg/macholib/MachOGraph.py", line 68, > in run_file > self.scan_node(m) > File "build/bdist.macosx-10.3-i386/egg/macholib/MachOGraph.py", line 91, > in scan_node > m = self.load_file(filename, caller=node) > File "build/bdist.macosx-10.3-i386/egg/macholib/MachOGraph.py", line 78, > in load_file > return self.load_file(newname, caller=caller) > File "build/bdist.macosx-10.3-i386/egg/macholib/MachOGraph.py", line 80, > in load_file > m = self.createNode(MachO, name) > File "build/bdist.macosx-10.3-i386/egg/macholib/MachOStandalone.py", line > 23, in createNode > res = super(FilteredMachOGraph, self).createNode(cls, name) > File "build/bdist.macosx-10.3-i386/egg/altgraph/ObjectGraph.py", line 148, > in createNode > m = cls(name, *args, **kw) > File "build/bdist.macosx-10.3-i386/egg/macholib/MachO.py", line 61, in > __init__ > self.load(file(filename, 'rb')) > File "build/bdist.macosx-10.3-i386/egg/macholib/MachO.py", line 71, in > load > self.load_fat(fh) > File "build/bdist.macosx-10.3-i386/egg/macholib/MachO.py", line 82, in > load_fat > self.load_header(fh, arch.offset, arch.size) > File "build/bdist.macosx-10.3-i386/egg/macholib/MachO.py", line 106, in > load_header > hdr = MachOHeader(self, fh, offset, size, magic, hdr, endian) > File "build/bdist.macosx-10.3-i386/egg/macholib/MachO.py", line 146, in > __init__ > self.load(fh) > File "build/bdist.macosx-10.3-i386/egg/macholib/MachO.py", line 178, in > load > raise ValueError("Unknown load command: %d" % (cmd_load.cmd,)) > ValueError: Unknown load command: 27 >> /Users/joel/Documents/OT Video Games/SAVI Learning Tool Prototype ver >> 2.3/build/bdist.macosx-10.3-i386/egg/macholib/MachO.py(178)load() > (Pdb) cont > I've tried using the debugger to determine what's going on but it remains a > mystery. (OTOH, if I type "cont", it immediately ends the script and > returns to the Unix prompt.) Any thoughts? > Thanks for any help you're willing to provide -- from your sunny retirement > as py2app maintainer! > -- Joel, working desperately on a deadline... > > From joelgluck at yahoo.com Sat Jan 3 16:57:02 2009 From: joelgluck at yahoo.com (Joel Gluck) Date: Sat, 3 Jan 2009 10:57:02 -0500 Subject: [Pythonmac-SIG] py2app: how to exclude pygame_icon.icns ? In-Reply-To: <6a36e7290901022031w62b5c0ffyb6fcea9a3e242e2b@mail.gmail.com> References: <77F40406-CD61-4EA1-A1DA-3EBC800BE20D@yahoo.com> <6a36e7290812291224r4db65a96y93107b88f4314218@mail.gmail.com> <3E217F05-32C1-4942-90FE-F8388611CED7@yahoo.com> <6a36e7290901022031w62b5c0ffyb6fcea9a3e242e2b@mail.gmail.com> Message-ID: <640B80A3-0306-4002-9A99-3C0F06E15DA9@yahoo.com> Thanks, Bob -- and any idea why the frameworks are not adding as they should? One other question that should be easier to answer: I located the py2app source code on my machine, and tried to slightly modify it. How do I get my modified version to run when calling "python setup.py py2app"? (without having to duplicate the entire py2app package?) -- Joel On Jan 2, 2009, at 11:31 PM, Bob Ippolito wrote: > Unknown load command: 27 means it's seeing a load command (low level > Mach-O stuff) that it doesn't understand, which is reasonable because > I don't think I've updated the code since 10.4 or so and there are > probably some new ones. > > I only really worked on py2app, etc.when I was building Mac apps, and > I haven't in a few years. I spend my open source time working on more > server-side stuff. > > On Fri, Jan 2, 2009 at 8:17 PM, Joel Gluck > wrote: >> Hi Bob, >> Thanks for pointing me to the right place -- I was able to replace >> the >> pygame icon with my own as a temporary fix. >> I have two more questions (I know, you're not supporting py2app >> anymore, but >> you're basically the guru of this code so I thought I'd at least >> try to go >> directly to the source...!): >> 1) My built .app is missing frameworks pygame depends on. I'm >> trying to >> include them by using py2app's "frameworks" option, but it doesn't >> seem to >> work as advertised -- no matter how many ways I devise to give it a >> "comma-separated list of additional frameworks", it only adds the >> first >> framework in the list. (This is true whether from the command line >> or within >> the setup file as a py2app option.) Using the frameworks option >> multiple >> times does not seem to work. Is there a secret method? Currently >> I'm doing: >> APP = ['savi.py'] >> DATA_FILES = ['../gameplay', 'data', 'en'] >> OPTIONS = { 'argv_emulation': True, >> "iconfile": "mac_savi_icon.icns", >> "dist_dir":"mac_dist", >> "bdist_base":"mac_build", >> "frameworks": ["SDL_image.framework", "SDL_ttf.framework", >> "SDL_mixer.framework", "SDL.framework"], >> "includes":["Numeric"] } >> setup( app=APP, >> data_files=DATA_FILES, >> options={'py2app': OPTIONS}, >> setup_requires=['py2app'], >> version="0.2.3" ) >> 2) When I run "python setup.py py2app", it seems to run fine for a >> while but >> then hits a snag -- here's a traceback: >> copying /Library/Frameworks/SDL.framework/Versions/A/SDL -> >> /Users/joel/Documents/OT Video Games/SAVI Learning Tool Prototype ver >> 2.3/mac_dist/savi.app/Contents/Frameworks/SDL.framework/Versions/A >> linking /Users/joel/Documents/OT Video Games/SAVI Learning Tool >> Prototype >> ver 2.3/mac_dist/savi.app/Contents/Frameworks/SDL.framework/ >> Versions/Current >> -> A >> Traceback (most recent call last): >> File >> "/Users/joel/Library/Python/2.5/site-packages/py2app-0.3.6- >> py2.5.egg/py2app/build_app.py", >> line 548, in _run >> self.run_normal() >> File >> "/Users/joel/Library/Python/2.5/site-packages/py2app-0.3.6- >> py2.5.egg/py2app/build_app.py", >> line 619, in run_normal >> self.create_binaries(py_files, pkgdirs, extensions, loader_files) >> File >> "/Users/joel/Library/Python/2.5/site-packages/py2app-0.3.6- >> py2.5.egg/py2app/build_app.py", >> line 731, in create_binaries >> mm.mm.run_file(fmwk) >> File "build/bdist.macosx-10.3-i386/egg/macholib/MachOGraph.py", >> line 68, >> in run_file >> self.scan_node(m) >> File "build/bdist.macosx-10.3-i386/egg/macholib/MachOGraph.py", >> line 91, >> in scan_node >> m = self.load_file(filename, caller=node) >> File "build/bdist.macosx-10.3-i386/egg/macholib/MachOGraph.py", >> line 78, >> in load_file >> return self.load_file(newname, caller=caller) >> File "build/bdist.macosx-10.3-i386/egg/macholib/MachOGraph.py", >> line 80, >> in load_file >> m = self.createNode(MachO, name) >> File "build/bdist.macosx-10.3-i386/egg/macholib/ >> MachOStandalone.py", line >> 23, in createNode >> res = super(FilteredMachOGraph, self).createNode(cls, name) >> File "build/bdist.macosx-10.3-i386/egg/altgraph/ObjectGraph.py", >> line 148, >> in createNode >> m = cls(name, *args, **kw) >> File "build/bdist.macosx-10.3-i386/egg/macholib/MachO.py", line >> 61, in >> __init__ >> self.load(file(filename, 'rb')) >> File "build/bdist.macosx-10.3-i386/egg/macholib/MachO.py", line >> 71, in >> load >> self.load_fat(fh) >> File "build/bdist.macosx-10.3-i386/egg/macholib/MachO.py", line >> 82, in >> load_fat >> self.load_header(fh, arch.offset, arch.size) >> File "build/bdist.macosx-10.3-i386/egg/macholib/MachO.py", line >> 106, in >> load_header >> hdr = MachOHeader(self, fh, offset, size, magic, hdr, endian) >> File "build/bdist.macosx-10.3-i386/egg/macholib/MachO.py", line >> 146, in >> __init__ >> self.load(fh) >> File "build/bdist.macosx-10.3-i386/egg/macholib/MachO.py", line >> 178, in >> load >> raise ValueError("Unknown load command: %d" % (cmd_load.cmd,)) >> ValueError: Unknown load command: 27 >>> /Users/joel/Documents/OT Video Games/SAVI Learning Tool Prototype >>> ver >>> 2.3/build/bdist.macosx-10.3-i386/egg/macholib/MachO.py(178)load() >> (Pdb) cont >> I've tried using the debugger to determine what's going on but it >> remains a >> mystery. (OTOH, if I type "cont", it immediately ends the script and >> returns to the Unix prompt.) Any thoughts? >> Thanks for any help you're willing to provide -- from your sunny >> retirement >> as py2app maintainer! >> -- Joel, working desperately on a deadline... >> >> From Chris.Barker at noaa.gov Sat Jan 3 19:43:31 2009 From: Chris.Barker at noaa.gov (Chris.Barker) Date: Sat, 03 Jan 2009 10:43:31 -0800 Subject: [Pythonmac-SIG] py2app: how to exclude pygame_icon.icns ? In-Reply-To: <6a36e7290901022031w62b5c0ffyb6fcea9a3e242e2b@mail.gmail.com> References: <77F40406-CD61-4EA1-A1DA-3EBC800BE20D@yahoo.com> <6a36e7290812291224r4db65a96y93107b88f4314218@mail.gmail.com> <3E217F05-32C1-4942-90FE-F8388611CED7@yahoo.com> <6a36e7290901022031w62b5c0ffyb6fcea9a3e242e2b@mail.gmail.com> Message-ID: <495FB1D3.6010901@noaa.gov> Bob Ippolito wrote: > Unknown load command: 27 means it's seeing a load command (low level > Mach-O stuff) that it doesn't understand, which is reasonable because > I don't think I've updated the code since 10.4 or so and there are > probably some new ones. There have been some fixes for similar issues -- make sure you re using the latest py2app: easy_install py2app==dev (I think that's the call...) -Chris -- Christopher Barker, Ph.D. Oceanographer Emergency Response Division NOAA/NOS/OR&R (206) 526-6959 voice 7600 Sand Point Way NE (206) 526-6329 fax Seattle, WA 98115 (206) 526-6317 main reception Chris.Barker at noaa.gov From joelgluck at yahoo.com Sat Jan 3 19:43:54 2009 From: joelgluck at yahoo.com (Joel Gluck) Date: Sat, 3 Jan 2009 13:43:54 -0500 Subject: [Pythonmac-SIG] py2app: how to exclude pygame_icon.icns ? In-Reply-To: <6a36e7290901022031w62b5c0ffyb6fcea9a3e242e2b@mail.gmail.com> References: <77F40406-CD61-4EA1-A1DA-3EBC800BE20D@yahoo.com> <6a36e7290812291224r4db65a96y93107b88f4314218@mail.gmail.com> <3E217F05-32C1-4942-90FE-F8388611CED7@yahoo.com> <6a36e7290901022031w62b5c0ffyb6fcea9a3e242e2b@mail.gmail.com> Message-ID: <66F0F69D-5404-44C2-9B4E-E3555CB3C24C@yahoo.com> Hi all -- It seems I have solved my frameworks problem for now -- I simply copied all the frameworks I needed and manually stuck them inside my app (deleting all the unnecessary header folders). Not an automated process, but at least my python app now seems to run on other Macs. Also, I solved the pygame_icon problem by changing permissions (sudo chmod 777) on the "pygame" folder inside python.framework and overwriting pygame_icon.icns and pygame_icon.tiff (the .tiff file was the real culprit, I discovered) with my own version (same filenames, different contents). Thank you, Chris VB, Tom W, and Bob I! -- Joel On Jan 2, 2009, at 11:31 PM, Bob Ippolito wrote: > Unknown load command: 27 means it's seeing a load command (low level > Mach-O stuff) that it doesn't understand, which is reasonable because > I don't think I've updated the code since 10.4 or so and there are > probably some new ones. > > I only really worked on py2app, etc.when I was building Mac apps, and > I haven't in a few years. I spend my open source time working on more > server-side stuff. > > On Fri, Jan 2, 2009 at 8:17 PM, Joel Gluck > wrote: >> Hi Bob, >> Thanks for pointing me to the right place -- I was able to replace >> the >> pygame icon with my own as a temporary fix. >> I have two more questions (I know, you're not supporting py2app >> anymore, but >> you're basically the guru of this code so I thought I'd at least >> try to go >> directly to the source...!): >> 1) My built .app is missing frameworks pygame depends on. I'm >> trying to >> include them by using py2app's "frameworks" option, but it doesn't >> seem to >> work as advertised -- no matter how many ways I devise to give it a >> "comma-separated list of additional frameworks", it only adds the >> first >> framework in the list. (This is true whether from the command line >> or within >> the setup file as a py2app option.) Using the frameworks option >> multiple >> times does not seem to work. Is there a secret method? Currently >> I'm doing: >> APP = ['savi.py'] >> DATA_FILES = ['../gameplay', 'data', 'en'] >> OPTIONS = { 'argv_emulation': True, >> "iconfile": "mac_savi_icon.icns", >> "dist_dir":"mac_dist", >> "bdist_base":"mac_build", >> "frameworks": ["SDL_image.framework", "SDL_ttf.framework", >> "SDL_mixer.framework", "SDL.framework"], >> "includes":["Numeric"] } >> setup( app=APP, >> data_files=DATA_FILES, >> options={'py2app': OPTIONS}, >> setup_requires=['py2app'], >> version="0.2.3" ) >> 2) When I run "python setup.py py2app", it seems to run fine for a >> while but >> then hits a snag -- here's a traceback: >> copying /Library/Frameworks/SDL.framework/Versions/A/SDL -> >> /Users/joel/Documents/OT Video Games/SAVI Learning Tool Prototype ver >> 2.3/mac_dist/savi.app/Contents/Frameworks/SDL.framework/Versions/A >> linking /Users/joel/Documents/OT Video Games/SAVI Learning Tool >> Prototype >> ver 2.3/mac_dist/savi.app/Contents/Frameworks/SDL.framework/ >> Versions/Current >> -> A >> Traceback (most recent call last): >> File >> "/Users/joel/Library/Python/2.5/site-packages/py2app-0.3.6- >> py2.5.egg/py2app/build_app.py", >> line 548, in _run >> self.run_normal() >> File >> "/Users/joel/Library/Python/2.5/site-packages/py2app-0.3.6- >> py2.5.egg/py2app/build_app.py", >> line 619, in run_normal >> self.create_binaries(py_files, pkgdirs, extensions, loader_files) >> File >> "/Users/joel/Library/Python/2.5/site-packages/py2app-0.3.6- >> py2.5.egg/py2app/build_app.py", >> line 731, in create_binaries >> mm.mm.run_file(fmwk) >> File "build/bdist.macosx-10.3-i386/egg/macholib/MachOGraph.py", >> line 68, >> in run_file >> self.scan_node(m) >> File "build/bdist.macosx-10.3-i386/egg/macholib/MachOGraph.py", >> line 91, >> in scan_node >> m = self.load_file(filename, caller=node) >> File "build/bdist.macosx-10.3-i386/egg/macholib/MachOGraph.py", >> line 78, >> in load_file >> return self.load_file(newname, caller=caller) >> File "build/bdist.macosx-10.3-i386/egg/macholib/MachOGraph.py", >> line 80, >> in load_file >> m = self.createNode(MachO, name) >> File "build/bdist.macosx-10.3-i386/egg/macholib/ >> MachOStandalone.py", line >> 23, in createNode >> res = super(FilteredMachOGraph, self).createNode(cls, name) >> File "build/bdist.macosx-10.3-i386/egg/altgraph/ObjectGraph.py", >> line 148, >> in createNode >> m = cls(name, *args, **kw) >> File "build/bdist.macosx-10.3-i386/egg/macholib/MachO.py", line >> 61, in >> __init__ >> self.load(file(filename, 'rb')) >> File "build/bdist.macosx-10.3-i386/egg/macholib/MachO.py", line >> 71, in >> load >> self.load_fat(fh) >> File "build/bdist.macosx-10.3-i386/egg/macholib/MachO.py", line >> 82, in >> load_fat >> self.load_header(fh, arch.offset, arch.size) >> File "build/bdist.macosx-10.3-i386/egg/macholib/MachO.py", line >> 106, in >> load_header >> hdr = MachOHeader(self, fh, offset, size, magic, hdr, endian) >> File "build/bdist.macosx-10.3-i386/egg/macholib/MachO.py", line >> 146, in >> __init__ >> self.load(fh) >> File "build/bdist.macosx-10.3-i386/egg/macholib/MachO.py", line >> 178, in >> load >> raise ValueError("Unknown load command: %d" % (cmd_load.cmd,)) >> ValueError: Unknown load command: 27 >>> /Users/joel/Documents/OT Video Games/SAVI Learning Tool Prototype >>> ver >>> 2.3/build/bdist.macosx-10.3-i386/egg/macholib/MachO.py(178)load() >> (Pdb) cont >> I've tried using the debugger to determine what's going on but it >> remains a >> mystery. (OTOH, if I type "cont", it immediately ends the script and >> returns to the Unix prompt.) Any thoughts? >> Thanks for any help you're willing to provide -- from your sunny >> retirement >> as py2app maintainer! >> -- Joel, working desperately on a deadline... >> >> From hraban at fiee.net Sat Jan 3 20:56:01 2009 From: hraban at fiee.net (Henning Hraban Ramm) Date: Sat, 3 Jan 2009 20:56:01 +0100 Subject: [Pythonmac-SIG] py2app: how to exclude pygame_icon.icns ? In-Reply-To: <495FB1D3.6010901@noaa.gov> References: <77F40406-CD61-4EA1-A1DA-3EBC800BE20D@yahoo.com> <6a36e7290812291224r4db65a96y93107b88f4314218@mail.gmail.com> <3E217F05-32C1-4942-90FE-F8388611CED7@yahoo.com> <6a36e7290901022031w62b5c0ffyb6fcea9a3e242e2b@mail.gmail.com> <495FB1D3.6010901@noaa.gov> Message-ID: <4C24275C-0A86-4863-8F2A-C3855F0F5069@fiee.net> Am 2009-01-03 um 19:43 schrieb Chris.Barker: > There have been some fixes for similar issues -- make sure you re > using the latest py2app: > easy_install py2app==dev hraban$ easy_install py2app==dev Searching for py2app==dev Reading http://pypi.python.org/simple/py2app/ Reading http://undefined.org/python/#py2app Best match: py2app dev Downloading http://svn.pythonmac.org/py2app/py2app/trunk#egg=py2app-dev Doing subversion checkout from http://svn.pythonmac.org/py2app/py2app/trunk to /var/folders/zf/zftcL9hv2RWbrE+kNNWNeU+++TI/-Tmp-/easy_install- kWkCo1/trunk Processing trunk Running setup.py -q bdist_egg --dist-dir /var/folders/zf/zftcL9hv2RWbrE +kNNWNeU+++TI/-Tmp-/easy_install-kWkCo1/trunk/egg-dist-tmp-fb2jKv Removing py2app 0.3.6 from easy-install.pth file Adding py2app 0.4.2 to easy-install.pth file Installing py2applet script to /Library/Frameworks/Python.framework/ Versions/2.5/bin Installed /Library/Frameworks/Python.framework/Versions/2.5/lib/ python2.5/site-packages/py2app-0.4.2-py2.5.egg Processing dependencies for py2app==0.4.2 Searching for modulegraph>=0.7.2dev Reading http://pypi.python.org/simple/modulegraph/ Reading http://undefined.org/python/#modulegraph No local packages or download links found for modulegraph>=0.7.2dev error: Could not find suitable distribution for Requirement.parse('modulegraph>=0.7.2dev') Apparently there's no appropriate modulegraph. Is it important? Greetlings from Lake Constance! Hraban --- http://www.fiee.net https://www.cacert.org (I'm an assurer) From bob at redivi.com Sat Jan 3 21:54:07 2009 From: bob at redivi.com (Bob Ippolito) Date: Sat, 3 Jan 2009 12:54:07 -0800 Subject: [Pythonmac-SIG] py2app: how to exclude pygame_icon.icns ? In-Reply-To: <4C24275C-0A86-4863-8F2A-C3855F0F5069@fiee.net> References: <77F40406-CD61-4EA1-A1DA-3EBC800BE20D@yahoo.com> <6a36e7290812291224r4db65a96y93107b88f4314218@mail.gmail.com> <3E217F05-32C1-4942-90FE-F8388611CED7@yahoo.com> <6a36e7290901022031w62b5c0ffyb6fcea9a3e242e2b@mail.gmail.com> <495FB1D3.6010901@noaa.gov> <4C24275C-0A86-4863-8F2A-C3855F0F5069@fiee.net> Message-ID: <6a36e7290901031254k784d5e65q141eb42159d408f1@mail.gmail.com> I think that just means that you have to install modulegraph==dev on its own. On Sat, Jan 3, 2009 at 11:56 AM, Henning Hraban Ramm wrote: > Am 2009-01-03 um 19:43 schrieb Chris.Barker: >> >> There have been some fixes for similar issues -- make sure you re using >> the latest py2app: >> easy_install py2app==dev > > hraban$ easy_install py2app==dev > Searching for py2app==dev > Reading http://pypi.python.org/simple/py2app/ > Reading http://undefined.org/python/#py2app > Best match: py2app dev > Downloading http://svn.pythonmac.org/py2app/py2app/trunk#egg=py2app-dev > Doing subversion checkout from > http://svn.pythonmac.org/py2app/py2app/trunk to > /var/folders/zf/zftcL9hv2RWbrE+kNNWNeU+++TI/-Tmp-/easy_install-kWkCo1/trunk > Processing trunk > Running setup.py -q bdist_egg --dist-dir > /var/folders/zf/zftcL9hv2RWbrE+kNNWNeU+++TI/-Tmp-/easy_install-kWkCo1/trunk/egg-dist-tmp-fb2jKv > Removing py2app 0.3.6 from easy-install.pth file > Adding py2app 0.4.2 to easy-install.pth file > Installing py2applet script to > /Library/Frameworks/Python.framework/Versions/2.5/bin > > Installed > /Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/py2app-0.4.2-py2.5.egg > Processing dependencies for py2app==0.4.2 > Searching for modulegraph>=0.7.2dev > Reading http://pypi.python.org/simple/modulegraph/ > Reading http://undefined.org/python/#modulegraph > No local packages or download links found for modulegraph>=0.7.2dev > error: Could not find suitable distribution for > Requirement.parse('modulegraph>=0.7.2dev') > > > Apparently there's no appropriate modulegraph. Is it important? > > > Greetlings from Lake Constance! > Hraban > --- > http://www.fiee.net > https://www.cacert.org (I'm an assurer) > > > > > _______________________________________________ > Pythonmac-SIG maillist - Pythonmac-SIG at python.org > http://mail.python.org/mailman/listinfo/pythonmac-sig > From hraban at fiee.net Sat Jan 3 22:00:36 2009 From: hraban at fiee.net (Henning Hraban Ramm) Date: Sat, 3 Jan 2009 22:00:36 +0100 Subject: [Pythonmac-SIG] py2app: how to exclude pygame_icon.icns ? In-Reply-To: <6a36e7290901031254k784d5e65q141eb42159d408f1@mail.gmail.com> References: <77F40406-CD61-4EA1-A1DA-3EBC800BE20D@yahoo.com> <6a36e7290812291224r4db65a96y93107b88f4314218@mail.gmail.com> <3E217F05-32C1-4942-90FE-F8388611CED7@yahoo.com> <6a36e7290901022031w62b5c0ffyb6fcea9a3e242e2b@mail.gmail.com> <495FB1D3.6010901@noaa.gov> <4C24275C-0A86-4863-8F2A-C3855F0F5069@fiee.net> <6a36e7290901031254k784d5e65q141eb42159d408f1@mail.gmail.com> Message-ID: <2299D3C9-172E-4894-BC4A-03688F2833B8@fiee.net> Am 2009-01-03 um 21:54 schrieb Bob Ippolito: > I think that just means that you have to install modulegraph==dev on > its own. You're right, could have thought of that myself. Sorry for the noise. Greetlings from Lake Constance! Hraban --- http://www.fiee.net https://www.cacert.org (I'm an assurer) From gary.church1 at comcast.net Sun Jan 4 01:47:09 2009 From: gary.church1 at comcast.net (Gary Church) Date: Sat, 3 Jan 2009 16:47:09 -0800 Subject: [Pythonmac-SIG] python version confusion (continued) In-Reply-To: References: Message-ID: <891F9217-9DB1-4F6E-8211-28D53C4DB702@comcast.net> Thanks DavidW for the very informative link! I think my python installations may be a bit "wonky." Here's what I get when I enter: Macintosh-4:~ gary$ ls -l /Library/Frameworks/Python.framework/Versions/ total 8 drwxr-xr-x 7 root wheel 238 Mar 11 2008 2.3 drwxr-xr-x 11 root wheel 374 Mar 11 2008 2.5 drwxrwxr-x 10 root wheel 340 Oct 1 16:52 2.6 lrwxr-xr-x 1 root wheel 3 Dec 28 17:19 Current -> 2.6 and what I get when I enter: Macintosh-4:~ gary$ ls -l /System/Library/Frameworks/Python.framework/ Versions/ total 8 drwxr-xr-x 7 root wheel 238 Mar 11 2008 2.3 drwxr-xr-x 11 root wheel 374 Mar 11 2008 2.5 drwxrwxr-x 10 root wheel 340 Oct 1 16:52 2.6 lrwxr-xr-x 1 root wheel 3 Dec 28 17:19 Current -> 2.6 It appears to me that these are identical, though the /System/Library/ directory is supposed to be where Apple installs it's apps. Some how I must have done something kinda screwy. Also, it's puzzling to me that "Current" in both cases is linked to 2.6, yet when I enter "python" from my home directory, I'm getting Python 2.5.1. Last puzzlement, When I enter "python" from my home directory, how does it know which python to reference? There must be some way it chooses one python over another. What's the best way to sort my seemingly confused system out? Thanks much again, Gary On Jan 2, 2009, at 8:18 PM, pythonmac-sig-request at python.org wrote: > From: DavidW > Date: January 2, 2009 5:12:27 PM PST > To: Gary Church > Cc: pythonmac-sig at python.org > Subject: Re: [Pythonmac-SIG] python version confusion; can someone > provide some clarity, please? > > > Hi Gary - welcome to the list. > This is a frequent question so a search of the archive might help, > but here's my explanation: > http://www.avatar.com.au/sonipy/pythonInstall.html > > HNY, > David Gary Church gary.church1 at comcast.net From vip at avatar.com.au Sun Jan 4 11:28:37 2009 From: vip at avatar.com.au (DavidW) Date: Sun, 4 Jan 2009 21:28:37 +1100 Subject: [Pythonmac-SIG] python version confusion (continued) In-Reply-To: <891F9217-9DB1-4F6E-8211-28D53C4DB702@comcast.net> References: <891F9217-9DB1-4F6E-8211-28D53C4DB702@comcast.net> Message-ID: <89C153C2-1507-4D33-BB40-6912D3C180B8@avatar.com.au> On 04/01/2009, at 11:47 AM, Gary Church wrote: > Thanks DavidW for the very informative link! > > I think my python installations may be a bit "wonky." Here's what I > get when I enter: > > Macintosh-4:~ gary$ ls -l /Library/Frameworks/Python.framework/ > Versions/ > total 8 > drwxr-xr-x 7 root wheel 238 Mar 11 2008 2.3 > drwxr-xr-x 11 root wheel 374 Mar 11 2008 2.5 > drwxrwxr-x 10 root wheel 340 Oct 1 16:52 2.6 > lrwxr-xr-x 1 root wheel 3 Dec 28 17:19 Current -> 2.6 > that looks ok. It's possible to maintain more than one version simultaneously. Then if you wanted to use v2.5 you just change the Current symlink to that in the Versions dir, as above. Note that each version has its own 3rd party packages directory. I'm using 2.5 so for me it is at /Library/Frameworks/Python.framework/Versions/Current/lib/python2.5/ site-packages/ > and what I get when I enter: > > Macintosh-4:~ gary$ ls -l /System/Library/Frameworks/ > Python.framework/Versions/ > total 8 > drwxr-xr-x 7 root wheel 238 Mar 11 2008 2.3 > drwxr-xr-x 11 root wheel 374 Mar 11 2008 2.5 > drwxrwxr-x 10 root wheel 340 Oct 1 16:52 2.6 > lrwxr-xr-x 1 root wheel 3 Dec 28 17:19 Current -> 2.6 > This is where the apple distributed directories are. Not sure why. Perhaps you;ve kept them (up to 2.5.1, I think) as a result of OS upgrades. I think most macpython users don't use them, unless you're specifically needing to check that something runs on a default sys. setup, preferring, instead, to use those in /Library/Frameworks/ Python.framework/Versions/. > It appears to me that these are identical, though the /System/ > Library/ directory is supposed to be where Apple installs it's apps. > Some how I must have done something kinda screwy. > Perhaps. I don't think apple has distributed a v2.6 yet. > Also, it's puzzling to me that "Current" in both cases is linked to > 2.6, yet when I enter "python" from my home directory, I'm getting > Python 2.5.1. > My guess is that it's loading the apple distributed one in System/ Library/Frameworks/Python.framework/Versions/2.5 try, at the unix prompt % which python You should also check whether there is a shell variable $PYTHONPATH -- % echo $PYTHONPATH depending on the results of those queries, you can force it to use a particular one. Say which shell you're using (bash?, sh? csh?) David. > Last puzzlement, When I enter "python" from my home directory, how > does it know which python to reference? There must be some way it > chooses one python over another. > > What's the best way to sort my seemingly confused system out? > > Thanks much again, > Gary > > On Jan 2, 2009, at 8:18 PM, pythonmac-sig-request at python.org wrote: >> From: DavidW >> Date: January 2, 2009 5:12:27 PM PST >> To: Gary Church >> Cc: pythonmac-sig at python.org >> Subject: Re: [Pythonmac-SIG] python version confusion; can someone >> provide some clarity, please? >> >> >> Hi Gary - welcome to the list. >> This is a frequent question so a search of the archive might help, >> but here's my explanation: >> http://www.avatar.com.au/sonipy/pythonInstall.html >> >> HNY, >> David > > Gary Church > gary.church1 at comcast.net > > > > _______________________________________________ > Pythonmac-SIG maillist - Pythonmac-SIG at python.org > http://mail.python.org/mailman/listinfo/pythonmac-sig > ________________________________________________ David Worrall. - Experimental Polymedia: www.avatar.com.au - Education for Financial Independence: www.mindthemarkets.com.au Australian research affiliations: - Capital Markets Cooperative Research Centre: www.cmcrc.com - Sonic Communications Research Group: creative.canberra.edu.au/scrg ________________________________________________ David Worrall. - Experimental Polymedia: www.avatar.com.au - Education for Financial Independence: www.mindthemarkets.com.au Australian research affiliations: - Capital Markets Cooperative Research Centre: www.cmcrc.com - Sonic Communications Research Group: creative.canberra.edu.au/scrg - MARCS Auditory Laboratories: marcs.uws.edu.au From pdorange at mac.com Sun Jan 4 11:47:39 2009 From: pdorange at mac.com (Pierre-Alain Dorange) Date: Sun, 4 Jan 2009 11:47:39 +0100 Subject: [Pythonmac-SIG] Python App with py2app/pygame crash Message-ID: <1it0nui.crpmzs1sub27oN%pdorange@mac.com> Building a bundle application with py2app 0.4.2 it create an application that crash at launch. If a bundle a basic python script (no pygame) it seem to works fine. My config : MacOS 10.5.6 Python 2.5.2 (original came with MacOS) Pygame 1.8.1 rc1 () py2app 0.4.2 (easy_install) Few weeks ago with MacOS X 10.4 and a custom python 2.5.2 it works perfectly... Can't figure out why it crash now, bellow the bug report : Process: PyFrogger [1764] Path: /Volumes/Documents/PAD/Dev/PyGame/Frogger/dist/PyFrogger.app/Contents/Ma cOS/PyFrogger Identifier: org.maddog.pyfrogger Version: 1.0 (0.0.0) Code Type: X86 (Native) Parent Process: launchd [1652] Date/Time: 2009-01-04 11:26:29.290 +0100 OS Version: Mac OS X 10.5.6 (9G55) Report Version: 6 Exception Type: EXC_BAD_ACCESS (SIGABRT) Exception Codes: KERN_PROTECTION_FAILURE at 0x0000000000000004 Crashed Thread: 0 Thread 0 Crashed: 0 libSystem.B.dylib 0x961b8e42 __kill + 10 1 libSystem.B.dylib 0x9622b23a raise + 26 2 libSystem.B.dylib 0x96237679 abort + 73 3 org.python.python 0x003b83b1 Py_AtExit + 0 4 libSystem.B.dylib 0x961b72bb _sigtramp + 43 5 ??? 0xffffffff 0 + 4294967295 6 color.so 0x007d0f61 initcolor + 1297 7 org.python.python 0x003596b4 _PyObject_SlotCompare + 7290 8 org.python.python 0x00309b00 PyObject_Call + 45 9 org.python.python 0x00390d2f PyEval_EvalFrameEx + 6055 10 org.python.python 0x003949ce PyEval_EvalFrameEx + 21574 11 org.python.python 0x00395e0e PyEval_EvalCodeEx + 1819 12 org.python.python 0x0032ae6b PyFunction_SetClosure + 2019 13 org.python.python 0x00309b00 PyObject_Call + 45 14 org.python.python 0x003117ae PyMethod_New + 2432 15 org.python.python 0x00309b00 PyObject_Call + 45 16 org.python.python 0x00390d2f PyEval_EvalFrameEx + 6055 17 org.python.python 0x00395e0e PyEval_EvalCodeEx + 1819 18 org.python.python 0x0032ae6b PyFunction_SetClosure + 2019 19 org.python.python 0x00309b00 PyObject_Call + 45 20 org.python.python 0x003117ae PyMethod_New + 2432 21 org.python.python 0x00309b00 PyObject_Call + 45 22 org.python.python 0x0038e6fe PyEval_CallObjectWithKeywords + 112 23 org.python.python 0x00313ce9 PyInstance_New + 114 24 org.python.python 0x00309b00 PyObject_Call + 45 25 org.python.python 0x00390d2f PyEval_EvalFrameEx + 6055 26 org.python.python 0x003949ce PyEval_EvalFrameEx + 21574 27 org.python.python 0x003949ce PyEval_EvalFrameEx + 21574 28 org.python.python 0x00395e0e PyEval_EvalCodeEx + 1819 29 org.python.python 0x00395fc2 PyEval_EvalCode + 87 30 org.python.python 0x003b936d PyRun_FileExFlags + 260 31 org.python.python 0x0038a5e7 PyAST_FromNode + 7521 32 org.python.python 0x00395593 PyEval_EvalFrameEx + 24587 33 org.python.python 0x00395e0e PyEval_EvalCodeEx + 1819 34 org.python.python 0x00393618 PyEval_EvalFrameEx + 16528 35 org.python.python 0x00395e0e PyEval_EvalCodeEx + 1819 36 org.python.python 0x00395fc2 PyEval_EvalCode + 87 37 org.python.python 0x003b936d PyRun_FileExFlags + 260 38 org.python.python 0x003b9707 PyRun_SimpleFileExFlags + 640 39 org.python.python 0x003b98aa PyRun_SimpleFile + 40 40 org.maddog.pyfrogger 0x00007b9f start + 23863 41 org.maddog.pyfrogger 0x00008091 main + 297 42 org.maddog.pyfrogger 0x00001f63 start + 251 43 org.maddog.pyfrogger 0x00001e91 start + 41 Thread 1: 0 libSystem.B.dylib 0x9614b1c6 mach_msg_trap + 10 1 libSystem.B.dylib 0x961529bc mach_msg + 72 2 com.apple.CoreFoundation 0x9191e0ae CFRunLoopRunSpecific + 1790 3 com.apple.CoreFoundation 0x9191ecd8 CFRunLoopRunInMode + 88 4 com.apple.audio.CoreAudio 0x967b05dc HALRunLoop::OwnThread(void*) + 160 5 com.apple.audio.CoreAudio 0x967b0464 CAPThread::Entry(CAPThread*) + 96 6 libSystem.B.dylib 0x9617c095 _pthread_start + 321 7 libSystem.B.dylib 0x9617bf52 thread_start + 34 Thread 0 crashed with X86 Thread State (32-bit): eax: 0x00000000 ebx: 0x96237639 ecx: 0xbfffc97c edx: 0x961b8e42 edi: 0x00761700 esi: 0xbfffccf0 ebp: 0xbfffc998 esp: 0xbfffc97c ss: 0x0000001f efl: 0x00000282 eip: 0x961b8e42 cs: 0x00000007 ds: 0x0000001f es: 0x0000001f fs: 0x00000000 gs: 0x00000037 cr2: 0xa07a1880 Binary Images: 0x1000 - 0x8ffd +org.maddog.pyfrogger 1.0 (0.0.0) <0d5afbf20875ca99fc4b0079e08a5cff> /Volumes/Documents/PAD/Dev/PyGame/Frogger/dist/PyFrogger.app/Contents/Ma cOS/PyFrogger 0x58000 - 0x59ffb +math.so ??? (???) /Volumes/Documents/PAD/Dev/PyGame/Frogger/dist/PyFrogger.app/Contents/Re sources/lib/python2.5/lib-dynload/math.so 0xa4000 - 0xb5ffd +zlib.so ??? (???) /Volumes/Documents/PAD/Dev/PyGame/Frogger/dist/PyFrogger.app/Contents/Re sources/lib/python2.5/lib-dynload/zlib.so 0xd1000 - 0xd3fff +binascii.so ??? (???) /Volumes/Documents/PAD/Dev/PyGame/Frogger/dist/PyFrogger.app/Contents/Re sources/lib/python2.5/lib-dynload/binascii.so 0xd8000 - 0xd9ff3 +_random.so ??? (???) /Volumes/Documents/PAD/Dev/PyGame/Frogger/dist/PyFrogger.app/Contents/Re sources/lib/python2.5/lib-dynload/_random.so 0xdd000 - 0xeafff +parser.so ??? (???) /Volumes/Documents/PAD/Dev/PyGame/Frogger/dist/PyFrogger.app/Contents/Re sources/lib/python2.5/lib-dynload/parser.so 0xee000 - 0xf1ffb +_struct.so ??? (???) /Volumes/Documents/PAD/Dev/PyGame/Frogger/dist/PyFrogger.app/Contents/Re sources/lib/python2.5/lib-dynload/_struct.so 0xf5000 - 0xf6fff +cStringIO.so ??? (???) /Volumes/Documents/PAD/Dev/PyGame/Frogger/dist/PyFrogger.app/Contents/Re sources/lib/python2.5/lib-dynload/cStringIO.so 0x300000 - 0x3f5fe3 +org.python.python 2.5 (2.5) /Volumes/Documents/PAD/Dev/PyGame/Frogger/dist/PyFrogger.app/Contents/Fr ameworks/Python.framework/Versions/2.5/Python 0x4bd000 - 0x4c0fff +strop.so ??? (???) /Volumes/Documents/PAD/Dev/PyGame/Frogger/dist/PyFrogger.app/Contents/Re sources/lib/python2.5/lib-dynload/strop.so 0x4c5000 - 0x4edfff +_objc.so ??? (???) /Volumes/Documents/PAD/Dev/PyGame/Frogger/dist/PyFrogger.app/Contents/Re sources/lib/python2.5/lib-dynload/objc/_objc.so 0x4fd000 - 0x500fff +itertools.so ??? (???) /Volumes/Documents/PAD/Dev/PyGame/Frogger/dist/PyFrogger.app/Contents/Re sources/lib/python2.5/lib-dynload/itertools.so 0x505000 - 0x509083 +array.so ??? (???) /Volumes/Documents/PAD/Dev/PyGame/Frogger/dist/PyFrogger.app/Contents/Re sources/lib/python2.5/lib-dynload/array.so 0x50e000 - 0x514fff +_File.so ??? (???) /Volumes/Documents/PAD/Dev/PyGame/Frogger/dist/PyFrogger.app/Contents/Re sources/lib/python2.5/lib-dynload/_File.so 0x61d000 - 0x636fff +_AppKit.so ??? (???) /Volumes/Documents/PAD/Dev/PyGame/Frogger/dist/PyFrogger.app/Contents/Re sources/lib/python2.5/lib-dynload/AppKit/_AppKit.so 0x763000 - 0x77fff7 +_Foundation.so ??? (???) /Volumes/Documents/PAD/Dev/PyGame/Frogger/dist/PyFrogger.app/Contents/Re sources/lib/python2.5/lib-dynload/Foundation/_Foundation.so 0x78e000 - 0x791fff +_AE.so ??? (???) /Volumes/Documents/PAD/Dev/PyGame/Frogger/dist/PyFrogger.app/Contents/Re sources/lib/python2.5/lib-dynload/_AE.so 0x7b4000 - 0x7b5ff3 +base.so ??? (???) /Volumes/Documents/PAD/Dev/PyGame/Frogger/dist/PyFrogger.app/Contents/Re sources/lib/python2.5/lib-dynload/pygame/base.so 0x7b9000 - 0x7bbff4 +constants.so ??? (???) <4bc0b86fd98117e423bfa6b825715004> /Volumes/Documents/PAD/Dev/PyGame/Frogger/dist/PyFrogger.app/Contents/Re sources/lib/python2.5/lib-dynload/pygame/constants.so 0x7bf000 - 0x7c2ff1 +rect.so ??? (???) /Volumes/Documents/PAD/Dev/PyGame/Frogger/dist/PyFrogger.app/Contents/Re sources/lib/python2.5/lib-dynload/pygame/rect.so 0x7c6000 - 0x7c7ff4 +rwobject.so ??? (???) /Volumes/Documents/PAD/Dev/PyGame/Frogger/dist/PyFrogger.app/Contents/Re sources/lib/python2.5/lib-dynload/pygame/rwobject.so 0x7cb000 - 0x7cbff2 +surflock.so ??? (???) /Volumes/Documents/PAD/Dev/PyGame/Frogger/dist/PyFrogger.app/Contents/Re sources/lib/python2.5/lib-dynload/pygame/surflock.so 0x7cf000 - 0x7d2fff +color.so ??? (???) <0d619dc3cfc739a9fcbc7b1e65878e85> /Volumes/Documents/PAD/Dev/PyGame/Frogger/dist/PyFrogger.app/Contents/Re sources/lib/python2.5/lib-dynload/pygame/color.so 0x7d6000 - 0x7d8ff7 +cdrom.so ??? (???) /Volumes/Documents/PAD/Dev/PyGame/Frogger/dist/PyFrogger.app/Contents/Re sources/lib/python2.5/lib-dynload/pygame/cdrom.so 0x7dc000 - 0x7dffff +display.so ??? (???) /Volumes/Documents/PAD/Dev/PyGame/Frogger/dist/PyFrogger.app/Contents/Re sources/lib/python2.5/lib-dynload/pygame/display.so 0x7e3000 - 0x7ebfff +draw.so ??? (???) /Volumes/Documents/PAD/Dev/PyGame/Frogger/dist/PyFrogger.app/Contents/Re sources/lib/python2.5/lib-dynload/pygame/draw.so 0x7ef000 - 0x7f2ff7 +event.so ??? (???) <0a0d4d7df005ff34e2e3926468bddc81> /Volumes/Documents/PAD/Dev/PyGame/Frogger/dist/PyFrogger.app/Contents/Re sources/lib/python2.5/lib-dynload/pygame/event.so 0x7f6000 - 0x7faff6 +image.so ??? (???) /Volumes/Documents/PAD/Dev/PyGame/Frogger/dist/PyFrogger.app/Contents/Re sources/lib/python2.5/lib-dynload/pygame/image.so 0x19c5000 - 0x19f8ff7 +surface.so ??? (???) <3c9d2c8c65ec036719b2c763cfffca6b> /Volumes/Documents/PAD/Dev/PyGame/Frogger/dist/PyFrogger.app/Contents/Re sources/lib/python2.5/lib-dynload/pygame/surface.so 0x19fc000 - 0x19fcffd +key.so ??? (???) /Volumes/Documents/PAD/Dev/PyGame/Frogger/dist/PyFrogger.app/Contents/Re sources/lib/python2.5/lib-dynload/pygame/key.so 0x1b00000 - 0x1b66fc3 +SDL 1.2.13 (1.2.13) <7d73799e7426d43c89d3ebcbf65520de> /Volumes/Documents/PAD/Dev/PyGame/Frogger/dist/PyFrogger.app/Contents/Fr ameworks/SDL.framework/Versions/A/SDL 0x1bb8000 - 0x1bd2fef +imageext.so ??? (???) <0c76c9232a2e82e7e50341bf16a294e8> /Volumes/Documents/PAD/Dev/PyGame/Frogger/dist/PyFrogger.app/Contents/Re sources/lib/python2.5/lib-dynload/pygame/imageext.so 0x1bd8000 - 0x1bd9ff7 +joystick.so ??? (???) <46d5fc386f7391aee609a763c469d2b2> /Volumes/Documents/PAD/Dev/PyGame/Frogger/dist/PyFrogger.app/Contents/Re sources/lib/python2.5/lib-dynload/pygame/joystick.so 0x1bdd000 - 0x1bdeff4 +mouse.so ??? (???) <315f61b09d3eff4fb2e5474a4e3e3d7c> /Volumes/Documents/PAD/Dev/PyGame/Frogger/dist/PyFrogger.app/Contents/Re sources/lib/python2.5/lib-dynload/pygame/mouse.so 0x1be2000 - 0x1be3ffb +time.so ??? (???) <92aa5e016ec7dc174eb88cd2ac9eeff9> /Volumes/Documents/PAD/Dev/PyGame/Frogger/dist/PyFrogger.app/Contents/Re sources/lib/python2.5/lib-dynload/pygame/time.so 0x1be7000 - 0x1beaff6 +mask.so ??? (???) <1d6ccf34f80312f569afbadc6faf18cc> /Volumes/Documents/PAD/Dev/PyGame/Frogger/dist/PyFrogger.app/Contents/Re sources/lib/python2.5/lib-dynload/pygame/mask.so 0x1bee000 - 0x1befff3 +time.so ??? (???) /Volumes/Documents/PAD/Dev/PyGame/Frogger/dist/PyFrogger.app/Contents/Re sources/lib/python2.5/lib-dynload/time.so 0x1bf4000 - 0x1bf6fff +collections.so ??? (???) /Volumes/Documents/PAD/Dev/PyGame/Frogger/dist/PyFrogger.app/Contents/Re sources/lib/python2.5/lib-dynload/collections.so 0x1bfa000 - 0x1c01ff7 +pixelarray.so ??? (???) <0547dcd5d1ea18056dd2fc878405784a> /Volumes/Documents/PAD/Dev/PyGame/Frogger/dist/PyFrogger.app/Contents/Re sources/lib/python2.5/lib-dynload/pygame/pixelarray.so 0x1c05000 - 0x1c05ff5 +overlay.so ??? (???) /Volumes/Documents/PAD/Dev/PyGame/Frogger/dist/PyFrogger.app/Contents/Re sources/lib/python2.5/lib-dynload/pygame/overlay.so 0x1c09000 - 0x1c11ffb +transform.so ??? (???) /Volumes/Documents/PAD/Dev/PyGame/Frogger/dist/PyFrogger.app/Contents/Re sources/lib/python2.5/lib-dynload/pygame/transform.so 0x1c15000 - 0x1c17fff +font.so ??? (???) <5f073705bb130e0b63c3a812a13ba9ff> /Volumes/Documents/PAD/Dev/PyGame/Frogger/dist/PyFrogger.app/Contents/Re sources/lib/python2.5/lib-dynload/pygame/font.so 0x1c1b000 - 0x1c1efff +mixer.so ??? (???) /Volumes/Documents/PAD/Dev/PyGame/Frogger/dist/PyFrogger.app/Contents/Re sources/lib/python2.5/lib-dynload/pygame/mixer.so 0x1c22000 - 0x1c23ffb +movie.so ??? (???) <80eada66c5e94f9e7231c2f11305d955> /Volumes/Documents/PAD/Dev/PyGame/Frogger/dist/PyFrogger.app/Contents/Re sources/lib/python2.5/lib-dynload/pygame/movie.so 0x1c27000 - 0x1c5efe6 com.apple.carbonframeworktemplate 1.0 (1.0) /Volumes/Documents/PAD/Dev/PyGame/Frogger/dist/PyFrogger.app/Contents/Fr ameworks/smpeg.framework/Versions/A/smpeg 0x1c87000 - 0x1c87fff +scrap.so ??? (???) <8c543d66a2f74f4587eb58ec69cd7f09> /Volumes/Documents/PAD/Dev/PyGame/Frogger/dist/PyFrogger.app/Contents/Re sources/lib/python2.5/lib-dynload/pygame/scrap.so 0x1c8b000 - 0x1c8fff6 +_numericsurfarray.so ??? (???) <3fc5b83582743cb1027a2843b5f639f5> /Volumes/Documents/PAD/Dev/PyGame/Frogger/dist/PyFrogger.app/Contents/Re sources/lib/python2.5/lib-dynload/pygame/_numericsurfarray.so 0x1c93000 - 0x1c97ff3 +multiarray.so ??? (???) /Volumes/Documents/PAD/Dev/PyGame/Frogger/dist/PyFrogger.app/Contents/Re sources/lib/python2.5/lib-dynload/multiarray.so 0x1c9b000 - 0x1cadfff +_numpy.so ??? (???) /Volumes/Documents/PAD/Dev/PyGame/Frogger/dist/PyFrogger.app/Contents/Re sources/lib/python2.5/lib-dynload/_numpy.so 0x1cb3000 - 0x1cbffe7 +umath.so ??? (???) /Volumes/Documents/PAD/Dev/PyGame/Frogger/dist/PyFrogger.app/Contents/Re sources/lib/python2.5/lib-dynload/umath.so 0x1cc4000 - 0x1cc4ffc +_bisect.so ??? (???) /Volumes/Documents/PAD/Dev/PyGame/Frogger/dist/PyFrogger.app/Contents/Re sources/lib/python2.5/lib-dynload/_bisect.so 0x1d09000 - 0x1d0bffb +_dotblas.so ??? (???) /Volumes/Documents/PAD/Dev/PyGame/Frogger/dist/PyFrogger.app/Contents/Re sources/lib/python2.5/lib-dynload/_dotblas.so 0x1d0f000 - 0x1d11fff +operator.so ??? (???) /Volumes/Documents/PAD/Dev/PyGame/Frogger/dist/PyFrogger.app/Contents/Re sources/lib/python2.5/lib-dynload/operator.so 0x1d56000 - 0x1d57ffd +_heapq.so ??? (???) /Volumes/Documents/PAD/Dev/PyGame/Frogger/dist/PyFrogger.app/Contents/Re sources/lib/python2.5/lib-dynload/_heapq.so 0x1d5c000 - 0x1d5dfff +fcntl.so ??? (???) /Volumes/Documents/PAD/Dev/PyGame/Frogger/dist/PyFrogger.app/Contents/Re sources/lib/python2.5/lib-dynload/fcntl.so 0x1da1000 - 0x1e0301b +multiarray.so ??? (???) /Volumes/Documents/PAD/Dev/PyGame/Frogger/dist/PyFrogger.app/Contents/Re sources/lib/python2.5/numpy/core/multiarray.so 0x1e11000 - 0x1e34ff7 +umath.so ??? (???) /Volumes/Documents/PAD/Dev/PyGame/Frogger/dist/PyFrogger.app/Contents/Re sources/lib/python2.5/numpy/core/umath.so 0x1e3c000 - 0x1e4dfff +_sort.so ??? (???) /Volumes/Documents/PAD/Dev/PyGame/Frogger/dist/PyFrogger.app/Contents/Re sources/lib/python2.5/numpy/core/_sort.so 0x1e51000 - 0x1e55ff3 +_dotblas.so ??? (???) /Volumes/Documents/PAD/Dev/PyGame/Frogger/dist/PyFrogger.app/Contents/Re sources/lib/python2.5/numpy/core/_dotblas.so 0x1e59000 - 0x1e66fff +cPickle.so ??? (???) /Volumes/Documents/PAD/Dev/PyGame/Frogger/dist/PyFrogger.app/Contents/Re sources/lib/python2.5/lib-dynload/cPickle.so 0x1e6b000 - 0x1e6cfff +mmap.so ??? (???) /Volumes/Documents/PAD/Dev/PyGame/Frogger/dist/PyFrogger.app/Contents/Re sources/lib/python2.5/lib-dynload/mmap.so 0x1e76000 - 0x1e77ff3 +_compiled_base.so ??? (???) /Volumes/Documents/PAD/Dev/PyGame/Frogger/dist/PyFrogger.app/Contents/Re sources/lib/python2.5/numpy/lib/_compiled_base.so 0x1ec2000 - 0x1ed9feb +scalarmath.so ??? (???) /Volumes/Documents/PAD/Dev/PyGame/Frogger/dist/PyFrogger.app/Contents/Re sources/lib/python2.5/numpy/core/scalarmath.so 0x1f1d000 - 0x1f22fff +lapack_lite.so ??? (???) /Volumes/Documents/PAD/Dev/PyGame/Frogger/dist/PyFrogger.app/Contents/Re sources/lib/python2.5/numpy/linalg/lapack_lite.so 0x1f26000 - 0x1f2efff +fftpack_lite.so ??? (???) /Volumes/Documents/PAD/Dev/PyGame/Frogger/dist/PyFrogger.app/Contents/Re sources/lib/python2.5/numpy/fft/fftpack_lite.so 0x1f32000 - 0x1f63fff +mtrand.so ??? (???) /Volumes/Documents/PAD/Dev/PyGame/Frogger/dist/PyFrogger.app/Contents/Re sources/lib/python2.5/numpy/random/mtrand.so 0x1f72000 - 0x1f81ff3 +_ctypes.so ??? (???) /Volumes/Documents/PAD/Dev/PyGame/Frogger/dist/PyFrogger.app/Contents/Re sources/lib/python2.5/lib-dynload/_ctypes.so 0x1f88000 - 0x1f88ffd +gestalt.so ??? (???) /Volumes/Documents/PAD/Dev/PyGame/Frogger/dist/PyFrogger.app/Contents/Re sources/lib/python2.5/lib-dynload/gestalt.so 0x1f8c000 - 0x1f8cfff +_numericsndarray.so ??? (???) /Volumes/Documents/PAD/Dev/PyGame/Frogger/dist/PyFrogger.app/Contents/Re sources/lib/python2.5/lib-dynload/pygame/_numericsndarray.so 0x1fd1000 - 0x1fd1ffb +fastevent.so ??? (???) /Volumes/Documents/PAD/Dev/PyGame/Frogger/dist/PyFrogger.app/Contents/Re sources/lib/python2.5/lib-dynload/pygame/fastevent.so 0x1fd5000 - 0x1fd6ffb +mixer_music.so ??? (???) /Volumes/Documents/PAD/Dev/PyGame/Frogger/dist/PyFrogger.app/Contents/Re sources/lib/python2.5/lib-dynload/pygame/mixer_music.so 0x1fda000 - 0x1fdbfff +_Folder.so ??? (???) /Volumes/Documents/PAD/Dev/PyGame/Frogger/dist/PyFrogger.app/Contents/Re sources/lib/python2.5/lib-dynload/_Folder.so 0x1fdf000 - 0x1fe0ffd +MacOS.so ??? (???) /Volumes/Documents/PAD/Dev/PyGame/Frogger/dist/PyFrogger.app/Contents/Re sources/lib/python2.5/lib-dynload/MacOS.so 0x1207c000 - 0x12272fff com.apple.RawCamera.bundle 2.0.12 (421) <02fe3f4ea6251f7b2d23d855ce5c5fd2> /System/Library/CoreServices/RawCamera.bundle/Contents/MacOS/RawCamera 0x1642a000 - 0x1642dfef com.apple.LiveType.component 2.1.3 (2.1.3) /Library/QuickTime/LiveType.component/Contents/MacOS/LiveType 0x16432000 - 0x16435fff com.apple.audio.AudioIPCPlugIn 1.0.5 (1.0.5) /System/Library/Extensions/AudioIPCDriver.kext/Contents/Resources/AudioI PCPlugIn.bundle/Contents/MacOS/AudioIPCPlugIn 0x1643b000 - 0x16440fff com.apple.audio.AppleHDAHALPlugIn 1.6.2 (1.6.2a37) /System/Library/Extensions/AppleHDA.kext/Contents/PlugIns/AppleHDAHALPlu gIn.bundle/Contents/MacOS/AppleHDAHALPlugIn 0x164dc000 - 0x16541fde com.apple.LiveType.framework 2.1.3 (2.1.3) /System/Library/PrivateFrameworks/LiveType.framework/Versions/A/LiveType 0x16561000 - 0x165cefff +com.DivXInc.DivXDecoder 6.6.0 (6.6.0) /Library/QuickTime/DivX Decoder.component/Contents/MacOS/DivX Decoder 0x31000000 - 0x3103efeb +SDL_image 1.2.3 (1.2.3) /Volumes/Documents/PAD/Dev/PyGame/Frogger/dist/PyFrogger.app/Contents/Fr ameworks/SDL_image.framework/Versions/A/SDL_image 0x32000000 - 0x32083fef +SDL_mixer 1.2.5 (1.2.5) /Volumes/Documents/PAD/Dev/PyGame/Frogger/dist/PyFrogger.app/Contents/Fr ameworks/SDL_mixer.framework/Versions/A/SDL_mixer 0x34000000 - 0x3405cfcf +SDL_ttf 2.0.6 (2.0.6) /Volumes/Documents/PAD/Dev/PyGame/Frogger/dist/PyFrogger.app/Contents/Fr ameworks/SDL_ttf.framework/Versions/A/SDL_ttf 0x70000000 - 0x700e6ff2 com.apple.audio.units.Components 1.5.2 (1.5.2) /System/Library/Components/CoreAudio.component/Contents/MacOS/CoreAudio 0x8fe00000 - 0x8fe2db43 dyld 97.1 (???) <100d362e03410f181a34e04e94189ae5> /usr/lib/dyld 0x900f8000 - 0x900fffff com.apple.agl 3.0.9 (AGL-3.0.9) <2f39c480cfcee9358a23d61b20a6aa56> /System/Library/Frameworks/AGL.framework/Versions/A/AGL 0x90100000 - 0x90100ffb com.apple.installserver.framework 1.0 (8) /System/Library/PrivateFrameworks/InstallServer.framework/Versions/A/Ins tallServer 0x90101000 - 0x9014afef com.apple.Metadata 10.5.2 (398.25) /System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/ Metadata.framework/Versions/A/Metadata 0x90186000 - 0x90186ffa com.apple.CoreServices 32 (32) <2fcc8f3bd5bbfc000b476cad8e6a3dd2> /System/Library/Frameworks/CoreServices.framework/Versions/A/CoreService s 0x901f5000 - 0x90272fef libvMisc.dylib ??? (???) /System/Library/Frameworks/Accelerate.framework/Versions/A/Frameworks/ve cLib.framework/Versions/A/libvMisc.dylib 0x90273000 - 0x9027afe9 libgcc_s.1.dylib ??? (???) /usr/lib/libgcc_s.1.dylib 0x9027b000 - 0x9029ffff libxslt.1.dylib ??? (???) <0a9778d6368ae668826f446878deb99b> /usr/lib/libxslt.1.dylib 0x902c8000 - 0x902d0fff com.apple.DiskArbitration 2.2.1 (2.2.1) <75b0c8d8940a8a27816961dddcac8e0f> /System/Library/Frameworks/DiskArbitration.framework/Versions/A/DiskArbi tration 0x902d1000 - 0x9068ffea libLAPACK.dylib ??? (???) /System/Library/Frameworks/Accelerate.framework/Versions/A/Frameworks/ve cLib.framework/Versions/A/libLAPACK.dylib 0x90690000 - 0x906ecff7 com.apple.htmlrendering 68 (1.1.3) /System/Library/Frameworks/Carbon.framework/Versions/A/Frameworks/HTMLRe ndering.framework/Versions/A/HTMLRendering 0x906ed000 - 0x90a8afef com.apple.QuartzCore 1.5.7 (1.5.7) <2fed2dd7565c84a0f0c608d41d4d172c> /System/Library/Frameworks/QuartzCore.framework/Versions/A/QuartzCore 0x90cfa000 - 0x90d01ffe libbsm.dylib ??? (???) /usr/lib/libbsm.dylib 0x90d0e000 - 0x90d88ff8 com.apple.print.framework.PrintCore 5.5.3 (245.3) <222dade7b33b99708b8c09d1303f93fc> /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Fram eworks/PrintCore.framework/Versions/A/PrintCore 0x90d89000 - 0x90d89ffd com.apple.Accelerate.vecLib 3.4.2 (vecLib 3.4.2) /System/Library/Frameworks/Accelerate.framework/Versions/A/Frameworks/ve cLib.framework/Versions/A/vecLib 0x90d90000 - 0x90d92ff5 libRadiance.dylib ??? (???) <8a844202fcd65662bb9ab25f08c45a62> /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Fram eworks/ImageIO.framework/Versions/A/Resources/libRadiance.dylib 0x90d93000 - 0x9106dff3 com.apple.CoreServices.CarbonCore 786.10 (786.10) /System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/ CarbonCore.framework/Versions/A/CarbonCore 0x91188000 - 0x9124fff2 com.apple.vImage 3.0 (3.0) /System/Library/Frameworks/Accelerate.framework/Versions/A/Frameworks/vI mage.framework/Versions/A/vImage 0x91250000 - 0x912e3ff3 com.apple.ApplicationServices.ATS 3.4 (???) <8c51de0ec3deaef416578cd59df38754> /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Fram eworks/ATS.framework/Versions/A/ATS 0x912e4000 - 0x91325fe7 libRIP.A.dylib ??? (???) <5d0b5af7992e14de017f9a9c7cb05960> /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Fram eworks/CoreGraphics.framework/Versions/A/Resources/libRIP.A.dylib 0x91488000 - 0x914a3ffb libPng.dylib ??? (???) <4780e979d35aa5ec2cea22678836cea5> /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Fram eworks/ImageIO.framework/Versions/A/Resources/libPng.dylib 0x914b1000 - 0x91553ff3 com.apple.QuickTimeImporters.component 7.5.5 (995.22.3) /System/Library/QuickTime/QuickTimeImporters.component/Contents/MacOS/Qu ickTimeImporters 0x91554000 - 0x9160efe3 com.apple.CoreServices.OSServices 226.5 (226.5) <25243fd02dc5d4f4cc5780f6b2f6fe26> /System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/ OSServices.framework/Versions/A/OSServices 0x9160f000 - 0x9162dfff libresolv.9.dylib ??? (???) /usr/lib/libresolv.9.dylib 0x9162e000 - 0x9163effc com.apple.LangAnalysis 1.6.4 (1.6.4) <8b7831b5f74a950a56cf2d22a2d436f6> /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Fram eworks/LangAnalysis.framework/Versions/A/LangAnalysis 0x9163f000 - 0x91646ff7 libCGATS.A.dylib ??? (???) <386dce4b28448fb86e33e06ac466f4d8> /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Fram eworks/CoreGraphics.framework/Versions/A/Resources/libCGATS.A.dylib 0x91647000 - 0x9165ffff com.apple.openscripting 1.2.8 (???) <572c7452d7e740e8948a5ad07a99602b> /System/Library/Frameworks/Carbon.framework/Versions/A/Frameworks/OpenSc ripting.framework/Versions/A/OpenScripting 0x91660000 - 0x9169afe7 com.apple.coreui 1.2 (62) /System/Library/PrivateFrameworks/CoreUI.framework/Versions/A/CoreUI 0x9169b000 - 0x916c3fff libcups.2.dylib ??? (???) <81abd305142ad1b771024eb4a1309e2e> /usr/lib/libcups.2.dylib 0x916c4000 - 0x91761ffc com.apple.CFNetwork 422.11 (422.11) <2780dfc3d2186195fccb3634bfb0944b> /System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/ CFNetwork.framework/Versions/A/CFNetwork 0x917b4000 - 0x91895ff7 libxml2.2.dylib ??? (???) /usr/lib/libxml2.2.dylib 0x91896000 - 0x9189ffff com.apple.speech.recognition.framework 3.7.24 (3.7.24) /System/Library/Frameworks/Carbon.framework/Versions/A/Frameworks/Speech Recognition.framework/Versions/A/SpeechRecognition 0x918ab000 - 0x919defff com.apple.CoreFoundation 6.5.5 (476.17) <4a70c8dbb582118e31412c53dc1f407f> /System/Library/Frameworks/CoreFoundation.framework/Versions/A/CoreFound ation 0x919df000 - 0x91aaafff com.apple.ColorSync 4.5.1 (4.5.1) /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Fram eworks/ColorSync.framework/Versions/A/ColorSync 0x91aab000 - 0x91ac1fff com.apple.DictionaryServices 1.0.0 (1.0.0) /System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/ DictionaryServices.framework/Versions/A/DictionaryServices 0x91ac7000 - 0x922c5fef com.apple.AppKit 6.5.6 (949.43) /System/Library/Frameworks/AppKit.framework/Versions/C/AppKit 0x922c6000 - 0x92541fe7 com.apple.Foundation 6.5.7 (677.22) <8fe77b5d15ecdae1240b4cb604fc6d0b> /System/Library/Frameworks/Foundation.framework/Versions/C/Foundation 0x9258d000 - 0x925a3fe7 com.apple.CoreVideo 1.5.1 (1.5.1) <80b173571cdb99a829e1b8ec0a677291> /System/Library/Frameworks/CoreVideo.framework/Versions/A/CoreVideo 0x925a4000 - 0x92623ff5 com.apple.SearchKit 1.2.1 (1.2.1) <3140a605db2abf56b237fa156a08b28b> /System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/ SearchKit.framework/Versions/A/SearchKit 0x92674000 - 0x926b2ff7 libGLImage.dylib ??? (???) <1123b8a48bcbe9cc7aa8dd8e1a214a66> /System/Library/Frameworks/OpenGL.framework/Versions/A/Libraries/libGLIm age.dylib 0x926b3000 - 0x926e2fe3 com.apple.AE 402.2 (402.2) /System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/ AE.framework/Versions/A/AE 0x926e3000 - 0x926efff9 com.apple.helpdata 1.0.1 (14.2) /System/Library/PrivateFrameworks/HelpData.framework/Versions/A/HelpData 0x92730000 - 0x92734fff libGIF.dylib ??? (???) <572a32e46e33be1ec041c5ef5b0341ae> /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Fram eworks/ImageIO.framework/Versions/A/Resources/libGIF.dylib 0x92735000 - 0x92a57fe2 com.apple.QuickTime 7.5.5 (995.22.3) <07ffd134d58fdbfe377ba9007f591289> /System/Library/Frameworks/QuickTime.framework/Versions/A/QuickTime 0x92a58000 - 0x93afeffe com.apple.QuickTimeComponents.component 7.5.5 (995.22.3) /System/Library/QuickTime/QuickTimeComponents.component/Contents/MacOS/Q uickTimeComponents 0x93b34000 - 0x93b76fef com.apple.NavigationServices 3.5.2 (163) /System/Library/Frameworks/Carbon.framework/Versions/A/Frameworks/Naviga tionServices.framework/Versions/A/NavigationServices 0x93b77000 - 0x93b82fe7 libCSync.A.dylib ??? (???) /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Fram eworks/CoreGraphics.framework/Versions/A/Resources/libCSync.A.dylib 0x93b83000 - 0x93b91ffd libz.1.dylib ??? (???) <5ddd8539ae2ebfd8e7cc1c57525385c7> /usr/lib/libz.1.dylib 0x93b92000 - 0x93b97fff com.apple.CommonPanels 1.2.4 (85) /System/Library/Frameworks/Carbon.framework/Versions/A/Frameworks/Common Panels.framework/Versions/A/CommonPanels 0x93c32000 - 0x94042fef libBLAS.dylib ??? (???) /System/Library/Frameworks/Accelerate.framework/Versions/A/Frameworks/ve cLib.framework/Versions/A/libBLAS.dylib 0x94250000 - 0x94250fff com.apple.Carbon 136 (136) <98a5e3bc0c4fa44bbb09713bb88707fe> /System/Library/Frameworks/Carbon.framework/Versions/A/Carbon 0x94251000 - 0x94252ffc libffi.dylib ??? (???) /usr/lib/libffi.dylib 0x9428b000 - 0x9428bffc com.apple.audio.units.AudioUnit 1.5 (1.5) /System/Library/Frameworks/AudioUnit.framework/Versions/A/AudioUnit 0x9428c000 - 0x942c3fff com.apple.SystemConfiguration 1.9.2 (1.9.2) <01426a38ba44efa5d448daef8b3e9941> /System/Library/Frameworks/SystemConfiguration.framework/Versions/A/Syst emConfiguration 0x942c4000 - 0x942d0ffe libGL.dylib ??? (???) /System/Library/Frameworks/OpenGL.framework/Versions/A/Libraries/libGL.d ylib 0x94451000 - 0x94451ff8 com.apple.Cocoa 6.5 (???) /System/Library/Frameworks/Cocoa.framework/Versions/A/Cocoa 0x94452000 - 0x94af2fff com.apple.CoreGraphics 1.407.2 (???) <3a91d1037afde01d1d8acdf9cd1caa14> /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Fram eworks/CoreGraphics.framework/Versions/A/CoreGraphics 0x94af4000 - 0x94b7efef com.apple.DesktopServices 1.4.7 (1.4.7) <7898a0f2a46fc7d8887b041bc23e3811> /System/Library/PrivateFrameworks/DesktopServicesPriv.framework/Versions /A/DesktopServicesPriv 0x94b82000 - 0x94cbaff7 libicucore.A.dylib ??? (???) <18098dcf431603fe47ee027a60006c85> /usr/lib/libicucore.A.dylib 0x94ced000 - 0x94d46ff7 libGLU.dylib ??? (???) /System/Library/Frameworks/OpenGL.framework/Versions/A/Libraries/libGLU. dylib 0x94d47000 - 0x94d4bfff libmathCommon.A.dylib ??? (???) /usr/lib/system/libmathCommon.A.dylib 0x9539e000 - 0x9539eff8 com.apple.ApplicationServices 34 (34) <8f910fa65f01d401ad8d04cc933cf887> /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Appl icationServices 0x95508000 - 0x955b8fff edu.mit.Kerberos 6.0.12 (6.0.12) <685cc018c133668d0d3ac6a1cb63cff9> /System/Library/Frameworks/Kerberos.framework/Versions/A/Kerberos 0x955b9000 - 0x9570bff3 com.apple.audio.toolbox.AudioToolbox 1.5.2 (1.5.2) /System/Library/Frameworks/AudioToolbox.framework/Versions/A/AudioToolbo x 0x957b2000 - 0x95803ff7 com.apple.HIServices 1.7.0 (???) <01b690d1f376e400ac873105533e39eb> /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Fram eworks/HIServices.framework/Versions/A/HIServices 0x95804000 - 0x95890ff7 com.apple.LaunchServices 290.3 (290.3) <6f9629f4ed1ba3bb313548e6838b2888> /System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/ LaunchServices.framework/Versions/A/LaunchServices 0x958bb000 - 0x959a0ff3 com.apple.CoreData 100.1 (186) <8e28162ef2288692615b52acc01f8b54> /System/Library/Frameworks/CoreData.framework/Versions/A/CoreData 0x959de000 - 0x95a85feb com.apple.QD 3.11.54 (???) /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Fram eworks/QD.framework/Versions/A/QD 0x95aa3000 - 0x95b83fff libobjc.A.dylib ??? (???) <7b92613fdf804fd9a0a3733a0674c30b> /usr/lib/libobjc.A.dylib 0x95b84000 - 0x95b87fff com.apple.help 1.1 (36) /System/Library/Frameworks/Carbon.framework/Versions/A/Frameworks/Help.f ramework/Versions/A/Help 0x95b88000 - 0x95bb0ff7 com.apple.shortcut 1 (1.0) <057783867138902b52bc0941fedb74d1> /System/Library/PrivateFrameworks/Shortcut.framework/Versions/A/Shortcut 0x95bb1000 - 0x95eb9fff com.apple.HIToolbox 1.5.4 (???) <3747086ba21ee419708a5cab946c8ba6> /System/Library/Frameworks/Carbon.framework/Versions/A/Frameworks/HITool box.framework/Versions/A/HIToolbox 0x96146000 - 0x96146ffd com.apple.Accelerate 1.4.2 (Accelerate 1.4.2) /System/Library/Frameworks/Accelerate.framework/Versions/A/Accelerate 0x9614a000 - 0x962b1ff3 libSystem.B.dylib ??? (???) /usr/lib/libSystem.B.dylib 0x962b2000 - 0x963f8ff7 com.apple.ImageIO.framework 2.0.4 (2.0.4) <6a6623d3d1a7292b5c3763dcd108b55f> /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Fram eworks/ImageIO.framework/Versions/A/ImageIO 0x963f9000 - 0x96409fff com.apple.speech.synthesis.framework 3.7.1 (3.7.1) <5171726062da2bd3c6b8b58486c7777a> /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Fram eworks/SpeechSynthesis.framework/Versions/A/SpeechSynthesis 0x9640a000 - 0x96435fe7 libauto.dylib ??? (???) <42d8422dc23a18071869fdf7b5d8fab5> /usr/lib/libauto.dylib 0x96436000 - 0x964bdff7 libsqlite3.0.dylib ??? (???) <6978bbcca4277d6ae9f042beff643f7d> /usr/lib/libsqlite3.0.dylib 0x965a0000 - 0x965aafeb com.apple.audio.SoundManager 3.9.2 (3.9.2) <0f2ba6e891d3761212cf5a5e6134d683> /System/Library/Frameworks/Carbon.framework/Versions/A/Frameworks/Carbon Sound.framework/Versions/A/CarbonSound 0x965ab000 - 0x965b1fff com.apple.print.framework.Print 218.0.2 (220.1) <8bf7ef71216376d12fcd5ec17e43742c> /System/Library/Frameworks/Carbon.framework/Versions/A/Frameworks/Print. framework/Versions/A/Print 0x965c4000 - 0x96792ff3 com.apple.security 5.0.4 (34102) <55dda7486df4e8e1d61505be16f83a1c> /System/Library/Frameworks/Security.framework/Versions/A/Security 0x96793000 - 0x96810feb com.apple.audio.CoreAudio 3.1.1 (3.1.1) /System/Library/Frameworks/CoreAudio.framework/Versions/A/CoreAudio 0x96811000 - 0x9686bff7 com.apple.CoreText 2.0.3 (???) <1f1a97273753e6cfea86c810d6277680> /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Fram eworks/CoreText.framework/Versions/A/CoreText 0x9689a000 - 0x96d6bf3e libGLProgrammability.dylib ??? (???) <5d283543ac844e7c6fa3440ac56cd265> /System/Library/Frameworks/OpenGL.framework/Versions/A/Libraries/libGLPr ogrammability.dylib 0x96e2c000 - 0x96e39fe7 com.apple.opengl 1.5.9 (1.5.9) <7e5048a2677b41098c84045305f42f7f> /System/Library/Frameworks/OpenGL.framework/Versions/A/OpenGL 0x96e3a000 - 0x96eecffb libcrypto.0.9.7.dylib ??? (???) <69bc2457aa23f12fa7d052601d48fa29> /usr/lib/libcrypto.0.9.7.dylib 0x96eed000 - 0x96f02ffb com.apple.ImageCapture 5.0.1 (5.0.1) /System/Library/Frameworks/Carbon.framework/Versions/A/Frameworks/ImageC apture.framework/Versions/A/ImageCapture 0x96f03000 - 0x96f05fff com.apple.securityhi 3.0 (30817) <2b2854123fed609d1820d2779e2e0963> /System/Library/Frameworks/Carbon.framework/Versions/A/Frameworks/Securi tyHI.framework/Versions/A/SecurityHI 0x96f06000 - 0x96f33feb libvDSP.dylib ??? (???) /System/Library/Frameworks/Accelerate.framework/Versions/A/Frameworks/ve cLib.framework/Versions/A/libvDSP.dylib 0x96f34000 - 0x96fbffff com.apple.framework.IOKit 1.5.1 (???) /System/Library/Frameworks/IOKit.framework/Versions/A/IOKit 0x96fc0000 - 0x96fdfffa libJPEG.dylib ??? (???) /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Fram eworks/ImageIO.framework/Versions/A/Resources/libJPEG.dylib 0x96fe0000 - 0x9703dffb libstdc++.6.dylib ??? (???) <04b812dcec670daa8b7d2852ab14be60> /usr/lib/libstdc++.6.dylib 0x970b1000 - 0x97144fff com.apple.ink.framework 101.3 (86) /System/Library/Frameworks/Carbon.framework/Versions/A/Frameworks/Ink.fr amework/Versions/A/Ink 0x97145000 - 0x97184fef libTIFF.dylib ??? (???) <3589442575ac77746ae99ecf724f5f87> /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Fram eworks/ImageIO.framework/Versions/A/Resources/libTIFF.dylib 0x97185000 - 0x97185ffd com.apple.vecLib 3.4.2 (vecLib 3.4.2) /System/Library/Frameworks/vecLib.framework/Versions/A/vecLib 0xfffe8000 - 0xfffebfff libobjc.A.dylib ??? (???) /usr/lib/libobjc.A.dylib 0xffff0000 - 0xffff1780 libSystem.B.dylib ??? (???) /usr/lib/libSystem.B.dylib -- Pierre-Alain Dorange From joelgluck at yahoo.com Sun Jan 4 19:50:45 2009 From: joelgluck at yahoo.com (Joel Gluck) Date: Sun, 4 Jan 2009 13:50:45 -0500 Subject: [Pythonmac-SIG] py2app: Bombing on unknown load command 27 In-Reply-To: <495FB1D3.6010901@noaa.gov> References: <77F40406-CD61-4EA1-A1DA-3EBC800BE20D@yahoo.com> <6a36e7290812291224r4db65a96y93107b88f4314218@mail.gmail.com> <3E217F05-32C1-4942-90FE-F8388611CED7@yahoo.com> <6a36e7290901022031w62b5c0ffyb6fcea9a3e242e2b@mail.gmail.com> <495FB1D3.6010901@noaa.gov> Message-ID: Hi Chris, Thanks for this suggestion. Question: when I ran easy_install for py2app as you suggested, it returned an error: The required version of setuptools (>=0.6c9) is not available, and can't be installed while this script is running. Please install a more recent version first, using 'easy_install -U setuptools'. When I tried to install setuptools as it recommended, it seemed to work, but then running easy_install for py2app again bombed in the same way. (Whole session below.) Any idea what's going on? TIA, Joel Last login: Sun Jan 4 13:37:47 on console Joel-Glucks-iMac:~ joel$ easy_install py2app==dev Searching for py2app==dev Reading http://pypi.python.org/simple/py2app/ Reading http://undefined.org/python/#py2app Best match: py2app dev Downloading http://svn.pythonmac.org/py2app/py2app/trunk#egg=py2app-dev Doing subversion checkout from http://svn.pythonmac.org/py2app/py2app/trunk to /var/folders/lI/lIRCvreNH7SfDbfAh2BgAE+++TM/-Tmp-/easy_install- XVZEYt/trunk Processing trunk Running setup.py -q bdist_egg --dist-dir /var/folders/lI/ lIRCvreNH7SfDbfAh2BgAE+++TM/-Tmp-/easy_install-XVZEYt/trunk/egg-dist- tmp-H0c_ht The required version of setuptools (>=0.6c9) is not available, and can't be installed while this script is running. Please install a more recent version first, using 'easy_install -U setuptools'. (Currently using setuptools 0.6c7 (/System/Library/Frameworks/ Python.framework/Versions/2.5/Extras/lib/python)) error: Setup script exited with 2 Joel-Glucks-iMac:~ joel$ easy_install -U setuptools Searching for setuptools Reading http://pypi.python.org/simple/setuptools/ Best match: setuptools 0.6c9 Processing setuptools-0.6c9-py2.5.egg setuptools 0.6c9 is already the active version in easy-install.pth Installing easy_install script to /Users/joel/bin Installing easy_install-2.5 script to /Users/joel/bin Using /Users/joel/Library/Python/2.5/site-packages/setuptools-0.6c9- py2.5.egg Processing dependencies for setuptools Finished processing dependencies for setuptools Joel-Glucks-iMac:~ joel$ easy_install py2app==dev Searching for py2app==dev Reading http://pypi.python.org/simple/py2app/ Reading http://undefined.org/python/#py2app Best match: py2app dev Downloading http://svn.pythonmac.org/py2app/py2app/trunk#egg=py2app-dev Doing subversion checkout from http://svn.pythonmac.org/py2app/py2app/trunk to /var/folders/lI/lIRCvreNH7SfDbfAh2BgAE+++TM/-Tmp-/easy_install- Rr-5Ur/trunk Processing trunk Running setup.py -q bdist_egg --dist-dir /var/folders/lI/ lIRCvreNH7SfDbfAh2BgAE+++TM/-Tmp-/easy_install-Rr-5Ur/trunk/egg-dist- tmp-FIp6nX The required version of setuptools (>=0.6c9) is not available, and can't be installed while this script is running. Please install a more recent version first, using 'easy_install -U setuptools'. (Currently using setuptools 0.6c7 (/System/Library/Frameworks/ Python.framework/Versions/2.5/Extras/lib/python)) error: Setup script exited with 2 Joel-Glucks-iMac:~ joel$ On Jan 3, 2009, at 1:43 PM, Chris.Barker wrote: > Bob Ippolito wrote: >> Unknown load command: 27 means it's seeing a load command (low level >> Mach-O stuff) that it doesn't understand, which is reasonable because >> I don't think I've updated the code since 10.4 or so and there are >> probably some new ones. > > There have been some fixes for similar issues -- make sure you re > using the latest py2app: > > easy_install py2app==dev > > > (I think that's the call...) > > -Chris > > > > -- > Christopher Barker, Ph.D. > Oceanographer > > Emergency Response Division > NOAA/NOS/OR&R (206) 526-6959 voice > 7600 Sand Point Way NE (206) 526-6329 fax > Seattle, WA 98115 (206) 526-6317 main reception > > Chris.Barker at noaa.gov -------------- next part -------------- An HTML attachment was scrubbed... URL: From Chris.Barker at noaa.gov Mon Jan 5 18:08:34 2009 From: Chris.Barker at noaa.gov (Christopher Barker) Date: Mon, 05 Jan 2009 09:08:34 -0800 Subject: [Pythonmac-SIG] py2app: Bombing on unknown load command 27 In-Reply-To: References: <77F40406-CD61-4EA1-A1DA-3EBC800BE20D@yahoo.com> <6a36e7290812291224r4db65a96y93107b88f4314218@mail.gmail.com> <3E217F05-32C1-4942-90FE-F8388611CED7@yahoo.com> <6a36e7290901022031w62b5c0ffyb6fcea9a3e242e2b@mail.gmail.com> <495FB1D3.6010901@noaa.gov> Message-ID: <49623E92.3070101@noaa.gov> Joel Gluck wrote: > Question: when I ran easy_install for py2app as you suggested, it > returned an error: Well, I'm not setuptools expert, but I notice the following: > *Joel-Glucks-iMac:~ joel$ easy_install py2app==dev* ... > *(Currently using setuptools 0.6c7 so in this case, setuptools 0.6c7 is begin used. ... > *setuptools 0.6c9 is already the active version in easy-install.pth* But now setuptools itself thinks it's already 0.6c9, so it hasn't updated anything. ... > *Installing easy_install script to /Users/joel/bin* > *Installing easy_install-2.5 script to /Users/joel/bin* here setuptools has put the easy_install script in your home dir, rather than the default script directory. For instance, easy_install is here: /Library/Frameworks/Python.framework/Versions/Current/bin/easy_install on my system. typing "which easy_install" may help you figure out what's getting used. So: I suspect you are having issues with multiple different copies of setuptools and/or python. I'd make sure that you are using the python you think you are. You might also want to clean out setuptools and re-installs -- I don't know of any way to do this automatically, but you can delete stuff from site-packages and ALSO from easy_install.pth Take a look at how PATH is being set also: echo $PATH and look in your .bash_profile or wherever your shell PATH is being added to, so that's it's set up right for you. -Chris -- Christopher Barker, Ph.D. Oceanographer Emergency Response Division NOAA/NOS/OR&R (206) 526-6959 voice 7600 Sand Point Way NE (206) 526-6329 fax Seattle, WA 98115 (206) 526-6317 main reception Chris.Barker at noaa.gov From joelgluck at yahoo.com Mon Jan 5 18:11:29 2009 From: joelgluck at yahoo.com (Joel Gluck) Date: Mon, 5 Jan 2009 12:11:29 -0500 Subject: [Pythonmac-SIG] py2app: Bombing on unknown load command 27 In-Reply-To: <49623E92.3070101@noaa.gov> References: <77F40406-CD61-4EA1-A1DA-3EBC800BE20D@yahoo.com> <6a36e7290812291224r4db65a96y93107b88f4314218@mail.gmail.com> <3E217F05-32C1-4942-90FE-F8388611CED7@yahoo.com> <6a36e7290901022031w62b5c0ffyb6fcea9a3e242e2b@mail.gmail.com> <495FB1D3.6010901@noaa.gov> <49623E92.3070101@noaa.gov> Message-ID: <0C8EE3B0-E72E-4A33-90CD-E2767AE28968@yahoo.com> Thanks, Chris -- very clear and useful guidance! I will roll up my sleeves and get into this as soon as time allows... -- Joel On Jan 5, 2009, at 12:08 PM, Christopher Barker wrote: > Joel Gluck wrote: >> Question: when I ran easy_install for py2app as you suggested, it >> returned an error: > > Well, I'm not setuptools expert, but I notice the following: > >> *Joel-Glucks-iMac:~ joel$ easy_install py2app==dev* > > ... > >> *(Currently using setuptools 0.6c7 > > so in this case, setuptools 0.6c7 is begin used. > > ... > >> *setuptools 0.6c9 is already the active version in easy-install.pth* > > But now setuptools itself thinks it's already 0.6c9, so it hasn't > updated anything. > > ... > > >> *Installing easy_install script to /Users/joel/bin* >> *Installing easy_install-2.5 script to /Users/joel/bin* > > here setuptools has put the easy_install script in your home dir, > rather than the default script directory. For instance, easy_install > is here: > > /Library/Frameworks/Python.framework/Versions/Current/bin/easy_install > > on my system. typing "which easy_install" may help you figure out > what's getting used. > > So: > > I suspect you are having issues with multiple different copies of > setuptools and/or python. > > I'd make sure that you are using the python you think you are. > > You might also want to clean out setuptools and re-installs -- I > don't know of any way to do this automatically, but you can delete > stuff from site-packages and ALSO from easy_install.pth > > Take a look at how PATH is being set also: > > echo $PATH > > and look in your .bash_profile or wherever your shell PATH is being > added to, so that's it's set up right for you. > > -Chris > > > > > -- > Christopher Barker, Ph.D. > Oceanographer > > Emergency Response Division > NOAA/NOS/OR&R (206) 526-6959 voice > 7600 Sand Point Way NE (206) 526-6329 fax > Seattle, WA 98115 (206) 526-6317 main reception > > Chris.Barker at noaa.gov From nad at acm.org Mon Jan 5 20:15:54 2009 From: nad at acm.org (Ned Deily) Date: Mon, 05 Jan 2009 11:15:54 -0800 Subject: [Pythonmac-SIG] py2app: Bombing on unknown load command 27 References: <77F40406-CD61-4EA1-A1DA-3EBC800BE20D@yahoo.com> <6a36e7290812291224r4db65a96y93107b88f4314218@mail.gmail.com> <3E217F05-32C1-4942-90FE-F8388611CED7@yahoo.com> <6a36e7290901022031w62b5c0ffyb6fcea9a3e242e2b@mail.gmail.com> <495FB1D3.6010901@noaa.gov> <49623E92.3070101@noaa.gov> Message-ID: In article <49623E92.3070101 at noaa.gov>, Christopher Barker wrote: > Joel Gluck wrote: > > Question: when I ran easy_install for py2app as you suggested, it > > returned an error: > > Well, I'm not setuptools expert, but I notice the following: > > > *Joel-Glucks-iMac:~ joel$ easy_install py2app==dev* > > ... > > > *(Currently using setuptools 0.6c7 > > so in this case, setuptools 0.6c7 is begin used. > > ... > > > *setuptools 0.6c9 is already the active version in easy-install.pth* > > But now setuptools itself thinks it's already 0.6c9, so it hasn't > updated anything. This appears to be another instance of being bitten by the Apple Leopard Python sys.path misfeature. In short, the Apple-supplied Python for 10.5 ships with the older version of setuptools and, because of the order of directories on its sys.path, the older version is always found first. Jack suggests a workaround in this thread: So you could try putting a .pth hack for the newer setuptools into one of the directories on sys.path as he suggests. -- Ned Deily, nad at acm.org From rowen at u.washington.edu Mon Jan 5 20:17:29 2009 From: rowen at u.washington.edu (Russell E. Owen) Date: Mon, 05 Jan 2009 11:17:29 -0800 Subject: [Pythonmac-SIG] Bus error with Python 2.5.4 Message-ID: I'm seeing a bus error on MacOS X 10.5.6 when using Python 2.5.4 to display images via PIL and Tkinter. Before I try to track down the details I'm wondering if anyone else has already seen and diagnosed it. -- Russell From rowen at u.washington.edu Mon Jan 5 20:33:46 2009 From: rowen at u.washington.edu (Russell E. Owen) Date: Mon, 05 Jan 2009 11:33:46 -0800 Subject: [Pythonmac-SIG] Bus error with Python 2.5.4 References: Message-ID: In article , "Russell E. Owen" wrote: > I'm seeing a bus error on MacOS X 10.5.6 when using Python 2.5.4 to > display images via PIL and Tkinter. Before I try to track down the > details I'm wondering if anyone else has already seen and diagnosed it. I should add that this problem is new in 2.5.4; it does not occur in 2.5.2. Also, I've seen it on two machines. (It's in a big application and I've not had time to track it down yet; for now I've just reverted to 2.5.2). -- Russell From Chris.Barker at noaa.gov Tue Jan 6 00:14:03 2009 From: Chris.Barker at noaa.gov (Christopher Barker) Date: Mon, 05 Jan 2009 15:14:03 -0800 Subject: [Pythonmac-SIG] py2app: Bombing on unknown load command 27 In-Reply-To: <80727293-D4FC-48E4-AABA-6473E039E27B@yahoo.com> References: <77F40406-CD61-4EA1-A1DA-3EBC800BE20D@yahoo.com> <6a36e7290812291224r4db65a96y93107b88f4314218@mail.gmail.com> <3E217F05-32C1-4942-90FE-F8388611CED7@yahoo.com> <6a36e7290901022031w62b5c0ffyb6fcea9a3e242e2b@mail.gmail.com> <495FB1D3.6010901@noaa.gov> <49623E92.3070101@noaa.gov> <0C8EE3B0-E72E-4A33-90CD-E2767AE28968@yahoo.com> <49624A79.3040502@noaa.gov> <80727293-D4FC-48E4-AABA-6473E039E27B@yahoo.com> Message-ID: <4962943B.6030103@noaa.gov> Joel Gluck wrote: > Hi Chris, > > One more related question on this -- when I run my setup script, the > following 4 eggs appear in my cwd: > > *altgraph-0.6.7-py2.5.egg* > *modulegraph-0.7-py2.5.egg* > *bdist_mpkg-0.4.3-py2.5.egg* > *macholib-1.1-py2.5.egg* > > Why is this happening? those are the py2app dependencies -- why in the world you'd get them in your cwd is beyond me. When you say "my setup script" -- do you mean your setup.py that is supposed to build your app? post it, and we'll see if there is anything weird about it. > Is it safe to have my script just delete these when I'm done? I would think so, but I don't know why they are there at all. -CHB -- Christopher Barker, Ph.D. Oceanographer Emergency Response Division NOAA/NOS/OR&R (206) 526-6959 voice 7600 Sand Point Way NE (206) 526-6329 fax Seattle, WA 98115 (206) 526-6317 main reception Chris.Barker at noaa.gov From joelgluck at yahoo.com Tue Jan 6 00:39:15 2009 From: joelgluck at yahoo.com (Joel Gluck) Date: Mon, 5 Jan 2009 18:39:15 -0500 Subject: [Pythonmac-SIG] py2app: Bombing on unknown load command 27 In-Reply-To: <4962943B.6030103@noaa.gov> References: <77F40406-CD61-4EA1-A1DA-3EBC800BE20D@yahoo.com> <6a36e7290812291224r4db65a96y93107b88f4314218@mail.gmail.com> <3E217F05-32C1-4942-90FE-F8388611CED7@yahoo.com> <6a36e7290901022031w62b5c0ffyb6fcea9a3e242e2b@mail.gmail.com> <495FB1D3.6010901@noaa.gov> <49623E92.3070101@noaa.gov> <0C8EE3B0-E72E-4A33-90CD-E2767AE28968@yahoo.com> <49624A79.3040502@noaa.gov> <80727293-D4FC-48E4-AABA-6473E039E27B@yahoo.com> <4962943B.6030103@noaa.gov> Message-ID: Chris, here's the setup script (which I run in my cwd, containing the main program I'm creating an app out of, "savi.py"). TIA for your diagnosis, doc! -- Joel import os from setuptools import setup print os.system(r'sudo rm -rf mac_build mac_dist savi_log.txt') APP = ['savi.py'] DATA_FILES = ['../gameplay', 'data', 'en'] OPTIONS = { 'argv_emulation': True, "iconfile": "icons/mac_savi_icon.icns", "dist_dir":"mac_dist", "bdist_base":"mac_build", "frameworks": ["SDL_image.framework", "SDL_ttf.framework", "SDL_mixer.framework", "SDL.framework"], "includes":["Numeric"] } setup( app=APP, data_files=DATA_FILES, options={'py2app': OPTIONS}, setup_requires=['py2app'], version="0.2.3" ) print os.system(r'sudo rm -rf mac_dist/savi.app/Contents/Frameworks/ *.*') print os.system(r'sudo cp -R mac_frameworks/*.* mac_dist/savi.app/ Contents/Frameworks') A Couple of Notes on the Above: 1) The py2app "frameworks" option doesn't work for multiple items, which is why I end up copying the frameworks into the app manually at the end -- I keep a copy of them in a special folder...) 2) This script always bombs in setup() -- here's the error: File "build/bdist.macosx-10.3-i386/egg/macholib/MachO.py", line 178, in load raise ValueError("Unknown load command: %d" % (cmd_load.cmd,)) ValueError: Unknown load command: 27 > /Users/joel/Documents/OT Video Games/SAVI Learning Tool Prototype ver 2.3/build/bdist.macosx-10.3-i386/egg/macholib/MachO.py(178)load() Perhaps it never gets to delete the eggs because it bombs? Although I do tell Pdb to "cont" and it seems to exit normally... -- Joel On Jan 5, 2009, at 6:14 PM, Christopher Barker wrote: > Joel Gluck wrote: >> Hi Chris, >> One more related question on this -- when I run my setup script, >> the following 4 eggs appear in my cwd: >> *altgraph-0.6.7-py2.5.egg* >> *modulegraph-0.7-py2.5.egg* >> *bdist_mpkg-0.4.3-py2.5.egg* >> *macholib-1.1-py2.5.egg* >> Why is this happening? > > those are the py2app dependencies -- why in the world you'd get them > in your cwd is beyond me. > > When you say "my setup script" -- do you mean your setup.py that is > supposed to build your app? > > post it, and we'll see if there is anything weird about it. > >> Is it safe to have my script just delete these when I'm done? > > I would think so, but I don't know why they are there at all. > > > -CHB > > -- > Christopher Barker, Ph.D. > Oceanographer > > Emergency Response Division > NOAA/NOS/OR&R (206) 526-6959 voice > 7600 Sand Point Way NE (206) 526-6329 fax > Seattle, WA 98115 (206) 526-6317 main reception > > Chris.Barker at noaa.gov -------------- next part -------------- An HTML attachment was scrubbed... URL: From Chris.Barker at noaa.gov Tue Jan 6 01:38:42 2009 From: Chris.Barker at noaa.gov (Christopher Barker) Date: Mon, 05 Jan 2009 16:38:42 -0800 Subject: [Pythonmac-SIG] py2app: Bombing on unknown load command 27 In-Reply-To: References: <77F40406-CD61-4EA1-A1DA-3EBC800BE20D@yahoo.com> <6a36e7290812291224r4db65a96y93107b88f4314218@mail.gmail.com> <3E217F05-32C1-4942-90FE-F8388611CED7@yahoo.com> <6a36e7290901022031w62b5c0ffyb6fcea9a3e242e2b@mail.gmail.com> <495FB1D3.6010901@noaa.gov> <49623E92.3070101@noaa.gov> <0C8EE3B0-E72E-4A33-90CD-E2767AE28968@yahoo.com> <49624A79.3040502@noaa.gov> <80727293-D4FC-48E4-AABA-6473E039E27B@yahoo.com> <4962943B.6030103@noaa.gov> Message-ID: <4962A812.8050509@noaa.gov> Joel Gluck wrote: > Chris, here's the setup script (which I run in my cwd, containing the > main program I'm creating an app out of, "savi.py"). TIA for your > diagnosis, doc! -- Joel* that all looks pretty normal. oh, you do run it as: $python setup.py py2app don't you? One note: >>> One more related question on this -- when I run my setup script, the >>> following 4 eggs appear in my cwd: >>> *altgraph-0.6.7-py2.5.egg* >>> *modulegraph-0.7-py2.5.egg* >>> *bdist_mpkg-0.4.3-py2.5.egg* >>> *macholib-1.1-py2.5.egg* I still have no idea why those eggs get into you dir, but I'm running macholib 1.2: >>> import macholib >>> macholib.__version__ '1.2' so it looks like you haven't succeeded in fully upgrading py2app and all its dependencies. The mackolib upgrade may help your unknown load command error. -Chris -- Christopher Barker, Ph.D. Oceanographer Emergency Response Division NOAA/NOS/OR&R (206) 526-6959 voice 7600 Sand Point Way NE (206) 526-6329 fax Seattle, WA 98115 (206) 526-6317 main reception Chris.Barker at noaa.gov From mmstud at gmail.com Mon Jan 5 10:08:44 2009 From: mmstud at gmail.com (Marko Tapio Manninen) Date: Mon, 5 Jan 2009 11:08:44 +0200 Subject: [Pythonmac-SIG] bus error with CGEventTapCreate Message-ID: <522F6ED5-BD9E-4879-A1E0-74598F4D69EE@gmail.com> Hi, i get an error i dont know why. Sample code on my mac os 10.5.6 python 2.5.1 that came with Leopard: from Quartz import * event_tap = CGEventTapCreate(kCGSessionEventTap, kCGHeadInsertEventTap, 0, ((1 << kCGEventKeyDown) | (1 << kCGEventKeyUp)), lambda p, t, e, r: e) If you can answer or direct to other helpful places, i'd like to thank you, -Marko From dwf at cs.toronto.edu Wed Jan 7 17:13:08 2009 From: dwf at cs.toronto.edu (David Warde-Farley) Date: Wed, 7 Jan 2009 11:13:08 -0500 Subject: [Pythonmac-SIG] How to install latest 2.5 in OS X 10.4? In-Reply-To: <495A91FB.20509@strout.net> References: <495A91FB.20509@strout.net> Message-ID: On 30-Dec-08, at 4:26 PM, Joe Strout wrote: > We've gotten most of this mostly working on 10.5 Intel, but now to > make a properly portable app, I need to go back and do it all again > on a 10.4 machine. I'm stuck on step 1. If you're using the Python.org build of python, it's built against the 10.4u SDK, so the apps you build should be portable to any 10.4 machine, even if built on 10.5. What error are you encountering when you try to run the 10.5-built app on 10.4? David From joe at strout.net Wed Jan 7 20:47:24 2009 From: joe at strout.net (Joe Strout) Date: Wed, 07 Jan 2009 12:47:24 -0700 Subject: [Pythonmac-SIG] How to get setuptools to build a Universal Binary? Message-ID: <496506CC.30708@strout.net> I'm (still) trying to make a neatly packaged Python app that works on both PPC and Intel Macs. All is good except for mysqldb; following the procedure I've documented at , my app bundle contains an Intel-only binary of the mysqldb library (libmysqlclient_r.16.dylib). This page (http://developer.apple.com/opensource/buildingopensourceuniversal.html) at Apple suggests a possible solution: build separate Intel and PPC binaries, and then combine them with lipo. But of course that's using Makefiles. MySQLdb instead uses setuptools. So: does anyone have a clue how I can convince setuptools to build a PPC binary (or better yet, a Universal one) on an Intel machine? This may or may not also be involved: Any advice will be greatly appreciated... Thanks, - Joe From Chris.Barker at noaa.gov Wed Jan 7 21:18:55 2009 From: Chris.Barker at noaa.gov (Christopher Barker) Date: Wed, 07 Jan 2009 12:18:55 -0800 Subject: [Pythonmac-SIG] How to get setuptools to build a Universal Binary? In-Reply-To: <496506CC.30708@strout.net> References: <496506CC.30708@strout.net> Message-ID: <49650E2F.2050205@noaa.gov> Joe, sorry to hear that you are still struggling with this. Joe Strout wrote: > I'm (still) trying to make a neatly packaged Python app that works on > both PPC and Intel Macs. All is good except for mysqldb; following the > procedure I've documented at > , my app bundle > contains an Intel-only binary of the mysqldb library > (libmysqlclient_r.16.dylib). > This page > (http://developer.apple.com/opensource/buildingopensourceuniversal.html) > at Apple suggests a possible solution: build separate Intel and PPC > binaries, and then combine them with lipo. that's actually pretty easy to do. > So: does anyone have a clue how I can convince setuptools to build a PPC > binary (or better yet, a Universal one) on an Intel machine? setuptools using distutils to build, and distutils should build a Universal binary if you run it with a Universal Python (the python .org one) > This may or may not also be involved: > I don't think so. I think the issue there is with easy_install getting confused when you try to install a Universal binary. > Any advice will be greatly appreciated... I'm not familiar with MySQLDB, but there are two issues at hand when building Universal extensions: 1) making the extension Universal -- that SHOULD be taken care of by distutils. 2) making sure all the libs that the extension depends on are Universal -- you have to do this first, and it has nothing to do with setuptools, or distutils, or even python. It looks like you have a libmysqlclient dependency -- which makes sense -- you need to find a way to get a Universal one of those. That apple page you referenced should help guide you. Best case: If the lib source has been tweaked to be able to build universal, you may be able to pass a flag like "universal" into configure, if you're really lucky, otherwise, sometimes passing in both arch=PPC and arch=x86 or something like that can work. Next best case: You can pass in either PPC or x86 separately, building two versions and then lipo-ing them together. Worst case: Some code can only be built for the architecture the compiler is run on, due to how they detect endianess, etc. In this case you need to build one on PPC, and one on Intel, and then move them to the same machine to lipo them together. The other complication is that you need to make sure to use the right SDK, if you want o build on 10.5 and allow it to run on 10.4. Anyway, the short version is that I think you need to dig around the net for info on how to build libmysqlclient Universal -- hopefully someone has done it and distributes a binary, but presumably you've already looked for that. One last note: usually, when folks want to distribute a python extension that depends on a lib that Apple does not provide, they build that lib statically, then link that version into their extension, so you don't have to worry about distributing it -- same issue with Universal, though. I quick poking around tells me that MySQL themselves distribute Intel and PPC binaries separately -- I suspect you could get each of those, and pull the libs out and libo them together. This may be easier than building it yourself. A couple helpful pages you've probably already found: http://dev.mysql.com/downloads/mysql/5.1.html#macosx-dmg http://developer.apple.com/internet/opensource/osdb.html http://davidmichaelthompson.com/?p=12 I hope that helps, -Chris PS: I'm really surprised that no one seems to have done this already, and posted a binary egg or something! MySQLdb is not a minor package! -- Christopher Barker, Ph.D. Oceanographer Emergency Response Division NOAA/NOS/OR&R (206) 526-6959 voice 7600 Sand Point Way NE (206) 526-6329 fax Seattle, WA 98115 (206) 526-6317 main reception Chris.Barker at noaa.gov From daniel at keystonewood.com Wed Jan 7 21:35:06 2009 From: daniel at keystonewood.com (Daniel Miller) Date: Wed, 7 Jan 2009 15:35:06 -0500 Subject: [Pythonmac-SIG] How to get setuptools to build a Universal Binary? In-Reply-To: <496506CC.30708@strout.net> References: <496506CC.30708@strout.net> Message-ID: <9B972470-594E-4787-827A-3566446EE246@keystonewood.com> > MySQLdb instead uses setuptools. > > So: does anyone have a clue how I can convince setuptools to build > a PPC > binary (or better yet, a Universal one) on an Intel machine? I just downloaded the mysqldb module from sourceforge to have a look at how it decides how to compile its C extension. It looks like it's getting the CFLAGS and LFLAGS from mysql_config. You'll need a universal binary of libmysqlclient (as Chris already pointed out). At any rate, you'll want to try to see what CFLAGS/LFLAGS were used to compile libmysqlclient. You might try to run the following command in terminal: $ mysql_config --cflags Which may shed some light on the situation. You'll be looking for something like this in the output: -arch ppc -arch i386 Which tells the compiler to include these architectures in the resulting binary. As Chris already mentioned, you'll also need a universal Python--I'm assuming you've already got that... Good luck. ~ Daniel From joe at strout.net Wed Jan 7 21:40:06 2009 From: joe at strout.net (Joe Strout) Date: Wed, 07 Jan 2009 13:40:06 -0700 Subject: [Pythonmac-SIG] How to get setuptools to build a Universal Binary? In-Reply-To: <49650E2F.2050205@noaa.gov> References: <496506CC.30708@strout.net> <49650E2F.2050205@noaa.gov> Message-ID: <49651326.1030003@strout.net> Christopher Barker wrote: > sorry to hear that you are still struggling with this. I appreciate the sympathy (and the help). >> So: does anyone have a clue how I can convince setuptools to build a PPC >> binary (or better yet, a Universal one) on an Intel machine? > > setuptools using distutils to build, and distutils should build a > Universal binary if you run it with a Universal Python (the python .org > one) But that's what I was doing: ...unless there is some step I've missed? >> This may or may not also be involved: >> > > I don't think so. I think the issue there is with easy_install getting > confused when you try to install a Universal binary. That's how it seemed to me too. > I'm not familiar with MySQLDB, but there are two issues at hand when > building Universal extensions: > > 1) making the extension Universal -- that SHOULD be taken care of by > distutils. This appears to be the problem, I think. > 2) making sure all the libs that the extension depends on are Universal > -- you have to do this first, and it has nothing to do with setuptools, > or distutils, or even python. The only other extension involved, as far as I can tell, is wx, and that one is already universal. > It looks like you have a libmysqlclient dependency -- which makes sense > -- you need to find a way to get a Universal one of those. That's what I'm trying to figure out how to do. (libmysqlclient is the library behind MySQLdb, as far as I can tell.) > Best case: > > If the lib source has been tweaked to be able to build universal, you > may be able to pass a flag like "universal" into configure, if you're > really lucky, otherwise, sometimes passing in both arch=PPC and arch=x86 > or something like that can work. What is this "configure" you speak of? MySQLdb doesn't use the configure/make dance which is standard for Unix libraries; it uses setuptools (which appears to be standard for Python libraries). If it's using configure or make, it's doing so under the hood. Any idea how I would specify universal or arch in this case? > Next best case: > > You can pass in either PPC or x86 separately, building two versions and > then lipo-ing them together. Same question as above. > Worst case: > > Some code can only be built for the architecture the compiler is run on, > due to how they detect endianess, etc. In this case you need to build > one on PPC, and one on Intel, and then move them to the same machine to > lipo them together. I suppose. > The other complication is that you need to make sure to use the right > SDK, if you want o build on 10.5 and allow it to run on 10.4. I gave up on that one a while back -- all this is being done on a 10.4 (Intel) machine. I can do it all again on a PPC machine if necessary. > Anyway, the short version is that I think you need to dig around the net > for info on how to build libmysqlclient Universal -- hopefully someone > has done it and distributes a binary, but presumably you've already > looked for that. This is exactly the question I was asking how to do. But you seem to think that libmysqlclient is something other than MySQLdb. I'm under the impression that it's the same thing. The only other library in my "Frameworks" folder is libwx_macud-2.8.0.dylib, which I presume is wxPython. (This one already is a universal binary.) > One last note: usually, when folks want to distribute a python extension > that depends on a lib that Apple does not provide, they build that lib > statically, then link that version into their extension, so you don't > have to worry about distributing it -- same issue with Universal, though. I think you're still imagining libmysqlclient as being something MySQLdb depends on, rather than the MySQLdb extension itself. > I quick poking around tells me that MySQL themselves distribute Intel > and PPC binaries separately -- I suspect you could get each of those, > and pull the libs out and libo them together. This may be easier than > building it yourself. Maybe -- I got a UB of MySQL itself, so I don't think that's the problem. (But of course it's entirely possible that I'm more confused than I realize.) > PS: I'm really surprised that no one seems to have done this already, > and posted a binary egg or something! MySQLdb is not a minor package! No kidding! I've spent more time futzing around with this than I have writing the app itself. It's fairly ridiculous, and I'm now to the point where I have to seriously consider whether it's worth continuing this project in Python, or spend a day or two rewriting it in REALbasic. I feel like I'm close, though -- if I can just figure out how to make a UB of this libmysqlclient thing, I think I'll be there. Thanks, - Joe P.S. While people have been very generous with their free help and advice, if anyone could be more motivated to spend a few hours on it as a paid consulting gig, I'd be happy to pay. From joe at strout.net Wed Jan 7 21:48:31 2009 From: joe at strout.net (Joe Strout) Date: Wed, 07 Jan 2009 13:48:31 -0700 Subject: [Pythonmac-SIG] How to get setuptools to build a Universal Binary? In-Reply-To: <9B972470-594E-4787-827A-3566446EE246@keystonewood.com> References: <496506CC.30708@strout.net> <9B972470-594E-4787-827A-3566446EE246@keystonewood.com> Message-ID: <4965151F.7010500@strout.net> Daniel Miller wrote: >> So: does anyone have a clue how I can convince setuptools to build a PPC >> binary (or better yet, a Universal one) on an Intel machine? > > I just downloaded the mysqldb module from sourceforge to have a look at > how it decides how to compile its C extension. It looks like it's > getting the CFLAGS and LFLAGS from mysql_config. You'll need a universal > binary of libmysqlclient (as Chris already pointed out). OK, but to be clear, libmysqlclient isn't something from somewhere else that mysqldb uses -- it's the C extension of mysqldb itself, right? Something built when I do "python setup.py install" in the mysqldb source directory? > At any rate, > you'll want to try to see what CFLAGS/LFLAGS were used to compile > libmysqlclient. You might try to run the following command in terminal: > > $ mysql_config --cflags -I/usr/local/mysql/include -g -Os -fno-common -D_P1003_1B_VISIBLE -DSIGNAL_WITH_VIO_CLOSE -DSIGNALS_DONT_BREAK_READ -DIGNORE_SIGHUP_SIGQUIT -DDONT_DECLARE_CXA_PURE_VIRTUAL > Which may shed some light on the situation. You'll be looking for > something like this in the output: > > -arch ppc -arch i386 Hmm, I don't see those. If this were a makefile situation, I'd have some idea where to start poking further to find (or specify) these flags. With setuptools, I haven't a clue -- what's the next step? Is this something I can hack into setup.py, or what? > Which tells the compiler to include these architectures in the resulting > binary. As Chris already mentioned, you'll also need a universal > Python--I'm assuming you've already got that... Yes, I do seem to. And I can make an app (with py2app) that works fine on PPC and Intel Macs, as long as it doesn't use mysql. So this appears to be the last part of the puzzle. Thanks, - Joe From Chris.Barker at noaa.gov Wed Jan 7 22:08:23 2009 From: Chris.Barker at noaa.gov (Christopher Barker) Date: Wed, 07 Jan 2009 13:08:23 -0800 Subject: [Pythonmac-SIG] How to get setuptools to build a Universal Binary? In-Reply-To: <49651326.1030003@strout.net> References: <496506CC.30708@strout.net> <49650E2F.2050205@noaa.gov> <49651326.1030003@strout.net> Message-ID: <496519C7.6000100@noaa.gov> Joe Strout wrote: > That's what I'm trying to figure out how to do. (libmysqlclient is the > library behind MySQLdb, as far as I can tell.) libmysql is the library that PySQLdb depends on -- it is provided by MySQL -- it is NOT built by distutils -- it is only linked to. > you seem to > think that libmysqlclient is something other than MySQLdb. I'm under > the impression that it's the same thing. nope -- I'm right -- libmysqlclient is just what you'd think __ it's the library for mysql clients -- provide by MySQL. I just confirmed this my downloading the installer from MySQL, and looking in and seeing what there: $ file libmysqlclient.16.0.0.dylib libmysqlclient.16.0.0.dylib: Mach-O dynamically linked shared library ppc (I've got a PPC machine) It looks like there is a static lib there, too. So this is what I'd do: get the dmg installer for both PPC and Intel for 10.4 from MySQL. copy the intallers to your hard drive, and unpack Contents/Archive.pax.gz poke around in there, and you'll find the dynlibs. lipo the intel and ppc ones together, and presto! Actually, I suppose what I'd do is install the native one on your build machine properly, and then use lipo to add the other one to the copy that's on that machine. > It's fairly ridiculous, and I'm now to the > point where I have to seriously consider whether it's worth continuing > this project in Python, or spend a day or two rewriting it in REALbasic. or use a different DB... > I feel like I'm close, though -- I think so too. > if I can just figure out how to make a > P.S. While people have been very generous with their free help and > advice, if anyone could be more motivated to spend a few hours on it as > a paid consulting gig, I'd be happy to pay. I'm not in a position to do that now -- but you can buy me a beer if we ever cross paths! -CHB -- Christopher Barker, Ph.D. Oceanographer Emergency Response Division NOAA/NOS/OR&R (206) 526-6959 voice 7600 Sand Point Way NE (206) 526-6329 fax Seattle, WA 98115 (206) 526-6317 main reception Chris.Barker at noaa.gov From Chris.Barker at noaa.gov Wed Jan 7 22:20:06 2009 From: Chris.Barker at noaa.gov (Christopher Barker) Date: Wed, 07 Jan 2009 13:20:06 -0800 Subject: [Pythonmac-SIG] How to get setuptools to build a Universal Binary? In-Reply-To: <4965151F.7010500@strout.net> References: <496506CC.30708@strout.net> <9B972470-594E-4787-827A-3566446EE246@keystonewood.com> <4965151F.7010500@strout.net> Message-ID: <49651C86.7080306@noaa.gov> Joe Strout wrote: >> I just downloaded the mysqldb module from sourceforge to have a look >> at how it decides how to compile its C extension. It looks like it's >> getting the CFLAGS and LFLAGS from mysql_config. You'll need a >> universal binary of libmysqlclient (as Chris already pointed out). ouch, this does complicate things a bit -- as I have no idea how to get a "universal" mysql_config -- it may be telling distutils to build the extension with only one architecture. > OK, but to be clear, libmysqlclient isn't something from somewhere else > that mysqldb uses -- it's the C extension of mysqldb itself, right? > Something built when I do "python setup.py install" in the mysqldb > source directory? nope -- see my other note. the extensions that distutils builds will be called something like _mysql. It will be in site_packages, and in your app bundle, along with .py and .pyc files, NOT in with FrameWorks. >> At any rate, you'll want to try to see what CFLAGS/LFLAGS were used to >> compile libmysqlclient. You might try to run the following command in >> terminal: >> >> $ mysql_config --cflags here's mine: $ /usr/local/mysql/bin/mysql_config --cflags -I/usr/local/mysql/include -g -Os -arch ppc -fno-common -D_P1003_1B_VISIBLE -DSIGNAL_WITH_VIO_CLOSE -DSIGNALS_DONT_BREAK_READ -DIGNORE_SIGHUP_SIGQUIT -DDONT_DECLARE_CXA_PURE_VIRTUAL Darn -- there is an "-arch ppc" in there. However, it may be that distutils still add the "arch i386" who knows? if you get it to build, you can then look at what it builds, and see if that's Universal or not: $ file name_of_lib You can find what it builds in the "build" directory that distutils creates when you run "setup.py build". It will be in something like: build/lib.macosx-10.3-ppc-2.5 and I think will be called -mysql.so but I don't actually have it building here. I suppose I should try -- now that I've gone this far! -Chris -- Christopher Barker, Ph.D. Oceanographer Emergency Response Division NOAA/NOS/OR&R (206) 526-6959 voice 7600 Sand Point Way NE (206) 526-6329 fax Seattle, WA 98115 (206) 526-6317 main reception Chris.Barker at noaa.gov From Chris.Barker at noaa.gov Wed Jan 7 22:25:08 2009 From: Chris.Barker at noaa.gov (Christopher Barker) Date: Wed, 07 Jan 2009 13:25:08 -0800 Subject: [Pythonmac-SIG] How to get setuptools to build a Universal Binary? In-Reply-To: <49651C86.7080306@noaa.gov> References: <496506CC.30708@strout.net> <9B972470-594E-4787-827A-3566446EE246@keystonewood.com> <4965151F.7010500@strout.net> <49651C86.7080306@noaa.gov> Message-ID: <49651DB4.4070103@noaa.gov> Christopher Barker wrote: > here's mine: > $ /usr/local/mysql/bin/mysql_config --cflags > -I/usr/local/mysql/include -g -Os -arch ppc -fno-common > -D_P1003_1B_VISIBLE -DSIGNAL_WITH_VIO_CLOSE -DSIGNALS_DONT_BREAK_READ > -DIGNORE_SIGHUP_SIGQUIT -DDONT_DECLARE_CXA_PURE_VIRTUAL > > Darn -- there is an "-arch ppc" in there. However, it may be that > distutils still add the "arch i386" who knows? if it doesn't, you can probably add it yourself with a small edit to setup.py -Chris -- Christopher Barker, Ph.D. Oceanographer Emergency Response Division NOAA/NOS/OR&R (206) 526-6959 voice 7600 Sand Point Way NE (206) 526-6329 fax Seattle, WA 98115 (206) 526-6317 main reception Chris.Barker at noaa.gov From nad at acm.org Wed Jan 7 22:30:54 2009 From: nad at acm.org (Ned Deily) Date: Wed, 07 Jan 2009 13:30:54 -0800 Subject: [Pythonmac-SIG] How to get setuptools to build a Universal Binary? References: <496506CC.30708@strout.net> Message-ID: In article <496506CC.30708 at strout.net>, Joe Strout wrote: > I'm (still) trying to make a neatly packaged Python app that works on > both PPC and Intel Macs. All is good except for mysqldb; following the > procedure I've documented at > , my app bundle > contains an Intel-only binary of the mysqldb library > (libmysqlclient_r.16.dylib). > > This page > (http://developer.apple.com/opensource/buildingopensourceuniversal.html) > at Apple suggests a possible solution: build separate Intel and PPC > binaries, and then combine them with lipo. But of course that's using > Makefiles. MySQLdb instead uses setuptools. > > So: does anyone have a clue how I can convince setuptools to build a PPC > binary (or better yet, a Universal one) on an Intel machine? libmysqlclient is part of the MySQL distribution, i.e. not specific to python, so setuptools isn't the problem here. It looks like there is an open feature request for the MySQL prebuilt packages to be built as universal libraries. The submitter includes a recipe for doing it yourself. I haven't tried it myself, though. For python packages with C extensions, distutils, and hence setuptools, does know how to build fat (ppc-32, intel-32) and even universal ({ppc|intel}{32|64}) libraries, depending on how the python distribution itself was built and assuming the proper OSX SDK was installed from an Xcode (Apple Developer Tools) distribution (see /Developer/SDKs/). The recent pythons (2.5/2.6) from python.org are fat and were built with the MacOSX10.4u.sdk. BTW, I just use easy_install (from setuptools) to build and install MySQLdb and, for that matter, nearly all python packages these days. As long as the package uses distutils and doesn't get too fancy with overriding or extending them, they install just fine with easy_install as an egg, even if they don't explicitly use setuptools. In the increasingly rare cases where that don't work, it's usually immediately obvious, i.e. the install fails. Also, eggs don't have to be installed as single zip files: that's just the default. Add --always-unzip or -Z to the easy_install options to install unzipped. To always install unzipped, create a .pydistutils.cfg file in your home directory with an [easy_install] section: [easy_install] zip-ok = 0 So, once you have a universal mysql client library installed, easy_install -Z MySQL-python should be all you need to download, build, and install mysqldb. HTH! -- Ned Deily, nad at acm.org From nad at acm.org Wed Jan 7 22:49:57 2009 From: nad at acm.org (Ned Deily) Date: Wed, 07 Jan 2009 13:49:57 -0800 Subject: [Pythonmac-SIG] How to get setuptools to build a Universal Binary? References: <496506CC.30708@strout.net> Message-ID: In article , Ned Deily wrote: > It looks like there is an open feature request for the MySQL prebuilt > packages to be built as universal libraries. The submitter includes a > recipe for doing it yourself. I haven't tried it myself, though. > > P.S. This might also be of help: -- Ned Deily, nad at acm.org From joe at strout.net Thu Jan 8 00:27:38 2009 From: joe at strout.net (Joe Strout) Date: Wed, 07 Jan 2009 16:27:38 -0700 Subject: [Pythonmac-SIG] How to get setuptools to build a Universal Binary? In-Reply-To: <49651C86.7080306@noaa.gov> References: <496506CC.30708@strout.net> <9B972470-594E-4787-827A-3566446EE246@keystonewood.com> <4965151F.7010500@strout.net> <49651C86.7080306@noaa.gov> Message-ID: <49653A6A.3070805@strout.net> Christopher Barker wrote: > the extensions that distutils builds will be called something like > _mysql. It will be in site_packages, and in your app bundle, along with > .py and .pyc files, NOT in with FrameWorks. Ah, I didn't know that. Poking around in Resources/lib (and including unzipping site-packages.zip), I find things like mySQL.pyc, and a MySQLdb folder containing a bunch of other .pyc files. Nothing else though; just Python bytecode. Is it possible that MySQLdb is written entirely in Python, and was never the problem at all? I.e., that given a suitable portable mysql client library, MySQLdb will Just Work? But OK, now this brings up the question of why my libmysqlclient_r.16.dylib is Intel-only, when I took pains to install a UB version of MySQL (c.f. the "Installing MySQL" section of ). (I'm going to do a fresh download of that mysql binary package and poke around inside to see what I find.) > You can find what it builds in the "build" directory that distutils > creates when you run "setup.py build". It will be in something like: > > build/lib.macosx-10.3-ppc-2.5 > > and I think will be called -mysql.so But now I'm confused again. I thought this library was part of the mysql distribution -- not something created by the Python script (indeed, not something specific to Python at all). If that's so, why would "setup.py build" have anything to do with it? Thanks for your patience, - Joe From michael at ini.phys.ethz.ch Thu Jan 8 00:44:25 2009 From: michael at ini.phys.ethz.ch (Michael Graber) Date: Thu, 8 Jan 2009 00:44:25 +0100 Subject: [Pythonmac-SIG] real-time video processing Message-ID: hi all, first: theres a library called VideoCapture for Win32 environments which makes it possible to access video-capture devices. is there something similar for macs? second: i would like to do real-time video-processing (like bright- spot detection, movement detection, ...) using images recorded by a webcam. is python suited to do so? any references? i appreciate your hints to this quite crude question. best, michael From Chris.Barker at noaa.gov Thu Jan 8 01:00:30 2009 From: Chris.Barker at noaa.gov (Christopher Barker) Date: Wed, 07 Jan 2009 16:00:30 -0800 Subject: [Pythonmac-SIG] How to get setuptools to build a Universal Binary? In-Reply-To: <49653A6A.3070805@strout.net> References: <496506CC.30708@strout.net> <9B972470-594E-4787-827A-3566446EE246@keystonewood.com> <4965151F.7010500@strout.net> <49651C86.7080306@noaa.gov> <49653A6A.3070805@strout.net> Message-ID: <4965421E.5080405@noaa.gov> Joe Strout wrote: > MySQLdb folder containing a bunch of other .pyc files. Nothing else > though; just Python bytecode. Is it possible that MySQLdb is written > entirely in Python, and was never the problem at all? no -- there is C code that needs to be compiled, I"m pretty sure anyway! maybe I'll get a chance to try it myself. > I.e., that given > a suitable portable mysql client library, MySQLdb will Just Work? that would be great, but no, I don't think so. > But OK, now this brings up the question of why my > libmysqlclient_r.16.dylib is Intel-only, when I took pains to install a > UB version of MySQL (c.f. the "Installing MySQL" section of > ). (I'm going to > do a fresh download of that mysql binary package and poke around inside > to see what I find.) > >> You can find what it builds in the "build" directory that distutils >> creates when you run "setup.py build". It will be in something like: >> >> build/lib.macosx-10.3-ppc-2.5 >> >> and I think will be called -mysql.so > > But now I'm confused again. I thought this library was part of the > mysql distribution -- not something created by the Python script "libmysqlclient" is part of mysql. I"m pretty sure that the python module requires a compiled extension, that links against it, and it will be called something like _mysql.so, and should get put in the build directory when you built it, and installed somewhere in site-packages when you install it. > Thanks for your patience, no problem -- this really is complex! > /Users/jstrout/Downloads/mysql-5.1.30-osx10.4-universal/lib/libmysqlclient_r.16.dylib: > Mach-O dynamically linked shared library i386 > > So it turns out that the 10.4 Universal mysql isn't. (Or at least, this > particular library isn't -- perhaps there's another library in here > somewhere with a different name, that serves the same function for PPC?) could be -- I'm just guessing here, but I suspect that libmysqlclient may be used only for custom clients, so it may have gotten built non-universal and no one has noticed. What do the other libs in there look like? -Chris -- Christopher Barker, Ph.D. Oceanographer Emergency Response Division NOAA/NOS/OR&R (206) 526-6959 voice 7600 Sand Point Way NE (206) 526-6329 fax Seattle, WA 98115 (206) 526-6317 main reception Chris.Barker at noaa.gov From nad at acm.org Thu Jan 8 01:12:42 2009 From: nad at acm.org (Ned Deily) Date: Wed, 07 Jan 2009 16:12:42 -0800 Subject: [Pythonmac-SIG] How to get setuptools to build a Universal Binary? References: <496506CC.30708@strout.net> <9B972470-594E-4787-827A-3566446EE246@keystonewood.com> <4965151F.7010500@strout.net> <49651C86.7080306@noaa.gov> <49653A6A.3070805@strout.net> Message-ID: In article <49653A6A.3070805 at strout.net>, Joe Strout wrote: > Christopher Barker wrote: > > > the extensions that distutils builds will be called something like > > _mysql. It will be in site_packages, and in your app bundle, along with > > .py and .pyc files, NOT in with FrameWorks. > > Ah, I didn't know that. Poking around in Resources/lib (and including > unzipping site-packages.zip), I find things like mySQL.pyc, and a > MySQLdb folder containing a bunch of other .pyc files. Nothing else > though; just Python bytecode. Is it possible that MySQLdb is written > entirely in Python, and was never the problem at all? I.e., that given > a suitable portable mysql client library, MySQLdb will Just Work? No, MySQLdb does have a C extension component. There should be a _mysql.so there somewhere. If you build it with easy_install, the unzipped egg layout is: $ ls -l total 224 drwxrwx--- 2 nad admin 272 Feb 23 2008 EGG-INFO drwxrwx--- 3 nad admin 714 Feb 23 2008 MySQLdb -rwxrwxr-x 1 nad admin 257 Feb 23 2008 _mysql.py -rw-rw---- 1 nad admin 697 Feb 23 2008 _mysql.pyc -rw-rw---- 1 nad admin 697 Feb 23 2008 _mysql.pyo -rwxrwxr-x 1 nad admin 77964 Feb 23 2008 _mysql.so -rwxrwxr-x 1 nad admin 2306 Feb 23 2008 _mysql_exceptions.py -rw-rw---- 1 nad admin 5279 Feb 23 2008 _mysql_exceptions.pyc -rw-rw---- 1 nad admin 5279 Feb 23 2008 _mysql_exceptions.pyo and, with a fat python config: $ file _mysql.so _mysql.so: Mach-O universal binary with 2 architectures _mysql.so (for architecture i386): Mach-O bundle i386 _mysql.so (for architecture ppc): Mach-O bundle ppc > But OK, now this brings up the question of why my > libmysqlclient_r.16.dylib is Intel-only, when I took pains to install a > UB version of MySQL (c.f. the "Installing MySQL" section of > ). (I'm going to > do a fresh download of that mysql binary package and poke around inside > to see what I find.) Hmm, there's omething odd about that download. -rw-r--r--@ 1 nad staff 4396 Nov 20 23:31 libdbug.a -rw-r--r--@ 1 nad staff 2619952 Nov 20 23:31 libheap.a -rw-r--r--@ 1 nad staff 7612800 Nov 20 23:31 libmyisam.a -rw-r--r--@ 1 nad staff 3293744 Nov 20 23:31 libmyisammrg.a -rwxr-xr-x@ 1 nad staff 15266468 Nov 20 23:32 libmysqlclient.16.0.0.dylib -rwxr-xr-x@ 1 nad staff 4781040 Nov 15 14:57 libmysqlclient.16.dylib -rw-r--r--@ 1 nad staff 17541992 Nov 20 23:31 libmysqlclient.a -rwxr-xr-x@ 1 nad staff 4781040 Nov 15 14:57 libmysqlclient.dylib -rwxr-xr-x@ 1 nad staff 867 Nov 15 14:57 libmysqlclient.la -rwxr-xr-x@ 1 nad staff 15337152 Nov 20 23:32 libmysqlclient_r.16.0.0.dylib -rwxr-xr-x@ 1 nad staff 4801460 Nov 15 14:57 libmysqlclient_r.16.dylib -rw-r--r--@ 1 nad staff 17629744 Nov 20 23:31 libmysqlclient_r.a -rwxr-xr-x@ 1 nad staff 4801460 Nov 15 14:57 libmysqlclient_r.dylib -rwxr-xr-x@ 1 nad staff 881 Nov 15 14:57 libmysqlclient_r.la -rw-r--r--@ 1 nad staff 203291168 Nov 20 23:31 libmysqld.a -rw-r--r--@ 1 nad staff 5235560 Nov 20 23:31 libmystrings.a -rw-r--r--@ 1 nad staff 2435784 Nov 20 23:31 libmysys.a -rw-r--r--@ 1 nad staff 125656 Nov 20 23:30 libvio.a -rw-r--r--@ 1 nad staff 563080 Nov 20 23:30 libz.a -rwxr-xr-x@ 1 nad staff 741 Nov 15 14:57 libz.la drwxr-xr-x@ 2 nad staff 408 Nov 20 23:32 plugin $ file libmysqlclient_r.16.0.0.dylib libmysqlclient_r.16.0.0.dylib: Mach-O universal binary with 3 architectures libmysqlclient_r.16.0.0.dylib (for architecture i386): Mach-O dynamically linked shared library i386 libmysqlclient_r.16.0.0.dylib (for architecture ppc64): Mach-O 64-bit dynamically linked shared library ppc64 libmysqlclient_r.16.0.0.dylib (for architecture ppc): Mach-O dynamically linked shared library ppc $ file libmysqlclient_r.16.dylib libmysqlclient_r.16.dylib: Mach-O dynamically linked shared library i386 Perhaps you can get away with making a symlink or copying from one to the other?? -- Ned Deily, nad at acm.org From Chris.Barker at noaa.gov Thu Jan 8 01:48:24 2009 From: Chris.Barker at noaa.gov (Christopher Barker) Date: Wed, 07 Jan 2009 16:48:24 -0800 Subject: [Pythonmac-SIG] How to get setuptools to build a Universal Binary? In-Reply-To: References: <496506CC.30708@strout.net> <9B972470-594E-4787-827A-3566446EE246@keystonewood.com> <4965151F.7010500@strout.net> <49651C86.7080306@noaa.gov> <49653A6A.3070805@strout.net> Message-ID: <49654D58.2080001@noaa.gov> Ned Deily wrote: > No, MySQLdb does have a C extension component. There should be a > _mysql.so there somewhere. If you build it with easy_install, the > unzipped egg layout is: and if you build it with plain old "setup.py build", you get a build dir with: ls build/lib.macosx-10.3-ppc-2.5/ MySQLdb _mysql.so _mysql_exceptions.py I've just done it straight, with a PPC build of MySQL -- I got: gcc -arch i386 -arch ppc -isysroot /Developer/SDKs/MacOSX10.4u.sdk -g -bundle -undefined dynamic_lookup build/temp.macosx-10.3-ppc-2.5/_mysql.o -L/usr/local/mysql/lib -lmysqlclient_r -lz -lm -lmygcc -o build/lib.macosx-10.3-ppc-2.5/_mysql.so /usr/libexec/gcc/i686-apple-darwin8/4.0.1/ld: for architecture i386 /usr/libexec/gcc/i686-apple-darwin8/4.0.1/ld: warning build/temp.macosx-10.3-ppc-2.5/_mysql.o cputype (18, architecture ppc) does not match cputype (7) for specified -arch flag: i386 (file not loaded) which I think makes sense, as _mysql.o was built with the flags from mysql-config, which only gives PPC as it's now set on my machine. However: $ file build/lib.macosx-10.3-ppc-2.5/_mysql.so build/lib.macosx-10.3-ppc-2.5/_mysql.so: Mach-O universal binary with 2 architectures build/lib.macosx-10.3-ppc-2.5/_mysql.so (for architecture i386): Mach-O bundle i386 build/lib.macosx-10.3-ppc-2.5/_mysql.so (for architecture ppc): Mach-O bundle ppc so I did get a universal _mysql.so, but I doubt it would work on a Intel machine. > and, with a fat python config: > > $ file _mysql.so > _mysql.so: Mach-O universal binary with 2 architectures > _mysql.so (for architecture i386): Mach-O bundle i386 > _mysql.so (for architecture ppc): Mach-O bundle ppc Ned, how did you built that? > $ file libmysqlclient_r.16.0.0.dylib > libmysqlclient_r.16.0.0.dylib: Mach-O universal binary with 3 > architectures > libmysqlclient_r.16.0.0.dylib (for architecture i386): Mach-O > dynamically linked shared library i386 > libmysqlclient_r.16.0.0.dylib (for architecture ppc64): Mach-O 64-bit > dynamically linked shared library ppc64 > libmysqlclient_r.16.0.0.dylib (for architecture ppc): Mach-O dynamically > linked shared library ppc and where did you get this? is that from the tarball on the MySQL site? -Chris -- Christopher Barker, Ph.D. Oceanographer Emergency Response Division NOAA/NOS/OR&R (206) 526-6959 voice 7600 Sand Point Way NE (206) 526-6329 fax Seattle, WA 98115 (206) 526-6317 main reception Chris.Barker at noaa.gov From nad at acm.org Thu Jan 8 01:57:45 2009 From: nad at acm.org (Ned Deily) Date: Wed, 07 Jan 2009 16:57:45 -0800 Subject: [Pythonmac-SIG] How to get setuptools to build a Universal Binary? References: <496506CC.30708@strout.net> <9B972470-594E-4787-827A-3566446EE246@keystonewood.com> <4965151F.7010500@strout.net> <49651C86.7080306@noaa.gov> <49653A6A.3070805@strout.net> Message-ID: In article , Ned Deily wrote: > In article <49653A6A.3070805 at strout.net>, Joe Strout > wrote: > [...] > > But OK, now this brings up the question of why my > > libmysqlclient_r.16.dylib is Intel-only, when I took pains to install a > > UB version of MySQL (c.f. the "Installing MySQL" section of > > ). (I'm going to > > do a fresh download of that mysql binary package and poke around inside > > to see what I find.) > > Hmm, there's omething odd about that download. > > -rw-r--r--@ 1 nad staff 4396 Nov 20 23:31 libdbug.a > -rw-r--r--@ 1 nad staff 2619952 Nov 20 23:31 libheap.a > -rw-r--r--@ 1 nad staff 7612800 Nov 20 23:31 libmyisam.a > -rw-r--r--@ 1 nad staff 3293744 Nov 20 23:31 libmyisammrg.a > -rwxr-xr-x@ 1 nad staff 15266468 Nov 20 23:32 > libmysqlclient.16.0.0.dylib > -rwxr-xr-x@ 1 nad staff 4781040 Nov 15 14:57 libmysqlclient.16.dylib > -rw-r--r--@ 1 nad staff 17541992 Nov 20 23:31 libmysqlclient.a > -rwxr-xr-x@ 1 nad staff 4781040 Nov 15 14:57 libmysqlclient.dylib > -rwxr-xr-x@ 1 nad staff 867 Nov 15 14:57 libmysqlclient.la > -rwxr-xr-x@ 1 nad staff 15337152 Nov 20 23:32 > libmysqlclient_r.16.0.0.dylib > -rwxr-xr-x@ 1 nad staff 4801460 Nov 15 14:57 > libmysqlclient_r.16.dylib > -rw-r--r--@ 1 nad staff 17629744 Nov 20 23:31 libmysqlclient_r.a > -rwxr-xr-x@ 1 nad staff 4801460 Nov 15 14:57 libmysqlclient_r.dylib > -rwxr-xr-x@ 1 nad staff 881 Nov 15 14:57 libmysqlclient_r.la > -rw-r--r--@ 1 nad staff 203291168 Nov 20 23:31 libmysqld.a > -rw-r--r--@ 1 nad staff 5235560 Nov 20 23:31 libmystrings.a > -rw-r--r--@ 1 nad staff 2435784 Nov 20 23:31 libmysys.a > -rw-r--r--@ 1 nad staff 125656 Nov 20 23:30 libvio.a > -rw-r--r--@ 1 nad staff 563080 Nov 20 23:30 libz.a > -rwxr-xr-x@ 1 nad staff 741 Nov 15 14:57 libz.la > drwxr-xr-x@ 2 nad staff 408 Nov 20 23:32 plugin > > $ file libmysqlclient_r.16.0.0.dylib > libmysqlclient_r.16.0.0.dylib: Mach-O universal binary with 3 > architectures > libmysqlclient_r.16.0.0.dylib (for architecture i386): Mach-O > dynamically linked shared library i386 > libmysqlclient_r.16.0.0.dylib (for architecture ppc64): Mach-O 64-bit > dynamically linked shared library ppc64 > libmysqlclient_r.16.0.0.dylib (for architecture ppc): Mach-O dynamically > linked shared library ppc > > $ file libmysqlclient_r.16.dylib > libmysqlclient_r.16.dylib: Mach-O dynamically linked shared library i386 > > Perhaps you can get away with making a symlink or copying from one to > the other?? Ah, out of curiosity I download the latest mysql-5.0 universal build and there all of the library files in lib *are* indeed universal (which can be verified by a doing a "file lib*"): ~/Downloads/mysql-5.0.67-osx10.4-universal/lib$ ls -l total 265624 -rw-r--r--@ 1 nad staff 4380 Aug 5 06:14 libdbug.a -rw-r--r--@ 1 nad staff 2929 Aug 4 05:30 libmysql.imp -rwxr-xr-x@ 1 nad staff 15367288 Aug 5 06:15 libmysqlclient.15.0.0.dylib -rwxr-xr-x@ 1 nad staff 15367288 Aug 5 06:15 libmysqlclient.15.dylib -rw-r--r--@ 1 nad staff 17629984 Aug 5 06:15 libmysqlclient.a -rwxr-xr-x@ 1 nad staff 15367288 Aug 5 06:15 libmysqlclient.dylib -rwxr-xr-x@ 1 nad staff 15437700 Aug 5 06:15 libmysqlclient_r.15.0.0.dylib -rwxr-xr-x@ 1 nad staff 15437700 Aug 5 06:15 libmysqlclient_r.15.dylib -rw-r--r--@ 1 nad staff 17716472 Aug 5 06:15 libmysqlclient_r.a -rwxr-xr-x@ 1 nad staff 15437700 Aug 5 06:15 libmysqlclient_r.dylib -rw-r--r--@ 1 nad staff 5389152 Aug 5 06:15 libmystrings.a -rw-r--r--@ 1 nad staff 2258096 Aug 5 06:15 libmysys.a -rw-r--r--@ 1 nad staff 562976 Aug 5 06:14 libz.a $ diff libmysqlclient_r.15.0.0.dylib libmysqlclient_r.15.dylib $ So, it looks like the 5.1 universal download is slightly broken and the copying suggestion should work. -- Ned Deily, nad at acm.org From nad at acm.org Thu Jan 8 02:11:45 2009 From: nad at acm.org (Ned Deily) Date: Wed, 07 Jan 2009 17:11:45 -0800 Subject: [Pythonmac-SIG] How to get setuptools to build a Universal Binary? References: <496506CC.30708@strout.net> <9B972470-594E-4787-827A-3566446EE246@keystonewood.com> <4965151F.7010500@strout.net> <49651C86.7080306@noaa.gov> <49653A6A.3070805@strout.net> <49654D58.2080001@noaa.gov> Message-ID: In article <49654D58.2080001 at noaa.gov>, Christopher Barker wrote: > > and, with a fat python config: > > > > $ file _mysql.so > > _mysql.so: Mach-O universal binary with 2 architectures > > _mysql.so (for architecture i386): Mach-O bundle i386 > > _mysql.so (for architecture ppc): Mach-O bundle ppc > > Ned, how did you built that? easy_install -Z MySQL-python using python from the python.org 2.5 universal installer. > > $ file libmysqlclient_r.16.0.0.dylib > > libmysqlclient_r.16.0.0.dylib: Mach-O universal binary with 3 > > architectures > > libmysqlclient_r.16.0.0.dylib (for architecture i386): Mach-O > > dynamically linked shared library i386 > > libmysqlclient_r.16.0.0.dylib (for architecture ppc64): Mach-O 64-bit > > dynamically linked shared library ppc64 > > libmysqlclient_r.16.0.0.dylib (for architecture ppc): Mach-O dynamically > > linked shared library ppc > > and where did you get this? is that from the tarball on the MySQL site? Yes, but see my followup post. After comparing the 5.0 and 5.1 tarballs, it seems clear that the libs on the 5.1 tarball are hosed a bit. -- Ned Deily, nad at acm.org From nad at acm.org Thu Jan 8 03:03:19 2009 From: nad at acm.org (Ned Deily) Date: Wed, 07 Jan 2009 18:03:19 -0800 Subject: [Pythonmac-SIG] How to get setuptools to build a Universal Binary? References: <496506CC.30708@strout.net> <9B972470-594E-4787-827A-3566446EE246@keystonewood.com> <4965151F.7010500@strout.net> <49651C86.7080306@noaa.gov> <49653A6A.3070805@strout.net> <49654D58.2080001@noaa.gov> Message-ID: In article , Ned Deily wrote: > Yes, but see my followup post. After comparing the 5.0 and 5.1 > tarballs, it seems clear that the libs on the 5.1 tarball are hosed a > bit. I've opened bug #41940 on the MySQL tracker to document the problem. -- Ned Deily, nad at acm.org From joe at strout.net Thu Jan 8 05:15:11 2009 From: joe at strout.net (Joe Strout) Date: Wed, 07 Jan 2009 21:15:11 -0700 Subject: [Pythonmac-SIG] How to get setuptools to build a Universal Binary? In-Reply-To: <4965421E.5080405@noaa.gov> References: <496506CC.30708@strout.net> <9B972470-594E-4787-827A-3566446EE246@keystonewood.com> <4965151F.7010500@strout.net> <49651C86.7080306@noaa.gov> <49653A6A.3070805@strout.net> <4965421E.5080405@noaa.gov> Message-ID: <49657DCF.8030204@strout.net> Christopher Barker wrote: >> MySQLdb folder containing a bunch of other .pyc files. Nothing else >> though; just Python bytecode. Is it possible that MySQLdb is written >> entirely in Python, and was never the problem at all? > > no -- there is C code that needs to be compiled, I"m pretty sure anyway! You are correct; I found _mysql.so in the Resources/lib/python2.5/lib-dynload folder. It's a universal binary. >> /Users/jstrout/Downloads/mysql-5.1.30-osx10.4-universal/lib/libmysqlclient_r.16.dylib: >> Mach-O dynamically linked shared library i386 >> >> So it turns out that the 10.4 Universal mysql isn't. (Or at least, >> this particular library isn't -- perhaps there's another library in >> here somewhere with a different name, that serves the same function >> for PPC?) > > could be -- I'm just guessing here, but I suspect that libmysqlclient > may be used only for custom clients, so it may have gotten built > non-universal and no one has noticed. What do the other libs in there > look like? I'm going to come back to this via another post -- sounds like Ned has found that the 5.1 distribution of MySQL really is a bit messed up, but the 5.0 one is OK. So maybe if I just do this over with the 5.0 distro, it will work. Best, - Joe From nad at acm.org Thu Jan 8 05:49:21 2009 From: nad at acm.org (Ned Deily) Date: Wed, 07 Jan 2009 20:49:21 -0800 Subject: [Pythonmac-SIG] How to get setuptools to build a Universal Binary? References: <496506CC.30708@strout.net> <9B972470-594E-4787-827A-3566446EE246@keystonewood.com> <4965151F.7010500@strout.net> <49651C86.7080306@noaa.gov> <49653A6A.3070805@strout.net> <4965421E.5080405@noaa.gov> <49657DCF.8030204@strout.net> Message-ID: In article <49657DCF.8030204 at strout.net>, Joe Strout wrote: > I'm going to come back to this via another post -- sounds like Ned has > found that the 5.1 distribution of MySQL really is a bit messed up, but > the 5.0 one is OK. So maybe if I just do this over with the 5.0 distro, > it will work. Note, I haven't tested this so YMMV. If you can get away with using a 5.0 client, that should work. But if you just fix-up the 5.1 libs with a couple of copies that should work, too. Go to the directory of your mysql installation, probably something like: cd /usr/local/mysql-5.1.30-osx10.4-universal Then: cd lib ls -l *.dylib file *.dylib sudo sh cp -p libmysqlclient.16.0.0.dylib libmysqlclient.16.dylib cp -p libmysqlclient.16.0.0.dylib libmysqlclient.dylib cp -p libmysqlclient_r.16.0.0.dylib libmysqlclient_r.16.dylib cp -p libmysqlclient_r.16.0.0.dylib libmysqlclient_r.dylib -- Ned Deily, nad at acm.org From joe at strout.net Thu Jan 8 05:53:45 2009 From: joe at strout.net (Joe Strout) Date: Wed, 07 Jan 2009 21:53:45 -0700 Subject: [Pythonmac-SIG] How to get setuptools to build a Universal Binary? In-Reply-To: References: <496506CC.30708@strout.net> <9B972470-594E-4787-827A-3566446EE246@keystonewood.com> <4965151F.7010500@strout.net> <49651C86.7080306@noaa.gov> <49653A6A.3070805@strout.net> Message-ID: <496586D9.8000000@strout.net> Ned Deily wrote: > Hmm, there's omething odd about that download. > ... > $ file libmysqlclient_r.16.0.0.dylib > libmysqlclient_r.16.0.0.dylib: Mach-O universal binary with 3 > architectures > libmysqlclient_r.16.0.0.dylib (for architecture i386): Mach-O > dynamically linked shared library i386 > libmysqlclient_r.16.0.0.dylib (for architecture ppc64): Mach-O 64-bit > dynamically linked shared library ppc64 > libmysqlclient_r.16.0.0.dylib (for architecture ppc): Mach-O dynamically > linked shared library ppc > > $ file libmysqlclient_r.16.dylib > libmysqlclient_r.16.dylib: Mach-O dynamically linked shared library i386 OK, I think I see your point here. In the 5.1 download, libmysqlclient_r.16.0.0.dylib is universal, but libmysqlclient_r.16.dylib is not. From the looks of the 5.0 download, these should be the same (both universal). > Perhaps you can get away with making a symlink or copying from one to > the other?? Seems reasonable, so as a test, I copied libmysqlclient_r.16.0.0.dylib into my app bundle on top of libmysqlclient_r.16.dylib. I verified with "file" that my libmysqlclient_r.16.dylib is now universal, and verified that my app still runs on an Intel Mac. But on a PPC (10.4) Mac, it still fails: File "/Users/jstrout/Temp/etownCentral.app/Contents/Resources/IADB.py", line 12, in import MySQLdb File "MySQLdb/__init__.pyc", line 19, in ImportError: dlopen(/Users/jstrout/Temp/etownCentral.app/Contents/Resources/lib/python2.5/lib-dynload/_mysql.so, 2): Symbol not found: _mysql_get_host_info Referenced from: /Users/jstrout/Temp/etownCentral.app/Contents/Resources/lib/python2.5/lib-dynload/_mysql.so Expected in: dynamic lookup I used "otool -L" to check the dependencies of both _mysql.so and libmysqlclient_r.16.dylib. All seemed satisfactory, though the one for the latter is a little strange: $ otool -L libmysqlclient_r.16.dylib libmysqlclient_r.16.dylib: /usr/local/mysql/lib/libmysqlclient_r.16.dylib (compatibility version 17.0.0, current version 17.0.0) /usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 88.1.11) I'm not sure why libmysqlclient_r.16.dylib is listing a dependency on itself, but in /usr/local. There is no /usr/local/mysql on a standard machine (including the one where this is failing). Yet otool does list a "current version", perhaps because it's finding itself within the app bundle? Seems a little odd. The dependencies for mysql.so itself all look fine to me and refer only to three system files that really do exist. So I'm stumped again... both libraries are now universal, yet for some reason, the _mysql_get_host_info symbol is not resolving. Any idea what to try next? Thanks, - Joe From nad at acm.org Thu Jan 8 06:30:53 2009 From: nad at acm.org (Ned Deily) Date: Wed, 07 Jan 2009 21:30:53 -0800 Subject: [Pythonmac-SIG] How to get setuptools to build a Universal Binary? References: <496506CC.30708@strout.net> <9B972470-594E-4787-827A-3566446EE246@keystonewood.com> <4965151F.7010500@strout.net> <49651C86.7080306@noaa.gov> <49653A6A.3070805@strout.net> <496586D9.8000000@strout.net> Message-ID: In article <496586D9.8000000 at strout.net>, Joe Strout wrote: > Ned Deily wrote: > > > Hmm, there's omething odd about that download. > > ... > > > $ file libmysqlclient_r.16.0.0.dylib > > libmysqlclient_r.16.0.0.dylib: Mach-O universal binary with 3 > > architectures > > libmysqlclient_r.16.0.0.dylib (for architecture i386): Mach-O > > dynamically linked shared library i386 > > libmysqlclient_r.16.0.0.dylib (for architecture ppc64): Mach-O 64-bit > > dynamically linked shared library ppc64 > > libmysqlclient_r.16.0.0.dylib (for architecture ppc): Mach-O dynamically > > linked shared library ppc > > > > $ file libmysqlclient_r.16.dylib > > libmysqlclient_r.16.dylib: Mach-O dynamically linked shared library i386 > > OK, I think I see your point here. In the 5.1 download, > libmysqlclient_r.16.0.0.dylib is universal, but > libmysqlclient_r.16.dylib is not. From the looks of the 5.0 download, > these should be the same (both universal). > > > Perhaps you can get away with making a symlink or copying from one to > > the other?? > > Seems reasonable, so as a test, I copied libmysqlclient_r.16.0.0.dylib > into my app bundle on top of libmysqlclient_r.16.dylib. I verified with > "file" that my libmysqlclient_r.16.dylib is now universal, and verified > that my app still runs on an Intel Mac. But on a PPC (10.4) Mac, it > still fails: > > File > "/Users/jstrout/Temp/etownCentral.app/Contents/Resources/IADB.py", line > 12, in > import MySQLdb > File "MySQLdb/__init__.pyc", line 19, in > ImportError: > dlopen(/Users/jstrout/Temp/etownCentral.app/Contents/Resources/lib/python2.5/l > ib-dynload/_mysql.so, > 2): Symbol not found: _mysql_get_host_info > Referenced from: > /Users/jstrout/Temp/etownCentral.app/Contents/Resources/lib/python2.5/lib-dynl > oad/_mysql.so > Expected in: dynamic lookup Did you try rebuilding the app bundle with py2app after the mysql libs were fixed? > I used "otool -L" to check the dependencies of both _mysql.so and > libmysqlclient_r.16.dylib. All seemed satisfactory, though the one for > the latter is a little strange: > > $ otool -L libmysqlclient_r.16.dylib > libmysqlclient_r.16.dylib: > /usr/local/mysql/lib/libmysqlclient_r.16.dylib (compatibility > version 17.0.0, current version 17.0.0) > /usr/lib/libSystem.B.dylib (compatibility version 1.0.0, > current version 88.1.11) > > I'm not sure why libmysqlclient_r.16.dylib is listing a dependency on > itself, but in /usr/local. There is no /usr/local/mysql on a standard > machine (including the one where this is failing). Yet otool does list > a "current version", perhaps because it's finding itself within the app > bundle? Seems a little odd. otools -L on the 5.0 libs I have installed shows similar results. I wouldn't worry about it. -- Ned Deily, nad at acm.org From nad at acm.org Thu Jan 8 07:04:50 2009 From: nad at acm.org (Ned Deily) Date: Wed, 07 Jan 2009 22:04:50 -0800 Subject: [Pythonmac-SIG] How to get setuptools to build a Universal Binary? References: <496506CC.30708@strout.net> <9B972470-594E-4787-827A-3566446EE246@keystonewood.com> <4965151F.7010500@strout.net> <49651C86.7080306@noaa.gov> <49653A6A.3070805@strout.net> <496586D9.8000000@strout.net> Message-ID: In article , Ned Deily wrote: > Did you try rebuilding the app bundle with py2app after the mysql libs > were fixed? Safer: after fixing the mysql libs installed on your mac (not in the app bundle), first rebuild MySQLdb, then rebuild the app with py2app. -- Ned Deily, nad at acm.org From Chris.Barker at noaa.gov Thu Jan 8 07:13:23 2009 From: Chris.Barker at noaa.gov (Chris.Barker) Date: Wed, 07 Jan 2009 22:13:23 -0800 Subject: [Pythonmac-SIG] How to get setuptools to build a Universal Binary? In-Reply-To: References: <496506CC.30708@strout.net> <9B972470-594E-4787-827A-3566446EE246@keystonewood.com> <4965151F.7010500@strout.net> <49651C86.7080306@noaa.gov> <49653A6A.3070805@strout.net> <496586D9.8000000@strout.net> Message-ID: <49659983.4080308@noaa.gov> Ned Deily wrote: > Safer: after fixing the mysql libs installed on your mac (not in the app > bundle), first rebuild MySQLdb, yep -- the linking probably failed for the PPC side. -Chris -- Christopher Barker, Ph.D. Oceanographer Emergency Response Division NOAA/NOS/OR&R (206) 526-6959 voice 7600 Sand Point Way NE (206) 526-6329 fax Seattle, WA 98115 (206) 526-6317 main reception Chris.Barker at noaa.gov From joe at strout.net Thu Jan 8 15:53:23 2009 From: joe at strout.net (Joe Strout) Date: Thu, 08 Jan 2009 07:53:23 -0700 Subject: [Pythonmac-SIG] How to get setuptools to build a Universal Binary? In-Reply-To: References: <496506CC.30708@strout.net> <9B972470-594E-4787-827A-3566446EE246@keystonewood.com> <4965151F.7010500@strout.net> <49651C86.7080306@noaa.gov> <49653A6A.3070805@strout.net> <4965421E.5080405@noaa.gov> <49657DCF.8030204@strout.net> Message-ID: <49661363.1000305@strout.net> Ned Deily wrote: > Note, I haven't tested this so YMMV. If you can get away with using a > 5.0 client, that should work. But if you just fix-up the 5.1 libs with > a couple of copies that should work, too. Go to the directory of your > mysql installation, probably something like: > > cd /usr/local/mysql-5.1.30-osx10.4-universal > > Then: > > cd lib > ls -l *.dylib > file *.dylib > > sudo sh > > cp -p libmysqlclient.16.0.0.dylib libmysqlclient.16.dylib > cp -p libmysqlclient.16.0.0.dylib libmysqlclient.dylib > > cp -p libmysqlclient_r.16.0.0.dylib libmysqlclient_r.16.dylib > cp -p libmysqlclient_r.16.0.0.dylib libmysqlclient_r.dylib Hmm. This doesn't appear to have worked, but it's failing in an odd way that I don't understand. Here's what I did: 1. The above copying, vebatim. 2. In the MySQL-python-1.2.2 source directory: 2a. sudo python setup.py clean 2b. sudo python setup.py build 2c. sudo python setup.py install 3. In my project directory: 3a. rm -rf build/* 3b. rm -rf dist/* 3c. python setup.py py2app 4. Ran the resulting app on ANY machine -- even the one I just built it on -- and it fails with: ...File "IADB.pyc", line 12, in ImportError: No module named MySQLdb Note that the program still works fine when I run it on the command line (with "python eTownCentral.py"), and when I enter python and try "import MySQLdb" that works too, so I haven't broken MySQLdb completely. It's just not included in my app bundle now. Within Frameworks, I see only libwx_macud-2.8.0.dylib and Python.framework; no libmysqlclient at all. And in lib-dynload, there is no longer a _mysqldb.so. The weird thing is, my python source and setup.py have not changed. So why is py2app suddenly failing to realize that it should include MySQLdb? Thanks, - Joe From michael at ini.phys.ethz.ch Wed Jan 7 15:35:01 2009 From: michael at ini.phys.ethz.ch (Michael Graber) Date: Wed, 7 Jan 2009 15:35:01 +0100 Subject: [Pythonmac-SIG] real-time video capturing and processing Message-ID: <91555B9D-1427-482F-92EF-34A440EB83B5@ini.phys.ethz.ch> hi all, first: theres a library called VideoCapture for Win32 environments which makes it possible to access video-capture devices. is there something similar for macs? second: i would like to do real-time video-processing (like bright- spot detection, movement detection, ...) using images recorded by a webcam. is python suited to do so? any references? i appreciate your hints to this quite crude question. best, michael From joe at inspiringapps.com Wed Jan 7 19:52:04 2009 From: joe at inspiringapps.com (Joe Strout) Date: Wed, 07 Jan 2009 11:52:04 -0700 Subject: [Pythonmac-SIG] How to get setuptools to build a Universal Binary? Message-ID: <4964F9D4.8060704@inspiringapps.com> I'm (still) trying to make a neatly packaged Python app that works on both PPC and Intel Macs. All is good except for mysqldb; following the procedure I've documented at , my app bundle contains an Intel-only binary of the mysqldb library (libmysqlclient_r.16.dylib). This page (http://developer.apple.com/opensource/buildingopensourceuniversal.html) at Apple suggests a possible solution: build separate Intel and PPC binaries, and then combine them with lipo. But of course that's using Makefiles. MySQLdb instead uses setuptools. So: does anyone have a clue how I can convince setuptools to build a PPC binary (or better yet, a Universal one) on an Intel machine? This may or may not also be involved: Any advice will be greatly appreciated... Thanks, - Joe -- Joe Strout Inspiring Applications, Inc. http://www.InspiringApps.com From joe at strout.net Thu Jan 8 17:50:43 2009 From: joe at strout.net (Joe Strout) Date: Thu, 08 Jan 2009 09:50:43 -0700 Subject: [Pythonmac-SIG] How to get setuptools to build a Universal Binary? [SOLVED!] In-Reply-To: References: <496506CC.30708@strout.net> <9B972470-594E-4787-827A-3566446EE246@keystonewood.com> <4965151F.7010500@strout.net> <49651C86.7080306@noaa.gov> <49653A6A.3070805@strout.net> <4965421E.5080405@noaa.gov> <49657DCF.8030204@strout.net> Message-ID: <49662EE3.8030202@strout.net> Woot! I finally got my MySQLdb-using Python app working as a Universal Binary! (Trying to make sure all the relevant keywords are there for future googlers.) The root cause of most of the trouble was the broken 5.1 MySQL distribution (bug #41940 on the MySQL tracker). I tried patching it up as Ned suggested, but that didn't work for me. However, going back to 5.0 did work. Here's what I did in more detail: 1. Deleted /usr/local/mysql-5.1.30-osx10.4-universal, and the MySQL-python egg (in /Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/). 2. Downloaded the mysql-5.0.67-osx10.4-universal tarball from the MySQL 5.0 downloads page. Unpacked this into /usr/local, changed ownership and group as usual, and made the symlink to it as /usr/local/mysql. (Confirmed that all dylibs in its lib directory were really universal, using "file *.dylib".) 3. Reinstalled MySQLdb using the easy method Ned suggested: "easy_install -Z MySQL-python". This worked fine; all the extra hackery at appears to be unnecessary when you use easy_install, as is the manual unzipping of the egg (provided you remember the -Z flag). Navigated into the newly created egg in site-packages and verified that the _mysql.so file was universal. 4. Rebuilt my app with py2app. The resulting app works in 10.4 and 10.5 on both PPC and Intel machines. Hooray! Now, let's see... I owe a beer (or other beverage of choice) to Ned, Chris, Robin, and Andy... and I'm off to make a donation to both wxPython and MySQLdb... Many thanks, - Joe From daniel at keystonewood.com Thu Jan 8 18:31:27 2009 From: daniel at keystonewood.com (Daniel Miller) Date: Thu, 8 Jan 2009 12:31:27 -0500 Subject: [Pythonmac-SIG] How to get setuptools to build a Universal Binary? [SOLVED!] In-Reply-To: <49662EE3.8030202@strout.net> References: <496506CC.30708@strout.net> <9B972470-594E-4787-827A-3566446EE246@keystonewood.com> <4965151F.7010500@strout.net> <49651C86.7080306@noaa.gov> <49653A6A.3070805@strout.net> <4965421E.5080405@noaa.gov> <49657DCF.8030204@strout.net> <49662EE3.8030202@strout.net> Message-ID: > Woot! I finally got my MySQLdb-using Python app working as a > Universal Binary! Excellent! I'm glad you got it working. > The root cause of most of the trouble was the broken 5.1 MySQL > distribution (bug #41940 on the MySQL tracker). I tried patching > it up as Ned suggested, but that didn't work for me. However, > going back to 5.0 did work. Out of curiosity, what does the mysql_config command give you now? i.e. the output of: $ mysql_config --cflags Cheers, Daniel From joe at strout.net Thu Jan 8 18:58:15 2009 From: joe at strout.net (Joe Strout) Date: Thu, 08 Jan 2009 10:58:15 -0700 Subject: [Pythonmac-SIG] How to get setuptools to build a Universal Binary? [SOLVED!] In-Reply-To: References: <496506CC.30708@strout.net> <9B972470-594E-4787-827A-3566446EE246@keystonewood.com> <4965151F.7010500@strout.net> <49651C86.7080306@noaa.gov> <49653A6A.3070805@strout.net> <4965421E.5080405@noaa.gov> <49657DCF.8030204@strout.net> <49662EE3.8030202@strout.net> Message-ID: <49663EB7.2090102@strout.net> Daniel Miller wrote: >> The root cause of most of the trouble was the broken 5.1 MySQL >> distribution (bug #41940 on the MySQL tracker). I tried patching it >> up as Ned suggested, but that didn't work for me. However, going back >> to 5.0 did work. > > Out of curiosity, what does the mysql_config command give you now? i.e. > the output of: > > $ mysql_config --cflags Still no "arch" flags: -I/usr/local/mysql/include -g -Os -fno-common -D_P1003_1B_VISIBLE -DSIGNAL_WITH_VIO_CLOSE -DSIGNALS_DONT_BREAK_READ -DIGNORE_SIGHUP_SIGQUIT Best, - Joe From Chris.Barker at noaa.gov Thu Jan 8 19:05:48 2009 From: Chris.Barker at noaa.gov (Christopher Barker) Date: Thu, 08 Jan 2009 10:05:48 -0800 Subject: [Pythonmac-SIG] Building MySqldb for Universal Python In-Reply-To: <49661363.1000305@strout.net> References: <496506CC.30708@strout.net> <9B972470-594E-4787-827A-3566446EE246@keystonewood.com> <4965151F.7010500@strout.net> <49651C86.7080306@noaa.gov> <49653A6A.3070805@strout.net> <4965421E.5080405@noaa.gov> <49657DCF.8030204@strout.net> <49661363.1000305@strout.net> Message-ID: <4966407C.2010203@noaa.gov> NOTE: I'm sending this all here, so it will be here for the archives This is about trying to build a Universal MySqlDb module for the python.org Universal python (2.5.2 in this case). The issue is that you need to start with Universal MySQL libs. MySQL does indeed distribute Universal libs (ppc, ppc64, and i386 -- apparently not i386-64), but only as a tarball, not as as in installer in a .dmg. However, there appears to be a bug in the tarball for version 5.1.30, and this note is about that: I've got my curiosity up, so I've poked into this a bit more: looking in: /usr/local/mysql-5.1.30-osx10.4-universal/lib things are clearly broken for example, we have: 15266468 Nov 20 23:32 libmysqlclient.16.0.0.dylib 4781040 Nov 15 14:57 libmysqlclient.16.dylib The 16.0.0 version is Universal (ppc, ppc64, and i386), and the 16.dylib one is only i386 (and this in on a ppc machine!) different date, too... But it's not just that. If I look in the ppc build I got from MySQL: /usr/local/mysql-5.1.30-osx10.4-powerpc/lib Nov 15 15:29 libmysqlclient.16.0.0.dylib 27 Jan 7 13:13 libmysqlclient.16.dylib -> libmysqlclient.16.0.0.dylib so the 16.dylib version is supposed to be a symlink to the 16.0.0.dylib version, which is the usual *nix practice. Indeed, there are no symlinks in the lib dir at all. So I think the way proper way to fix it is not to copy, but rather to fix the symlinks. Here's a script to do it (it needs to be run from the lib dir): #!/bin/sh # script to fix mysql lib dir in Universal dist ln -s -f libmysqlclient.16.0.0.dylib libmysqlclient.16.dylib ln -s -f libmysqlclient.16.0.0.dylib libmysqlclient.dylib ln -s -f libmysqlclient_r.16.0.0.dylib libmysqlclient_r.16.dylib ln -s -f libmysqlclient_r.16.0.0.dylib libmysqlclient_r.dylib (also enclosed as a file) Now to test the build of the python extension (MySQL-python-1.2.2) first remove any old build and dist dirs (distutils is not so good at cleaning up): $ rm -rf build dist now try the build: $ python setup.py build no errors, and I see: "-arch ppc -arch i386" in the gcc line, so it looks like it's getting a universal build. Poking into: build/lib.macosx-10.3-ppc-2.5 (distutils isn't really smart about Universal, so it creates this dir named for the host system) I get: file _mysql.so _mysql.so: Mach-O universal binary with 2 architectures _mysql.so (for architecture i386): Mach-O bundle i386 _mysql.so (for architecture ppc): Mach-O bundle ppc which looks good. and: $ otool -L _mysql.so _mysql.so: /usr/local/mysql/lib/libmysqlclient_r.16.dylib (compatibility version 17.0.0, current version 17.0.0) /usr/lib/libz.1.dylib (compatibility version 1.0.0, current version 1.2.3) /usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 88.3.9) /usr/lib/libmx.A.dylib (compatibility version 1.0.0, current version 47.1.0) and just to make sure: $ file /usr/local/mysql/lib/libmysqlclient_r.16.dylib /usr/local/mysql/lib/libmysqlclient_r.16.dylib: symbolic link to `libmysqlclient_r.16.0.0.dylib' that's the link I created. And: $ file /usr/local/mysql/lib/libmysqlclient_r.16.0.0.dylib /usr/local/mysql/lib/libmysqlclient_r.16.0.0.dylib: Mach-O universal binary with 3 architectures /usr/local/mysql/lib/libmysqlclient_r.16.0.0.dylib (for architecture i386): Mach-O dynamically linked shared library i386 /usr/local/mysql/lib/libmysqlclient_r.16.0.0.dylib (for architecture ppc64): Mach-O 64-bit dynamically linked shared library ppc64 /usr/local/mysql/lib/libmysqlclient_r.16.0.0.dylib (for architecture ppc): Mach-O dynamically linked shared library ppc Which is what we want. $ python setup.py install note: I have setuptools set to never install zip packages, 'cause they don't work right with py2app, and I like being able to see what's in them, etc. You can do this by creating a .pydistutils.cfg file in your home dir, and putting: [easy_install] zip-ok = 0 in it. now to test: $ python Python 2.5.2 (r252:60911, Feb 22 2008, 07:57:53) [GCC 4.0.1 (Apple Computer, Inc. build 5363)] on darwin Type "help", "copyright", "credits" or "license" for more information. >>> import _mysql >>> At least it imports -- I don't have anything real to test with! Further note: It would be nice to distribute a binary of the python package. However, it would depend in that mysql dylib. I think the right way to do it would be to link the python extension against the static lib instead. To do that, I'm going to (temporarily) remove all the dylibs from the mysql lib dir, so it can only link to the static lib. (in the mysql libs dir) $ mkdir temp $ mv *.dylib temp/ now build the python lib again: $ rm -rf build dist $ python setup.py build which ran without errors. check the lib: $ otool -L _mysql.so _mysql.so: /usr/lib/libz.1.dylib (compatibility version 1.0.0, current version 1.2.3) /usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 88.3.9) /usr/lib/libmx.A.dylib (compatibility version 1.0.0, current version 47.1.0) whoo hoo! it's not longer dependent on the mysql dylib! $ python setup.py install and I've got it installed and it seems to work, but still needs testing. I've now got a binary egg file -- anyone want to test it? It's about 3MB, which I think is too big to post here, but I'll send it to anyone that asks. Also, we really need a place to post it, if it works! -Chris -- Christopher Barker, Ph.D. Oceanographer Emergency Response Division NOAA/NOS/OR&R (206) 526-6959 voice 7600 Sand Point Way NE (206) 526-6329 fax Seattle, WA 98115 (206) 526-6317 main reception Chris.Barker at noaa.gov -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: FixMySqlUniveralLibs.sh URL: From Chris.Barker at noaa.gov Thu Jan 8 19:19:07 2009 From: Chris.Barker at noaa.gov (Christopher Barker) Date: Thu, 08 Jan 2009 10:19:07 -0800 Subject: [Pythonmac-SIG] How to get setuptools to build a Universal Binary? In-Reply-To: <49661363.1000305@strout.net> References: <496506CC.30708@strout.net> <9B972470-594E-4787-827A-3566446EE246@keystonewood.com> <4965151F.7010500@strout.net> <49651C86.7080306@noaa.gov> <49653A6A.3070805@strout.net> <4965421E.5080405@noaa.gov> <49657DCF.8030204@strout.net> <49661363.1000305@strout.net> Message-ID: <4966439B.6030406@noaa.gov> Joe Strout wrote: > Hmm. This doesn't appear to have worked, but it's failing in an odd way > that I don't understand. Here's what I did: > > 1. The above copying, vebatim. > 2. In the MySQL-python-1.2.2 source directory: > 2a. sudo python setup.py clean I recommend actually deleting the build and dist directories -- distutils in not all that good at cleaning up. > ImportError: No module named MySQLdb that is odd. > why is py2app suddenly failing to realize that it should include MySQLdb? One guess -- I think "setup.py install" puts a zipped egg in by default, and py2app does not work well with zipped eggs. I couldn't figure out how to tell it not to do that (with easy install, you pass the -Z option). However, I set a preferences file so that it would never put in zipped eggs: by creating a .pydistutils.cfg file in your home dir, and putting: [easy_install] zip-ok = 0 in it. (I found that on the web somewhere...) Take a look at the other note I jsut posted -- I have successfully build a Universal version that is statically linked to the mysql lib -- though I don't know if it works beyond importing-- can you test for me? -Chris PS: I think you may owe me two beers now ;-) -- Christopher Barker, Ph.D. Oceanographer Emergency Response Division NOAA/NOS/OR&R (206) 526-6959 voice 7600 Sand Point Way NE (206) 526-6329 fax Seattle, WA 98115 (206) 526-6317 main reception Chris.Barker at noaa.gov From Chris.Barker at noaa.gov Thu Jan 8 20:51:25 2009 From: Chris.Barker at noaa.gov (Christopher Barker) Date: Thu, 08 Jan 2009 11:51:25 -0800 Subject: [Pythonmac-SIG] How to get setuptools to build a Universal Binary? [SOLVED!] In-Reply-To: <49662EE3.8030202@strout.net> References: <496506CC.30708@strout.net> <9B972470-594E-4787-827A-3566446EE246@keystonewood.com> <4965151F.7010500@strout.net> <49651C86.7080306@noaa.gov> <49653A6A.3070805@strout.net> <4965421E.5080405@noaa.gov> <49657DCF.8030204@strout.net> <49662EE3.8030202@strout.net> Message-ID: <4966593D.8060708@noaa.gov> Joe Strout wrote: > Woot! I finally got my MySQLdb-using Python app working as a Universal > Binary! glad you got it working -- a couple comments for the record: > The root cause of most of the trouble was the broken 5.1 MySQL > distribution (bug #41940 on the MySQL tracker). Ned, thanks for posting this bug. > I tried patching it up as Ned suggested, but that didn't work for me. see my recent post: Building MySqldb for Universal Python It worked fine for me. > 3. Reinstalled MySQLdb using the easy method Ned suggested: > "easy_install -Z MySQL-python". This worked fine; all the extra hackery > at > > appears to be unnecessary when you use easy_install, Note that easy_install runs the same old "setup.py build" that you do by hand - so the bugs that that post corrects are probably fixed in the source. By the way, I've build a binary universal egg that should be re-distributable - please let me know if you want to test it, or have a place to host it. -Chris -- Christopher Barker, Ph.D. Oceanographer Emergency Response Division NOAA/NOS/OR&R (206) 526-6959 voice 7600 Sand Point Way NE (206) 526-6329 fax Seattle, WA 98115 (206) 526-6317 main reception Chris.Barker at noaa.gov From lyle-python at ahgi.com Thu Jan 8 21:20:06 2009 From: lyle-python at ahgi.com (Lyle Gunderson) Date: Thu, 8 Jan 2009 13:20:06 -0700 Subject: [Pythonmac-SIG] PythonMagick Message-ID: <3CE83DF2-87C3-4F2B-ABAF-6F2A2879E4F8@ahgi.com> Has anyone installed PythonMagick on Mac OS X? I have ImageMagick and Python both installed and working on my Mac, so a way to make them work together seems like a great idea. I found it and downloaded it in source code form. Source code is fine, but there is a list of requirements for other bits of software that I have never heard of, so I would like to know if this is going to work before I start chasing all this stuff down. Thanks in anticipation, --Lyle From nad at acm.org Thu Jan 8 21:42:59 2009 From: nad at acm.org (Ned Deily) Date: Thu, 08 Jan 2009 12:42:59 -0800 Subject: [Pythonmac-SIG] How to get setuptools to build a Universal Binary? [SOLVED!] References: <496506CC.30708@strout.net> <9B972470-594E-4787-827A-3566446EE246@keystonewood.com> <4965151F.7010500@strout.net> <49651C86.7080306@noaa.gov> <49653A6A.3070805@strout.net> <4965421E.5080405@noaa.gov> <49657DCF.8030204@strout.net> <49662EE3.8030202@strout.net> <4966593D.8060708@noaa.gov> Message-ID: Chris, Thanks for all the work on this. And nice summary! Just one comment: In article <4966593D.8060708 at noaa.gov>, Christopher Barker wrote: > By the way, I've build a binary universal egg that should be > re-distributable - please let me know if you want to test it, or have a > place to host it. Putting it out on the web isn't worth, IMHO. I fear it would turn into YAPackage that doesn't get updated and eventually causes more trouble than it's worth. Looking back over Joe's experience, my take it that the root cause of nearly all of the difficulties was the faulty MySQL 5.1.30 distribution, which of course he had no reason to assume was bad. If he had been lucky enough to start with the 5.0 dist he ended up with and followed the standard install of MySQLdb, the MySQL part of his app building would have been straightforward. I think documenting the problem with 5.1.30, which we've done in the pythonmac world and on the MySQL tracker, and if necessary "encouraging" a resolution over at MySQL are sufficient actions for now. In any case, just my $0.02. --Ned -- Ned Deily, nad at acm.org From zachary.pincus at yale.edu Fri Jan 9 00:00:43 2009 From: zachary.pincus at yale.edu (Zachary Pincus) Date: Thu, 8 Jan 2009 18:00:43 -0500 Subject: [Pythonmac-SIG] real-time video capturing and processing In-Reply-To: <91555B9D-1427-482F-92EF-34A440EB83B5@ini.phys.ethz.ch> References: <91555B9D-1427-482F-92EF-34A440EB83B5@ini.phys.ethz.ch> Message-ID: <02317BCF-D5EE-42A4-BBAF-EC60B6AE41B0@yale.edu> Hi Michael, I see some faint traces on Google of something called "PySight" that can grab images from iSight cameras. There may be some Apple-provided frameworks for grabbing iSight images as well, which could be called via PyObjC. Failing that, I'm sure you can find some C-level webcam drivers for OS X. Writing python wrappers for these (using either Cython [an update to pyrex] or even just the Python API) shouldn't be a big trouble at all if you've any C experience. (I could provide some help/advice along these lines if you need.) My suggestion is to learn a bit about numpy, the python numerical computing module, and it's friend scipy, which provides more domain- specific routines. Specifically, passing a chunk of memory (representing an image as an array of bytes) from a C library to numpy is extremely easy, using the C API or even Cython. And scipy provides good image-manipulation tools in its ndimage and signal sub-modules. These are all in C and fortran, so real-time should be achievable. The numpy and scipy lists have really good folks on them who know their stuff (including some imaging people), so if you have specific questions about image processing with those tools, definitely ask there. Alternately, there are python wrappers for OpenCV, which provides a TON of basic to advanced imaging stuff. It can be a bit overwhelming, but it's good and optimized for speed. (OpenCV has webcam drivers, but I don't think they work on OS X.) IMO, the ctypes-based wrappers are likely better and easier to use/extend than the SWIG ones. Visualization might be tricky, though... you'll likely (?) want some way to blit the images to the screen at some point, and so you'll want to choose a GUI toolkit. You could use Cocoa with PyObjC, or tkinter, or wx, or whatever. Most of these can accept a blob of memory and draw it on screen as a image. I use Pyglet, which is a nice, thin, cross- platform wrapper for simple windowing and OpenGL. (No widget toolkit for pyglet, but I just use it to throw pixels onto a 2D surface as fast as possible.) As a bonus, I've written some code that allows you to run a pyglet window in the background, which can be controlled from the python interpreter. (Most windowing toolkits need their own main() routine to run, which precludes interactive control via a python shell, unless you embed that in the main(). Ipython has tools to do this for wx and tkinter, but it's a bit klugey, IMO.) Ask me if you want this code. Zach Pincus Postdoctoral Fellow, lab of Frank Slack Molecular, Cellular and Developmental Biology Yale University On Jan 7, 2009, at 9:35 AM, Michael Graber wrote: > hi all, > > first: theres a library called VideoCapture for Win32 environments > which makes it possible to access video-capture devices. is there > something similar for macs? > > second: i would like to do real-time video-processing (like bright- > spot detection, movement detection, ...) using images recorded by a > webcam. is python suited to do so? any references? > > i appreciate your hints to this quite crude question. > > best, > michael > _______________________________________________ > Pythonmac-SIG maillist - Pythonmac-SIG at python.org > http://mail.python.org/mailman/listinfo/pythonmac-sig From Chris.Barker at noaa.gov Fri Jan 9 00:29:50 2009 From: Chris.Barker at noaa.gov (Christopher Barker) Date: Thu, 08 Jan 2009 15:29:50 -0800 Subject: [Pythonmac-SIG] MySQLdb Universal binary: call for testers Message-ID: <49668C6E.8030406@noaa.gov> Hi folks, I've built what I think should be a binary egg for mySQLdb. It should work for the python.org Universal build of python2.5, on OS-X 10.3.9 and above. However, it hasn't really been tested. I haven't enclosed it here, as it's about 3MB, but if you drop me a note, I'll send it to you to test. Once it's been tested, the MySQLdb folks have offered to put it up on their sourceforge download page, which would be nice. -Chris -- Christopher Barker, Ph.D. Oceanographer Emergency Response Division NOAA/NOS/OR&R (206) 526-6959 voice 7600 Sand Point Way NE (206) 526-6329 fax Seattle, WA 98115 (206) 526-6317 main reception Chris.Barker at noaa.gov From rowen at u.washington.edu Fri Jan 9 20:19:10 2009 From: rowen at u.washington.edu (Russell E. Owen) Date: Fri, 09 Jan 2009 11:19:10 -0800 Subject: [Pythonmac-SIG] Warning: The process has forked and you cannot use this CoreFoundation functionality safely. Message-ID: I maintain a RO.DS9, a cross-platform Python module that controls ds9 (a.k.a. SAOImage DS9), an astronomical image viewer. The module starts by launching ds9 with a window of a known name (this is required to further command it), and that's where I run into trouble on MacOS X. On unix and Windows ds9 is an executable that I run using subprocess.Open and provide the necessary command-line arguments to set the window name. That works fine. On MacOS X I used to do the same thing. The application is a bundle "SAOImage DS9.app" that contains the executable ds9 that takes the same command-line arguments. Running ds9 still works on Leopard, but results in the nasty warning: The process has forked and you cannot use this CoreFoundation functionality safely. You MUST exec(). >From a google search, I found this: ------- This is caused by programs that use the fork() or daemon() function in combination with higher-level APIs. In Leopard you cannot use the CoreFoundation (CF...) APIs on the child side of a fork() without following it with an exec*() function. This has always been true, but Leopard is much more stingy about this kind of thing. So clearly I should not be doing this. But what to do instead? The simplest, but inadequate, alternative is to use subprocess to run the command "open -a SAOImage DS9". This works but I can't send command-line arguments, so I can't control the name of the window, which cripples the module. Is there some Mac-safe way to start the ds9 command-line application from my python module? I don't really know what it means to "run an exec*() function after a fork" and didn't think I was forking anything anyway -- I'm trying to start an independent process. I fear that the fork may be in ds9 itself and that there's nothing I can do, but I hope I'm wrong. -- Russell From vivacarlie at gmail.com Sat Jan 10 05:26:20 2009 From: vivacarlie at gmail.com (Nehemiah Dacres) Date: Fri, 9 Jan 2009 22:26:20 -0600 Subject: [Pythonmac-SIG] Warning: The process has forked and you cannot use this CoreFoundation functionality safely. In-Reply-To: References: Message-ID: <65fadfc30901092026l1b499edfi42fcd59afe66d409@mail.gmail.com> python version please and where might I find this code? fork(3) is the unix system call that copies the program and one becomes a child process and another a parent (which is supposed to wait on the child). The child process normally calls a function from the exec(2) family soon afterward. Leopard is probably being anal because until exec, that is 2 programms with the same amount of address size and Core Foundation may not be able to handel that. The error > > The process has forked and you cannot use this CoreFoundation > functionality safely. You MUST exec(). > uses the word 'this', which implies it gave you the CoreFoundation API call that triggered the warning. > > Is there some Mac-safe way to start the ds9 command-line application > from my python module? I don't really know what it means to "run an > exec*() function after a fork" and didn't think I was forking anything > anyway -- I'm trying to start an independent process. I fear that the > fork may be in ds9 itself and that there's nothing I can do, but I hope > I'm wrong. It is evident that the program is handeling something in a Mac OS Classic way that should be handled in a BSD way. That could be either Python's fault or the progammer. -- "lalalalala! it's not broken because I can use it" http://linux.slashdot.org/comments.pl?sid=194281&threshold=1&commentsort=0&mode=thread&cid=15927703 -------------- next part -------------- An HTML attachment was scrubbed... URL: From michael at ini.phys.ethz.ch Mon Jan 12 13:29:41 2009 From: michael at ini.phys.ethz.ch (Michael Graber) Date: Mon, 12 Jan 2009 13:29:41 +0100 Subject: [Pythonmac-SIG] real-time video capturing and processing In-Reply-To: <02317BCF-D5EE-42A4-BBAF-EC60B6AE41B0@yale.edu> References: <91555B9D-1427-482F-92EF-34A440EB83B5@ini.phys.ethz.ch> <02317BCF-D5EE-42A4-BBAF-EC60B6AE41B0@yale.edu> Message-ID: <4600CE89-799D-4BCE-84D8-3ABCAE8C0FFD@ini.phys.ethz.ch> hi zach, thanks a lot for your help. so far i made first steps using PySight which works fine with my iSight camera. i'm able to aquire images and to process them, using code-snippets from here and there, but i lack an idea of PyObjC and i am still a bit overwhelmed by it. i would prefer to do as little as possible with it, just acquiring data. scipy/numpy (together with ipython) are what i use for data analysis in general and i'm going to work with them for pattern detection, though up to now i lack a systematic approach to pass them 'a chunk of memory' . for visualisation i find pyglet very interesting. i'd be happy if you could send me your code that allows to run a pyglet window in the background. best, michael From zachary.pincus at yale.edu Mon Jan 12 22:57:45 2009 From: zachary.pincus at yale.edu (Zachary Pincus) Date: Mon, 12 Jan 2009 16:57:45 -0500 Subject: [Pythonmac-SIG] real-time video capturing and processing In-Reply-To: <4600CE89-799D-4BCE-84D8-3ABCAE8C0FFD@ini.phys.ethz.ch> References: <91555B9D-1427-482F-92EF-34A440EB83B5@ini.phys.ethz.ch> <02317BCF-D5EE-42A4-BBAF-EC60B6AE41B0@yale.edu> <4600CE89-799D-4BCE-84D8-3ABCAE8C0FFD@ini.phys.ethz.ch> Message-ID: > thanks a lot for your help. so far i made first steps using PySight > which works fine with my iSight camera. Cool, I'm glad this worked. I'll have to try PySight out. > i'm able to aquire images and to process them, using code-snippets > from here and there, but i lack an idea of PyObjC and i am still a > bit overwhelmed by it. i would prefer to do as little as possible > with it, just acquiring data. You and me both. > scipy/numpy (together with ipython) are what i use for data analysis > in general and i'm going to work with them for pattern detection, > though up to now i lack a systematic approach to pass them 'a chunk > of memory' . If you can get from C code a python object exporting the "buffer protocol" (maybe a string representing image bytes, or whatever), it's pretty easy to construct a numpy array, from a variety of functions (like numpy.frombuffer/fromstring, or just using the numpy.ndarray constructor). Alternately, and this I find to be the easiest way of dealing with C-level stuff, I construct the array first using numpy.ones/zeros/empty, and then grab a pointer to the memory from that array, and pass that into the C function to fill in, or process, or whatever. This is pretty easy with ctypes: http://www.scipy.org/Cookbook/Ctypes > for visualisation i find pyglet very interesting. i'd be happy if > you could send me your code that allows to run a pyglet window in > the background. I'll send that off-list. Anyone should feel free to contact me for more information about this! Zach From theodoreiii at hotmail.com Mon Jan 12 23:04:32 2009 From: theodoreiii at hotmail.com (Eddie L) Date: Mon, 12 Jan 2009 14:04:32 -0800 (PST) Subject: [Pythonmac-SIG] Py2App and PyQT In-Reply-To: References: Message-ID: <21424813.post@talk.nabble.com> I had the exact same problem and fixed it adding that line to the __boot__.py file in the app's package contents, but I was wondering if there was a way to tell py2app to do this automatically in the setup script because otherwise I'd have to do it manually every time I build my project. Py2exe has a custom boot script option but it doesn't look like py2app does. Thanks, Eddie kelsolaar_fool wrote: > > Ok the QtCore.so problem got solved by adding this line into the > __boot__.py : > > sys.path = [os.path.join(os.environ['RESOURCEPATH'], 'lib', 'python2.5', > 'lib-dynload')] + sys.path > -- View this message in context: http://www.nabble.com/Py2App-and-PyQT-tp20175194p21424813.html Sent from the Python - pythonmac-sig mailing list archive at Nabble.com. From Chris.Barker at noaa.gov Tue Jan 13 18:24:33 2009 From: Chris.Barker at noaa.gov (Christopher Barker) Date: Tue, 13 Jan 2009 09:24:33 -0800 Subject: [Pythonmac-SIG] Py2App and PyQT In-Reply-To: <21424813.post@talk.nabble.com> References: <21424813.post@talk.nabble.com> Message-ID: <496CCE51.1060400@noaa.gov> Eddie L wrote: > I had the exact same problem and fixed it adding that line to the __boot__.py > file in the app's package contents, but I was wondering if there was a way > to tell py2app to do this automatically in the setup script because > otherwise I'd have to do it manually every time I build my project. clearly a bad idea! > Py2exe > has a custom boot script option but it doesn't look like py2app does. I haven't seen that option -- but you're right it should. Some quick poking did not make it clear to me where py2app builds the __boot.__py file though. Anyway, you can always hack around this by adding some code to your setup.py that changes __boot__.py after building the app. I find I have to add a lot of extra fiddling code to accommodate eggs and other deficiencies in py2app, but I don't have the time to get to know py2app enough to submit a patch, so there you go. -Chris -- Christopher Barker, Ph.D. Oceanographer Emergency Response Division NOAA/NOS/OR&R (206) 526-6959 voice 7600 Sand Point Way NE (206) 526-6329 fax Seattle, WA 98115 (206) 526-6317 main reception Chris.Barker at noaa.gov From listsin at integrateddevcorp.com Wed Jan 14 02:47:13 2009 From: listsin at integrateddevcorp.com (s s) Date: Tue, 13 Jan 2009 20:47:13 -0500 Subject: [Pythonmac-SIG] Py2app -- where is canonical repository, what version is current? In-Reply-To: <4966439B.6030406@noaa.gov> References: <496506CC.30708@strout.net> <9B972470-594E-4787-827A-3566446EE246@keystonewood.com> <4965151F.7010500@strout.net> <49651C86.7080306@noaa.gov> <49653A6A.3070805@strout.net> <4965421E.5080405@noaa.gov> <49657DCF.8030204@strout.net> <49661363.1000305@strout.net> <4966439B.6030406@noaa.gov> Message-ID: I've been trying to figure out where the _real_ current Py2app is. Here's one source of confusion: The __init__.py in the py2app directory as distributed by Apple with Leopard contains: __version__ = "0.4.1" The __init__.py file, from the trunk of the repository at: http://svn.red-bean.com/bob/py2app/trunk/ __version__ = "0.3" The __init__.py file from the trunk of the repository at : http://svn.pythonmac.org/py2app/py2app/trunk __version__ = "0.4.2" The __init__.py file from the trunk at : The python.org file references two different py2app distributions on : http://wiki.python.org/moin/MacPython/py2app The one at http://undefined.org/python/py2app.html refers back to the http://svn.red-bean.com/bob/py2app/trunk/ so at least that's not a new version (though it is another new place for the documentation). Can anyone tell me which of these is the actual development repository? Sorry if this has been answered before but I could not find a definitive answer in the archives. I really need to add some things (compiling xib -> nib, for example) to build my project and I'd prefer to start with something to which I could actually contribute my changes. Thanks, S Stephen F. Steiner Integrated Development Corporation ssteiner at integrateddevcorp.com www.integrateddevcorp.com (603)433-1232 From rowen at u.washington.edu Wed Jan 14 22:51:30 2009 From: rowen at u.washington.edu (Russell E. Owen) Date: Wed, 14 Jan 2009 13:51:30 -0800 Subject: [Pythonmac-SIG] Warning: The process has forked and you cannot use this CoreFoundation functionality safely. References: <65fadfc30901092026l1b499edfi42fcd59afe66d409@mail.gmail.com> Message-ID: A good question, and in the process of answering it I found that problem is caused by running a "Tiger" version of SAOImage DS9 on "Leopard". These can be downloaded from: Python version is 2.5.2 (the version from python.org). I'm no an Intel Mac running 10.5.6. This trivial test case shows the problem: import subprocess args = ('/Applications/SAOImage DS9.app/Contents/MacOS/ds9', '-title', 'foo', '-port', '0') subprocess.Popen(args=args) This works correctly on Leopard if running a Leopard version of the DS9. But if I use a Tiger version of DS9 then after the Popen "call" returns I see a host of these warning messages: The process has forked and you cannot use this CoreFoundation functionality safely. You MUST exec(). Break on __THE_PROCESS_HAS_FORKED_AND_YOU_CANNOT_USE_THIS_COREFOUNDATION_FUNCTIONA LITY___YOU_MUST_EXEC__() to debug. (I have verified this with DS9 5.4 -- Leopard and Tiger versions -- but I first found it out because I had an older Tiger DS9 that I had not upgraded when I switched to Leopard). -- Russell P.S. As a result of this test I am skeptical of the Tiger version of DS9, because the message warns of something that should not have been done in either MacOS X 10.4 or 10.5 -- even though only 10.5 warns about it. In article <65fadfc30901092026l1b499edfi42fcd59afe66d409 at mail.gmail.com>, "Nehemiah Dacres" wrote: > python version please and where might I find this code? > fork(3) is the unix system call that copies the program and one becomes a > child process and another a parent (which is supposed to wait on the child). > The child process normally calls a function from the exec(2) family soon > afterward. Leopard is probably being anal because until exec, that is 2 > programms with the same amount of address size and Core Foundation may not > be able to handel that. The error > > > > > The process has forked and you cannot use this CoreFoundation > > functionality safely. You MUST exec(). > > > uses the word 'this', which implies it gave you the CoreFoundation API call > that triggered the warning. > > > > > Is there some Mac-safe way to start the ds9 command-line application > > from my python module? I don't really know what it means to "run an > > exec*() function after a fork" and didn't think I was forking anything > > anyway -- I'm trying to start an independent process. I fear that the > > fork may be in ds9 itself and that there's nothing I can do, but I hope > > I'm wrong. > > > It is evident that the program is handeling something in a Mac OS Classic > way that should be handled in a BSD way. That could be either Python's fault > or the progammer. From dan at rosspixelworks.com Wed Jan 14 15:06:46 2009 From: dan at rosspixelworks.com (Dan Ross) Date: Wed, 14 Jan 2009 08:06:46 -0600 (CST) Subject: [Pythonmac-SIG] Python SMB Error? Message-ID: <56397.66.43.195.188.1231942006.squirrel@rosspixelworks.com> Hi all - I get the following error when launching a wxPython app in TextMate... 2009-01-14 07:42:37.029 Python[26558:53ef] Error loading /System/Library/Filesystems/URLMount/smb.URLMounter/Contents/MacOS/smb: ??dlopen(/System/Library/Filesystems/URLMount/smb.URLMounter/Contents/MacOS/smb, 262): Symbol not found: _URLM_DirectQueryInterface ????Referenced from: /System/Library/Filesystems/URLMount/smb.URLMounter/Contents/MacOS/smb ????Expected in: flat namespace 2009-01-14 07:42:37.030 Python[26558:53ef] Cannot find function pointer CIFSURLMounterFactory for factory 92D4EFEF-F5AA-11D5-A1EE-003065A0E6DE in CFBundle/CFPlugIn 0x1955d530 (bundle, not loaded) 2009-01-14 07:42:37.031 Python[26558:53ef] Error loading /System/Library/Filesystems/URLMount/smb.URLMounter/Contents/MacOS/smb: ??dlopen(/System/Library/Filesystems/URLMount/smb.URLMounter/Contents/MacOS/smb, 262): Symbol not found: _URLM_DirectQueryInterface ????Referenced from: /System/Library/Filesystems/URLMount/smb.URLMounter/Contents/MacOS/smb ????Expected in: flat namespace 2009-01-14 07:42:37.032 Python[26558:53ef] Cannot find function pointer CIFSURLMounterFactory for factory 92D4EFEF-F5AA-11D5-A1EE-003065A0E6DE in CFBundle/CFPlugIn 0x1955d530 (bundle, not loaded) 2009-01-14 07:42:37.033 Python[26558:53ef] Error loading /System/Library/Filesystems/URLMount/smb.URLMounter/Contents/MacOS/smb: ??dlopen(/System/Library/Filesystems/URLMount/smb.URLMounter/Contents/MacOS/smb, 262): Symbol not found: _URLM_DirectQueryInterface ????Referenced from: /System/Library/Filesystems/URLMount/smb.URLMounter/Contents/MacOS/smb ????Expected in: flat namespace 2009-01-14 07:42:37.033 Python[26558:53ef] Cannot find function pointer CIFSURLMounterFactory for factory 92D4EFEF-F5AA-11D5-A1EE-003065A0E6DE in CFBundle/CFPlugIn 0x1955d530 (bundle, not loaded) 2009-01-14 07:42:37.034 Python[26558:53ef] Error loading /System/Library/Filesystems/URLMount/smb.URLMounter/Contents/MacOS/smb: ??dlopen(/System/Library/Filesystems/URLMount/smb.URLMounter/Contents/MacOS/smb, 262): Symbol not found: _URLM_DirectQueryInterface ????Referenced from: /System/Library/Filesystems/URLMount/smb.URLMounter/Contents/MacOS/smb ????Expected in: flat namespace 2009-01-14 07:42:37.035 Python[26558:53ef] Cannot find function pointer CIFSURLMounterFactory for factory 92D4EFEF-F5AA-11D5-A1EE-003065A0E6DE in CFBundle/CFPlugIn 0x1955d530 (bundle, not loaded) 2009-01-14 07:42:37.035 Python[26558:53ef] Error loading /System/Library/Filesystems/URLMount/smb.URLMounter/Contents/MacOS/smb: ??dlopen(/System/Library/Filesystems/URLMount/smb.URLMounter/Contents/MacOS/smb, 262): Symbol not found: _URLM_DirectQueryInterface ????Referenced from: /System/Library/Filesystems/URLMount/smb.URLMounter/Contents/MacOS/smb ????Expected in: flat namespace 2009-01-14 07:42:37.036 Python[26558:53ef] Cannot find function pointer CIFSURLMounterFactory for factory 92D4EFEF-F5AA-11D5-A1EE-003065A0E6DE in CFBundle/CFPlugIn 0x1955d530 (bundle, not loaded) 2009-01-14 07:42:37.037 Python[26558:53ef] Error loading /System/Library/Filesystems/URLMount/smb.URLMounter/Contents/MacOS/smb: ??dlopen(/System/Library/Filesystems/URLMount/smb.URLMounter/Contents/MacOS/smb, 262): Symbol not found: _URLM_DirectQueryInterface ????Referenced from: /System/Library/Filesystems/URLMount/smb.URLMounter/Contents/MacOS/smb ????Expected in: flat namespace 2009-01-14 07:42:37.037 Python[26558:53ef] Cannot find function pointer CIFSURLMounterFactory for factory 92D4EFEF-F5AA-11D5-A1EE-003065A0E6DE in CFBundle/CFPlugIn 0x1955d530 (bundle, not loaded) 2009-01-14 07:42:37.038 Python[26558:53ef] Error loading /System/Library/Filesystems/URLMount/smb.URLMounter/Contents/MacOS/smb: ??dlopen(/System/Library/Filesystems/URLMount/smb.URLMounter/Contents/MacOS/smb, 262): Symbol not found: _URLM_DirectQueryInterface ????Referenced from: /System/Library/Filesystems/URLMount/smb.URLMounter/Contents/MacOS/smb ????Expected in: flat namespace 2009-01-14 07:42:37.038 Python[26558:53ef] Cannot find function pointer CIFSURLMounterFactory for factory 92D4EFEF-F5AA-11D5-A1EE-003065A0E6DE in CFBundle/CFPlugIn 0x1955d530 (bundle, not loaded) Using Python 2.6.1 although I get the error when reverting to 2.5.4 as well. This is only on my MacPro at work. My MacBook Pro at home does not produce the error. Thanks, Dan From python-mac at cemery.org.uk Thu Jan 15 11:27:56 2009 From: python-mac at cemery.org.uk (Ranec) Date: Thu, 15 Jan 2009 10:27:56 +0000 Subject: [Pythonmac-SIG] socket code works on Win32 but not Mac :-( Message-ID: <496F0FAC.30804@cemery.org.uk> Dear All, I'm writing a Python FOSS application and am *very* keen to keep it platform agnostic. I don't own a Mac, but have access to some sympathetic Mac owners. :-) The following code works just fine under Windows XP and Vista but not on MacOS X (currently no idea what version, though Python is 2.5.?). Any thoughts? def get_my_ip_address(): ret=None try: s=socket.socket(socket.AF_INET, socket.SOCK_DGRAM) s.connect(('google.com', 0)) sn=s.getsockname() if sn: ret=sn[0] except socket.error, e: hn=socket.gethostname() ret=socket.gethostbyname(hn) return ret produces the stack: Traceback (most recent call last): File "./sarnie_client.py", line 181, in get_my_ip_address s.connect(('google.com', 0)) File "", line 1, in connect socket.error: (49, "Can't assign requested address") My application has been given firewall rights accept connections from the Internet. Is there perhaps anything else that I should configure? TIA -R From theodoreiii at hotmail.com Tue Jan 13 19:24:22 2009 From: theodoreiii at hotmail.com (Eddie L) Date: Tue, 13 Jan 2009 10:24:22 -0800 (PST) Subject: [Pythonmac-SIG] Py2App and PyQT In-Reply-To: <496CCE51.1060400@noaa.gov> References: <21424813.post@talk.nabble.com> <496CCE51.1060400@noaa.gov> Message-ID: <21441495.post@talk.nabble.com> Christopher Barker wrote: > > Some quick poking did not make it clear to me where py2app builds the > __boot.__py > file though. > If you create an app with py2app then right click on it and click show package contents then you can browse the app's contents. __boot__.py is located in Content/resources/__boot__.py. Christopher Barker wrote: > > Anyway, you can always hack around this by adding some code to your > setup.py that changes __boot__.py after building the app. > Yeah, I tried adding my custom __boot__.py to the data files since they were being stored in the same location but py2app still used it's own creation. Any ideas as to how I could change the file after it's been made? I'm new to py2app so just a point in the right direction would be very helpful. -Eddie -- View this message in context: http://www.nabble.com/Py2App-and-PyQT-tp20175194p21441495.html Sent from the Python - pythonmac-sig mailing list archive at Nabble.com. From vivacarlie at gmail.com Thu Jan 15 18:14:49 2009 From: vivacarlie at gmail.com (Nehemiah Dacres) Date: Thu, 15 Jan 2009 11:14:49 -0600 Subject: [Pythonmac-SIG] socket code works on Win32 but not Mac :-( In-Reply-To: <496F0FAC.30804@cemery.org.uk> References: <496F0FAC.30804@cemery.org.uk> Message-ID: <65fadfc30901150914n4d929dfcv98199221dd17aa75@mail.gmail.com> temporary answer http://www.artima.com/forums/flat.jsp?forum=181&thread=113874 On Thu, Jan 15, 2009 at 4:27 AM, Ranec wrote: > Dear All, > > I'm writing a Python FOSS application and am *very* keen to keep it > platform agnostic. > > I don't own a Mac, but have access to some sympathetic Mac owners. :-) > > The following code works just fine under Windows XP and Vista but not on > MacOS X (currently no idea what version, though Python is 2.5.?). Any > thoughts? > > def get_my_ip_address(): > ret=None > try: > s=socket.socket(socket.AF_INET, socket.SOCK_DGRAM) > s.connect(('google.com', 0)) > sn=s.getsockname() > if sn: > ret=sn[0] > except socket.error, e: > hn=socket.gethostname() > ret=socket.gethostbyname(hn) > return ret > > produces the stack: > > Traceback (most recent call last): > File "./sarnie_client.py", line 181, in get_my_ip_address > s.connect(('google.com', 0)) > File "", line 1, in connect > socket.error: (49, "Can't assign requested address") > > My application has been given firewall rights accept connections from > the Internet. Is there perhaps anything else that I should configure? > > TIA > > -R > _______________________________________________ > Pythonmac-SIG maillist - Pythonmac-SIG at python.org > http://mail.python.org/mailman/listinfo/pythonmac-sig > -- "lalalalala! it's not broken because I can use it" http://linux.slashdot.org/comments.pl?sid=194281&threshold=1&commentsort=0&mode=thread&cid=15927703 -------------- next part -------------- An HTML attachment was scrubbed... URL: From Chris.Barker at noaa.gov Thu Jan 15 18:20:03 2009 From: Chris.Barker at noaa.gov (Christopher Barker) Date: Thu, 15 Jan 2009 09:20:03 -0800 Subject: [Pythonmac-SIG] Py2App and PyQT In-Reply-To: <21441495.post@talk.nabble.com> References: <21424813.post@talk.nabble.com> <496CCE51.1060400@noaa.gov> <21441495.post@talk.nabble.com> Message-ID: <496F7043.6040408@noaa.gov> Eddie L wrote: > > Christopher Barker wrote: >> Some quick poking did not make it clear to me where py2app builds the >> __boot.__py >> file though. >> > > If you create an app with py2app then right click on it and click show > package contents then you can browse the app's contents. __boot__.py is > located in Content/resources/__boot__.py. yes, I meant I have no idea where in the Py2app code, py2app actually generates the __boot__.py file, so I can't see where to add a patch... > Yeah, I tried adding my custom __boot__.py to the data files since they were > being stored in the same location but py2app still used it's own creation. > Any ideas as to how I could change the file after it's been made? I'm new to > py2app so just a point in the right direction would be very helpful. as you've seen, an app bundle is simply a directory with a special name and structure -- Finder shows it in a special way, but you can manipulate the files in it from the command line or a python script just like you'd manipulate any files. so, in your setup.py, after running setup(), you can add code that either adds stuff to __boot__.py, or replaces it with another one -- whatever is easiest. -Chris -- Christopher Barker, Ph.D. Oceanographer Emergency Response Division NOAA/NOS/OR&R (206) 526-6959 voice 7600 Sand Point Way NE (206) 526-6329 fax Seattle, WA 98115 (206) 526-6317 main reception Chris.Barker at noaa.gov From janssen at parc.com Thu Jan 15 18:39:19 2009 From: janssen at parc.com (Bill Janssen) Date: Thu, 15 Jan 2009 09:39:19 PST Subject: [Pythonmac-SIG] socket code works on Win32 but not Mac :-( In-Reply-To: <496F0FAC.30804@cemery.org.uk> References: <496F0FAC.30804@cemery.org.uk> Message-ID: <65267.1232041159@parc.com> Ranec wrote: > s.connect(('google.com', 0)) What does this even mean? "google.com" is a domain, not a server (though it does forward to "www.google.com"). And port 0? Does anything listen on port 0? Sounds like OS X is the only platform that gets this right :-). Try this: s.connect(('www.google.com', 80)) for instance, to connect to the Web server. Bill From janssen at parc.com Thu Jan 15 18:50:07 2009 From: janssen at parc.com (Bill Janssen) Date: Thu, 15 Jan 2009 09:50:07 PST Subject: [Pythonmac-SIG] socket code works on Win32 but not Mac :-( In-Reply-To: <65267.1232041159@parc.com> References: <496F0FAC.30804@cemery.org.uk> <65267.1232041159@parc.com> Message-ID: <65784.1232041807@parc.com> Sorry, my mistake. I didn't see you were using UDP... Bill Janssen wrote: > does anything listen on port 0? Bill From nad at acm.org Thu Jan 15 19:02:37 2009 From: nad at acm.org (Ned Deily) Date: Thu, 15 Jan 2009 10:02:37 -0800 Subject: [Pythonmac-SIG] socket code works on Win32 but not Mac :-( References: <496F0FAC.30804@cemery.org.uk> Message-ID: In article <496F0FAC.30804 at cemery.org.uk>, Ranec wrote: > The following code works just fine under Windows XP and Vista but not on > MacOS X (currently no idea what version, though Python is 2.5.?). Any > thoughts? > > def get_my_ip_address(): > ret=None > try: > s=socket.socket(socket.AF_INET, socket.SOCK_DGRAM) > s.connect(('google.com', 0)) > sn=s.getsockname() > if sn: > ret=sn[0] > except socket.error, e: > hn=socket.gethostname() > ret=socket.gethostbyname(hn) > return ret > > produces the stack: > > Traceback (most recent call last): > File "./sarnie_client.py", line 181, in get_my_ip_address > s.connect(('google.com', 0)) > File "", line 1, in connect > socket.error: (49, "Can't assign requested address") > > My application has been given firewall rights accept connections from > the Internet. Is there perhaps anything else that I should configure? Don't use port 0. >>> import socket >>> s=socket.socket(socket.AF_INET, socket.SOCK_DGRAM) >>> s.connect(('google.com', 0)) Traceback (most recent call last): File "", line 1, in File "", line 1, in connect socket.error: [Errno 49] Can't assign requested address >>> s.connect(('google.com', 1)) >>> sn = s.getsockname() >>> sn ('10.20.30.40', 56621) -- Ned Deily, nad at acm.org From python-mac at cemery.org.uk Fri Jan 16 13:55:21 2009 From: python-mac at cemery.org.uk (Ranec) Date: Fri, 16 Jan 2009 12:55:21 +0000 Subject: [Pythonmac-SIG] socket code works on Win32 but not Mac :-( In-Reply-To: References: <496F0FAC.30804@cemery.org.uk> Message-ID: <497083B9.5060304@cemery.org.uk> Ned Deily wrote: > In article <496F0FAC.30804 at cemery.org.uk>, > Ranec wrote: > > [snip] Thanks for all the help. It's clear the port was the issue. TIA -R From python-mac at cemery.org.uk Fri Jan 16 13:57:45 2009 From: python-mac at cemery.org.uk (Ranec) Date: Fri, 16 Jan 2009 12:57:45 +0000 Subject: [Pythonmac-SIG] py2app under Windows Message-ID: <49708449.9050908@cemery.org.uk> Hi there, dumb question, probably, but: can I build a MacOS App, using py2app, under Windows? If not, is there any way I can build a MacOS Python Application using a Windows PC? If there's no way, how do I find a Mac / Python developer to help me distribute my application for the Mac? TIA -R From chris.van.bael at gmail.com Fri Jan 16 15:21:46 2009 From: chris.van.bael at gmail.com (Chris Van Bael) Date: Fri, 16 Jan 2009 15:21:46 +0100 Subject: [Pythonmac-SIG] py2app under Windows In-Reply-To: <49708449.9050908@cemery.org.uk> References: <49708449.9050908@cemery.org.uk> Message-ID: <5465ee790901160621h4493d852k6383b6c93e158915@mail.gmail.com> On Fri, Jan 16, 2009 at 1:57 PM, Ranec wrote: > Hi there, > > dumb question, probably, but: > > can I build a MacOS App, using py2app, under Windows? No > If not, is there any way I can build a MacOS Python Application using a > Windows PC? Not legally, but there are VMWare images to run OSX in VMWare on Windows or you can make a 'hackintosh'. For both solutions do a google search. > If there's no way, how do I find a Mac / Python developer to help me > distribute my application for the Mac? You could ask here for instance. Is your application open source or a commercial app? Chris From python-mac at cemery.org.uk Fri Jan 16 15:50:30 2009 From: python-mac at cemery.org.uk (Ranec) Date: Fri, 16 Jan 2009 14:50:30 +0000 Subject: [Pythonmac-SIG] py2app under Windows In-Reply-To: <5465ee790901160621h4493d852k6383b6c93e158915@mail.gmail.com> References: <49708449.9050908@cemery.org.uk> <5465ee790901160621h4493d852k6383b6c93e158915@mail.gmail.com> Message-ID: <49709EB6.8060805@cemery.org.uk> Chris Van Bael wrote: > On Fri, Jan 16, 2009 at 1:57 PM, Ranec wrote: > >> Hi there, >> >> dumb question, probably, but: >> >> can I build a MacOS App, using py2app, under Windows? >> > No > > Ah, OK, thanks. >> If not, is there any way I can build a MacOS Python Application using a >> Windows PC? >> > Not legally, but there are VMWare images to run OSX in VMWare on > Windows or you can make a 'hackintosh'. > For both solutions do a google search. > > >> If there's no way, how do I find a Mac / Python developer to help me >> distribute my application for the Mac? >> > You could ask here for instance. > Is your application open source or a commercial app? > > Chris > It's FOSS, hosted on SourceForge, under the MIT license. http://sf.net.projects/sarnie In summary, it's a bit like a PA system for an office receptionist to announce things like "The sandwich van is outside". It's Python, Pyro and wxPython and some as-yet-unreleased wxPython extras called AGW. -R -------------- next part -------------- An HTML attachment was scrubbed... URL: From python-mac at cemery.org.uk Fri Jan 16 15:52:59 2009 From: python-mac at cemery.org.uk (Ranec) Date: Fri, 16 Jan 2009 14:52:59 +0000 Subject: [Pythonmac-SIG] py2app under Windows [fixed typo in URL] In-Reply-To: <49709EB6.8060805@cemery.org.uk> References: <49708449.9050908@cemery.org.uk> <5465ee790901160621h4493d852k6383b6c93e158915@mail.gmail.com> <49709EB6.8060805@cemery.org.uk> Message-ID: <49709F4B.6030002@cemery.org.uk> Ranec wrote: > Chris Van Bael wrote: >> On Fri, Jan 16, 2009 at 1:57 PM, Ranec wrote: >> >>> Hi there, >>> >>> dumb question, probably, but: >>> >>> can I build a MacOS App, using py2app, under Windows? >>> >> No >> >> > Ah, OK, thanks. >>> If not, is there any way I can build a MacOS Python Application using a >>> Windows PC? >>> >> Not legally, but there are VMWare images to run OSX in VMWare on >> Windows or you can make a 'hackintosh'. >> For both solutions do a google search. >> >> >>> If there's no way, how do I find a Mac / Python developer to help me >>> distribute my application for the Mac? >>> >> You could ask here for instance. >> Is your application open source or a commercial app? >> >> Chris >> > > It's FOSS, hosted on SourceForge, under the MIT license. http://sf.net/projects/sarnie/ > In summary, it's a bit like a PA system for an office receptionist to > announce things like "The sandwich van is outside". > It's Python, Pyro and wxPython and some as-yet-unreleased wxPython > extras called AGW. > > -R -------------- next part -------------- An HTML attachment was scrubbed... URL: From ronaldoussoren at mac.com Fri Jan 16 15:59:34 2009 From: ronaldoussoren at mac.com (Ronald Oussoren) Date: Fri, 16 Jan 2009 15:59:34 +0100 Subject: [Pythonmac-SIG] Py2App and PyQT In-Reply-To: <496F7043.6040408@noaa.gov> References: <21424813.post@talk.nabble.com> <496CCE51.1060400@noaa.gov> <21441495.post@talk.nabble.com> <496F7043.6040408@noaa.gov> Message-ID: <49261984797031223716431906318304574415-Webmail@me.com> On Thursday, January 15, 2009, at 06:20PM, "Christopher Barker" wrote: >Eddie L wrote: >> >> Christopher Barker wrote: >>> Some quick poking did not make it clear to me where py2app builds the >>> __boot.__py >>> file though. >>> >> >> If you create an app with py2app then right click on it and click show >> package contents then you can browse the app's contents. __boot__.py is >> located in Content/resources/__boot__.py. > >yes, I meant I have no idea where in the Py2app code, py2app actually >generates the __boot__.py file, so I can't see where to add a patch... The file is generated by code in the module py2app.build_app, from fragments in py2app.bootstrap. Ronald From pdorange at mac.com Sat Jan 17 09:27:07 2009 From: pdorange at mac.com (Pierre-Alain Dorange) Date: Sat, 17 Jan 2009 09:27:07 +0100 Subject: [Pythonmac-SIG] Pygame 1.8.1 broke py2app 0.4.2 Message-ID: <1itokfx.sf5xrbj6072N%pdorange@mac.com> I finally got around the bug i got with py2app. Config : MaxOS X 10.5 / Python 2.5 / Pygame 1.8.1 / py2App 0.4.2 I recently update my Mac from 10.4 to 10.5. I also of course reinstall all required modules. After this the bundle app i made with py2app (for my small pygame games) cause the bundled app to quit at start... I made several experience but nothing works. First i thought that perhaps that's because i used the default python installed with MacOS X, i reinstall a new one as user, not work. I try several versions of py2app, not working. Finally i realized that with my previous config i was using pygame 1.8.0rc5 and now 1.8.1 (2) (because 1.8.1 was released). So i try to downgrade, as i can't find the archive, i download the source code for 1.8.0 (3) build and install... And now it works fine, the bundled app (with py2app 0.4.2) works fine... I just have to manually install libjpeg and libpng (thanks to (1)) So it seems that pygame 1.8.1 broke py2app at some point, or perhaps that the 1.8.1 package for mac if not compiled with the appropriate config... (1) http://ethan.tira-thompson.com/Mac%20OS%20X%20Ports.html (2) 1.8.1 Mac : pygame-1.8.1release-py2.5-macosx10.5.mpkg (3) 1.8.0 i compile : pygame-1.8.0release -- Pierre-Alain Dorange From Chris.Barker at noaa.gov Tue Jan 20 21:09:20 2009 From: Chris.Barker at noaa.gov (Christopher Barker) Date: Tue, 20 Jan 2009 12:09:20 -0800 Subject: [Pythonmac-SIG] Py2App and PyQT In-Reply-To: <49261984797031223716431906318304574415-Webmail@me.com> References: <21424813.post@talk.nabble.com> <496CCE51.1060400@noaa.gov> <21441495.post@talk.nabble.com> <496F7043.6040408@noaa.gov> <49261984797031223716431906318304574415-Webmail@me.com> Message-ID: <49762F70.3040708@noaa.gov> Ronald Oussoren wrote: > > On Thursday, January 15, 2009, at 06:20PM, "Christopher Barker" wrote: >> Eddie L wrote: >>> Christopher Barker wrote: >> yes, I meant I have no idea where in the Py2app code, py2app actually >> generates the __boot__.py file, so I can't see where to add a patch... > > The file is generated by code in the module py2app.build_app, from fragments in py2app.bootstrap. Thanks Ronald. I've No time now, but perhaps it could be patched to load a user-supplied boot file -- py2exe has this option, and it's quite handy. -Chris -- Christopher Barker, Ph.D. Oceanographer Emergency Response Division NOAA/NOS/OR&R (206) 526-6959 voice 7600 Sand Point Way NE (206) 526-6329 fax Seattle, WA 98115 (206) 526-6317 main reception Chris.Barker at noaa.gov From theodoreiii at hotmail.com Tue Jan 20 04:20:32 2009 From: theodoreiii at hotmail.com (Eddie L) Date: Mon, 19 Jan 2009 19:20:32 -0800 (PST) Subject: [Pythonmac-SIG] Py2App and PyQT In-Reply-To: <49261984797031223716431906318304574415-Webmail@me.com> References: <21424813.post@talk.nabble.com> <496CCE51.1060400@noaa.gov> <21441495.post@talk.nabble.com> <496F7043.6040408@noaa.gov> <49261984797031223716431906318304574415-Webmail@me.com> Message-ID: <21556335.post@talk.nabble.com> Ronald Oussoren wrote: > > > The file is generated by code in the module py2app.build_app, from > fragments in py2app.bootstrap. > > Thank you, that solved my problem. I went into the bootstrap folder and added the line into build_app.py, now it's always included in my apps -Eddie -- View this message in context: http://www.nabble.com/Py2App-and-PyQT-tp20175194p21556335.html Sent from the Python - pythonmac-sig mailing list archive at Nabble.com. From appworld at mac.com Wed Jan 21 12:35:38 2009 From: appworld at mac.com (Paul Brown) Date: Wed, 21 Jan 2009 11:35:38 +0000 Subject: [Pythonmac-SIG] PDF reading Message-ID: <80BA9BF8-D487-441E-9C92-97FCA0E74812@mac.com> anyone have any pointers on reading a pdf file. i need to extract the text content , page number , text style , block , ... all in XML if poss Paul From anjiro at cc.gatech.edu Wed Jan 21 16:44:21 2009 From: anjiro at cc.gatech.edu (Daniel Ashbrook) Date: Wed, 21 Jan 2009 10:44:21 -0500 Subject: [Pythonmac-SIG] debugging in xcode with gdb? Message-ID: <497742D5.8060604@cc.gatech.edu> I'm developing a fairly large project and have run into a crash situation. There's no exception thrown by python; it just drops into GDB. I'm developing under xcode; is there any way to use gdb to give me a hint as to where the problem is occurring? dan From listsin at integrateddevcorp.com Fri Jan 23 04:46:00 2009 From: listsin at integrateddevcorp.com (s s) Date: Thu, 22 Jan 2009 22:46:00 -0500 Subject: [Pythonmac-SIG] Building pyobjc In-Reply-To: <49261984797031223716431906318304574415-Webmail@me.com> References: <21424813.post@talk.nabble.com> <496CCE51.1060400@noaa.gov> <21441495.post@talk.nabble.com> <496F7043.6040408@noaa.gov> <49261984797031223716431906318304574415-Webmail@me.com> Message-ID: <162225B4-2560-4BDD-90FA-8F92855D106C@integrateddevcorp.com> Is there a way to rebuild pyobjc on Leopard using the XCode 3.1/gcc 4.01 tools? I have tried pulling the trunk and tagged r200-leopard builds of pyobjc from http://svn.red-bean.com/pyobjc and neither will build using the 02-develop-all.sh build file. There are lots of C compiler errors starting with: libffi-src/powerpc/ppc-ffi_darwin.c:41:67: error: libkern/ OSCacheControl.h: No such file or directory libffi-src/powerpc/ppc-ffi_darwin.c:86: warning: no previous prototype for ?ffi_prep_args? libffi-src/powerpc/ppc-ffi_darwin.c: In function ?ffi_prep_closure?: libffi-src/powerpc/ppc-ffi_darwin.c:751: warning: implicit declaration of function ?sys_icache_invalidate? libffi-src/powerpc/ppc-ffi_darwin.c:751: warning: nested extern declaration of ?sys_icache_invalidate? libffi-src/powerpc/ppc-ffi_darwin.c: At top level: libffi-src/powerpc/ppc-ffi_darwin.c:810: warning: no previous prototype for ?ffi_closure_helper_DARWIN? libffi-src/powerpc/ppc-ffi_darwin.c: In function ?ffi_closure_helper_DARWIN?: libffi-src/powerpc/ppc-ffi_darwin.c:845: warning: comparison between signed and unsigned libffi-src/powerpc/ppc-ffi_darwin.c:901: warning: pointer of type ?void *? used in arithmetic libffi-src/powerpc/ppc-ffi_darwin.c:901: warning: pointer of type ?void *? used in arithmetic lipo: can't figure out the architecture type of: /var/tmp//ccF5WZri.out error: command 'gcc' failed with exit status 1 Then there's: ./02-develop-all.sh: line 15: cd: pyobjc-metadata: No such file or directory /Library/Frameworks/Python.framework/Versions/2.5/Resources/Python.app/ Contents/MacOS/Python: can't open file 'setup.py': [Errno 2] No such file or directory /Library/Frameworks/Python.framework/Versions/2.5/Resources/Python.app/ Contents/MacOS/Python: can't open file 'setup.py': [Errno 2] No such file or directory error: Could not find suitable distribution for Requirement.parse('pyobjc-core>=2.0') Modules/_Foundation_nscoder.m: In function ?imp_NSCoder_encodeArrayOfObjCType_count_at_?: Modules/_Foundation_nscoder.m:220: error: ?NSUInteger? undeclared (first use in this function) Modules/_Foundation_nscoder.m:220: error: (Each undeclared identifier is reported only once Modules/_Foundation_nscoder.m:220: error: for each function it appears in.) Modules/_Foundation_nscoder.m:220: error: syntax error before ?count? Way too many errors and what gets 'installed' doesn't link against an app at all. Seems also to have trashed the one that was there, not sure there's a way to repair it short of a reinstall (DevTools or OS X install?). Is there a checkout I'm missing or a trick to building pyobjc on Leopard from source? Thanks, S From rajanikanth at gmail.com Fri Jan 23 08:18:15 2009 From: rajanikanth at gmail.com (Rajanikanth Jammalamadaka) Date: Thu, 22 Jan 2009 23:18:15 -0800 Subject: [Pythonmac-SIG] appscript install error using easy_install Message-ID: <84bdef3c0901222318n5219334cq6d16dffdb7f63609@mail.gmail.com> Hi! Does anybody know why I get this error? sudo easy_install appscript Searching for appscript Reading http://pypi.python.org/simple/appscript/ Reading http://freespace.virgin.net/hamish.sanderson/appscript.html Reading http://appscript.sourceforge.net Best match: appscript 0.19.0 Downloading http://pypi.python.org/packages/source/a/appscript/appscript-0.19.0.tar.gz#md5=d234c1f1b92290da9eb866f78f9a7343 Processing appscript-0.19.0.tar.gz Running appscript-0.19.0/setup.py -q bdist_egg --dist-dir /tmp/easy_install-2iBEHM/appscript-0.19.0/egg-dist-tmp-Xi3zVD zip_safe flag not set; analyzing archive contents... No eggs found in /tmp/easy_install-2iBEHM/appscript-0.19.0/egg-dist-tmp-Xi3zVD (setup script problem?) Thanks, Raj From vip at avatar.com.au Fri Jan 23 08:26:17 2009 From: vip at avatar.com.au (DavidW) Date: Fri, 23 Jan 2009 18:26:17 +1100 Subject: [Pythonmac-SIG] .ppc on intel still possible? Message-ID: Hi all, Would someone please confirm or deny that as from OS 10.5.6 it is no longer possible to instantiate .ppc binaries? I'm pretty sure is was still possible under 10.5.x (for x<6) thanks! D. ________________________________________________ David Worrall. - Capital Markets Cooperative Research Centre: www.cmcrc.com - Sonic Communications Research Group: creative.canberra.edu.au/scrg - Experimental Polymedia: www.avatar.com.au - Education for Financial Independence: www.mindthemarkets.com.au From IloChab at yahoo.it Thu Jan 22 19:45:00 2009 From: IloChab at yahoo.it (ilochab) Date: Thu, 22 Jan 2009 10:45:00 -0800 (PST) Subject: [Pythonmac-SIG] [pythonmac-sig] Py2app and Driver not loaded error from PyQt4+sqlite Message-ID: <21610538.post@talk.nabble.com> I'm trying to convert python code into a mac application with py2app. My python code uses PyQt4 to access a sqlite db. At run time (on a different mac from the one where I build the .app where there is no PyQt4+Qt4 installed) I get the error: Driver not loaded Unable to establish a database connection This example needs SQLite support ... On Windows, using py2exe, I had the same problem and I solved it coping: ...\Qt\version\plugins\sqldrivers\*.* to: ...\myApp\sqldrivers\* On Mac I tried coping libqsqlite.dylib into: .../myApp/Contents/Frameworks/QtSql.framework/ and into: .../myApp/Contents/Frameworks/ but nothing changed. I tried with either these options: options = {'py2app': { "packages": ["encodings"], "includes":["sip", 'PyQt4.QtSvg'], 'excludes': ["Tkconstants","Tkinter","tcl"] } }, or options = {'py2app': { "packages": ["encodings"], "includes":["sip", 'PyQt4.QtSvg', 'PyQt4.QtSql'], 'excludes': ["Tkconstants","Tkinter","tcl"] } }, or options = {'py2app': { "packages": ["encodings"], "includes":["sip", "PyQt4", 'PyQt4.QtSvg', 'PyQt4.QtSql'], 'excludes': ["Tkconstants","Tkinter","tcl"] } }, but nothing changed. I tried also: options = {'py2app': { "packages": ["encodings"], "includes":["sip", "PyQt4._qt",'PyQt4.QtSvg'], 'excludes': ["Tkconstants","Tkinter","tcl"] } }, but in this case I get this error: File "/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/py2app-0.3.6-py2.5.egg/py2app/build_app.py", line 548, in _run self.run_normal() File "/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/py2app-0.3.6-py2.5.egg/py2app/build_app.py", line 600, in run_normal mf = self.get_modulefinder() File "/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/py2app-0.3.6-py2.5.egg/py2app/build_app.py", line 508, in get_modulefinder debug=debug, File "build/bdist.macosx-10.3-i386/egg/modulegraph/find_modules.py", line 243, in find_modules find_needed_modules(mf, scripts, includes, packages) File "build/bdist.macosx-10.3-i386/egg/modulegraph/find_modules.py", line 171, in find_needed_modules mf.import_hook(mod) File "build/bdist.macosx-10.3-i386/egg/modulegraph/modulegraph.py", line 246, in import_hook m = self.load_tail(q, tail) File "build/bdist.macosx-10.3-i386/egg/modulegraph/modulegraph.py", line 309, in load_tail raise ImportError, "No module named " + mname ImportError: No module named PyQt4._qt > /Users/licia/dieta/build/bdist.macosx-10.3-i386/egg/modulegraph/modulegraph.py(309)load_tail() I'm working with: Python 2.5 under /Library/Frameworks Qt-4.3.4 under /usr/local/Trolltech/Qt-4.3.4 PyQt-4.3.3 Please, I need your help! Thank in advance. Ciao Licia -- View this message in context: http://www.nabble.com/-pythonmac-sig--Py2app-and-Driver-not-loaded-error-from-PyQt4%2Bsqlite-tp21610538p21610538.html Sent from the Python - pythonmac-sig mailing list archive at Nabble.com. From hraban at fiee.net Sat Jan 24 12:45:37 2009 From: hraban at fiee.net (Henning Hraban Ramm) Date: Sat, 24 Jan 2009 12:45:37 +0100 Subject: [Pythonmac-SIG] PDF reading In-Reply-To: <80BA9BF8-D487-441E-9C92-97FCA0E74812@mac.com> References: <80BA9BF8-D487-441E-9C92-97FCA0E74812@mac.com> Message-ID: <1A38A8BA-0595-4A52-99C1-FBC1D0D1A327@fiee.net> Am 2009-01-21 um 12:35 schrieb Paul Brown: > anyone have any pointers on reading a pdf file. > > i need to extract the text content , page number , text style , > block , ... all in XML if poss since nobody else answered: I found this one in my link collection: http://pybrary.net/pyPdf/ Never tried it, though. Greetlings from Lake Constance! Hraban --- http://www.fiee.net https://www.cacert.org (I'm an assurer) From jaharmi at jaharmi.com Sun Jan 25 03:43:58 2009 From: jaharmi at jaharmi.com (Jeremy Reichman) Date: Sat, 24 Jan 2009 21:43:58 -0500 Subject: [Pythonmac-SIG] PDF reading In-Reply-To: <80BA9BF8-D487-441E-9C92-97FCA0E74812@mac.com> References: <80BA9BF8-D487-441E-9C92-97FCA0E74812@mac.com> Message-ID: <1232851438.1124.1296582669@webmail.messagingengine.com> On Wed, 21 Jan 2009 11:35:38 +0000, "Paul Brown" said: > anyone have any pointers on reading a pdf file. > > i need to extract the text content , page number , text style , > block , ... all in XML if poss I'm not sure if you need to get a specific page number or the count of pages for the document. If you need the total page count (for whatever reason) from a PDF document, you can use the Quartz 2D bindings as so: I don't know if Quartz 2D will give you the rest of what you want, but perhaps PyObjC will. (I've got less experience with PyObjC than the Quartz 2D bindings, and not much experience with the Quartz 2D bindings. ) Of course, either of these ways would not be pure Python and would require at least Mac OS X 10.3 (Quartz 2D) or 10.5 (for bundled PyObjC). -- Jeremy jaharmi at jaharmi.com From pdorange at mac.com Sun Jan 25 16:59:02 2009 From: pdorange at mac.com (Pierre-Alain Dorange) Date: Sun, 25 Jan 2009 16:59:02 +0100 Subject: [Pythonmac-SIG] Multiple version of the same module Message-ID: <1iu3wrx.134legbn0zteuN%pdorange@mac.com> How to manage a module with several versions on MacOS X ? My modules are installed in : "/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-pa ckages/" But for some modules i need several version (stable 1.8.1 and test 1.9.0 for example : for pygame here). I've installed the stableone from source and i go into a "pygame-1.8.0release-py2.5-macosx-10.3-i386.egg" directory. I just install the 1.9 (for test) and it go into "pygame" directory So now i got 2 versions of pygame in the site-packages dir... When i import "pygame" from python, the 1.8.0 is imported only and 1.9.0 is complely ignored... How do python choose from several package ? Do package register them elsewhere ? I don't know how to test (temporaly) the 1.9, but alsobe able to go back easily to 18.8 after ? Any clue ? -- Pierre-Alain Dorange From janssen at parc.com Sun Jan 25 21:02:10 2009 From: janssen at parc.com (Bill Janssen) Date: Sun, 25 Jan 2009 12:02:10 PST Subject: [Pythonmac-SIG] PDF reading In-Reply-To: <80BA9BF8-D487-441E-9C92-97FCA0E74812@mac.com> References: <80BA9BF8-D487-441E-9C92-97FCA0E74812@mac.com> Message-ID: <5583.1232913730@pippin.parc.xerox.com> Paul Brown wrote: > anyone have any pointers on reading a pdf file. > > i need to extract the text content , page number , text style , block > , ... all in XML if poss > > Paul Hi, Paul. I use a patched version of xpdf to get this stuff, which works pretty well. Extracts the text and wordbox info (page, word rectangle, font, bold/italic, etc.) for each word in the PDF. You can download the patch to xpdf from http://downloads.sourceforge.net/doceng-toolkit/doceng-package-sources.zip. You'll have to unpack the zip file and look for it in there, then apply it to the xpdf sources and build xpdf. I've sent the patch to the xpdf maintainer, but haven't heard more about it from him. See the (patched) xpdf man page for details of the output format (ASCII text, one word record per line). This is also included in the UpLib release at http://uplib.parc.com/; you'll have to register an account on the blog in order to get the download link for that. If you download and install one of the binary builds of UpLib, the patched xpdf is included. Bill From vip at avatar.com.au Mon Jan 26 04:11:36 2009 From: vip at avatar.com.au (DavidW) Date: Mon, 26 Jan 2009 14:11:36 +1100 Subject: [Pythonmac-SIG] PDF reading In-Reply-To: <5583.1232913730@pippin.parc.xerox.com> References: <80BA9BF8-D487-441E-9C92-97FCA0E74812@mac.com> <5583.1232913730@pippin.parc.xerox.com> Message-ID: It's a while since I did any text to PDF extraction. Last time I did, I used some tools that are part of http://www.hforge.org/itools Which, I seem to remember, also does elementary decryption. David. On 26/01/2009, at 7:02 AM, Bill Janssen wrote: > Paul Brown wrote: > >> anyone have any pointers on reading a pdf file. >> >> i need to extract the text content , page number , text style , >> block >> , ... all in XML if poss >> >> Paul > > Hi, Paul. > > I use a patched version of xpdf to get this stuff, which works pretty > well. Extracts the text and wordbox info (page, word rectangle, font, > bold/italic, etc.) for each word in the PDF. You can download the > patch to xpdf from > http://downloads.sourceforge.net/doceng-toolkit/doceng-package-sources.zip > . > You'll have to unpack the zip file and look for it in there, then > apply > it to the xpdf sources and build xpdf. I've sent the patch to the > xpdf > maintainer, but haven't heard more about it from him. See the > (patched) > xpdf man page for details of the output format (ASCII text, one word > record per line). > > This is also included in the UpLib release at http://uplib.parc.com/; > you'll have to register an account on the blog in order to get the > download link for that. If you download and install one of the binary > builds of UpLib, the patched xpdf is included. > > Bill > _______________________________________________ > Pythonmac-SIG maillist - Pythonmac-SIG at python.org > http://mail.python.org/mailman/listinfo/pythonmac-sig > ________________________________________________ David Worrall. - Sonic Communications Research Group: creative.canberra.edu.au/scrg - Experimental Polymedia: www.avatar.com.au - Education for Financial Independence: www.mindthemarkets.com.au From Chris.Barker at noaa.gov Mon Jan 26 20:01:03 2009 From: Chris.Barker at noaa.gov (Christopher Barker) Date: Mon, 26 Jan 2009 11:01:03 -0800 Subject: [Pythonmac-SIG] Multiple version of the same module In-Reply-To: <1iu3wrx.134legbn0zteuN%pdorange@mac.com> References: <1iu3wrx.134legbn0zteuN%pdorange@mac.com> Message-ID: <497E086F.7030408@noaa.gov> Pierre-Alain Dorange wrote: > How to manage a module with several versions on MacOS X ? Unfortunately, the Python core developers have never seen the need to do this -- I still don't know why. A number of packages have developed their own systems (wx.version, for wxPython, for instance) -- you might see if pygame has one. > I've installed the stableone from source and i go into a > "pygame-1.8.0release-py2.5-macosx-10.3-i386.egg" directory. setuptools supposedly can do this for you too, if things are installed as eggs -- I think pkg_resources.require() is what you need -- take a look at the setuptools docs. > I just install the 1.9 (for test) and it go into "pygame" directory Ahh -so it's not an egg? If you want setuptools to help you out, you'll have to install the dev version as an egg, too. > When i import "pygame" from python, the 1.8.0 is imported only and 1.9.0 > is complely ignored... How do python choose from several package ? Do > package register them elsewhere ? no --- python looks in sys.path, and uses the first one it finds. So, the way folks have done this in the past, pre-setuptools is manipulate sys,path in various ways -- a script that moves *.pth files around, or python code that directly manipulates sys.path (that's what wx.version does) easy_install creates a easy-install.pth file that adds the paths to eggs that it has installed -- it puts everything before site-packages, which is probably why your python is finding the 1.8 egg. I know I haven't really given you the answer, but hopefully some hints to so you can figure out your options. -Chris -- Christopher Barker, Ph.D. Oceanographer Emergency Response Division NOAA/NOS/OR&R (206) 526-6959 voice 7600 Sand Point Way NE (206) 526-6329 fax Seattle, WA 98115 (206) 526-6317 main reception Chris.Barker at noaa.gov From olivier.hervieu at wallix.com Tue Jan 27 18:02:00 2009 From: olivier.hervieu at wallix.com (Olivier Hervieu) Date: Tue, 27 Jan 2009 18:02:00 +0100 Subject: [Pythonmac-SIG] Error with modulegraph when using python script without knowed python extensions Message-ID: <497F3E08.5010008@wallix.com> Hi all. I've got a python module who looks like this : MY_PYTHON_MODULE: |_ setup.py |_ PYTHON_SOURCE/ |_lots_of.py |_ PYTHON_SCRIPTS/ |_MyScript with setuptools a "python setup.py install" install the PYTHON_SOURCE in site-package of my python installation, and PYTHON_SCRIPTS are installed in the "install_prefix/bin". So MyScript is already in the path, and is saw, by the user, as a "binary". There's a lots of python programs installed like this (like "spe", the python editor) on Linux. I want now to have a Mac Port of my program. So i try py2app! My application is, indeed, "MyScript" But, when i run "python setup.py py2app", i have the following error from the find_modules.py of modulegraph tool: line 86, in parse_mf_results >> raise TypeError("Don't know how to handle '%s'" % repr(src)) After a look in find_modules.py, i see that a PY_SUFFIXES list is used to determine which is python code and wich is not... And unfortunately, with a python script with no extension, it raise the previous error. I think that, for files without extension, a detection based on mimetypes will be helpfull... so, in find_modules.py, by adding type, encoding =mimetypes.guess_type(__MY_FILE__) if encoding == 'text/x-python': py_files.append(item) will fix this problem. What did you think about that? I have contacted the developer of modulegraph before.. but it seems that the support of this module is provide by people on this mailing list. Regards, Olivier. From arawak1 at yahoo.com Tue Jan 27 06:33:05 2009 From: arawak1 at yahoo.com (raf .) Date: Mon, 26 Jan 2009 21:33:05 -0800 (PST) Subject: [Pythonmac-SIG] MacPython and Gnuplot Message-ID: <463862.68297.qm@web54503.mail.re2.yahoo.com> I have MacPython 2.5 on my iMac.? I also have Gnuplot.app Version 4,2. How do I get them to work together? Can someone show a simple example or instructions.? They both came with my iMac. ron francis -------------- next part -------------- An HTML attachment was scrubbed... URL: From rajanikanth at gmail.com Thu Jan 29 03:01:28 2009 From: rajanikanth at gmail.com (Rajanikanth Jammalamadaka) Date: Wed, 28 Jan 2009 18:01:28 -0800 Subject: [Pythonmac-SIG] appscript install error Message-ID: <84bdef3c0901281801n711713fagc12ecd27426bd48c@mail.gmail.com> hi! I get this error when trying to install appscript from source on Mac OS X(using python 2.6.1): ld: in /Developer/SDKs/MacOSX10.4u.sdk/usr/local/lib/libPng.dylib, file is not of required architecture for architecture ppc collect2: ld returned 1 exit status lipo: can't open input file: /var/folders/1F/1FIgkp3qEImZWgJI447-qU+TFxI/-Tmp-//ccmr16bT.out (No such file or directory) error: command 'gcc' failed with exit status 1 Could somebody tell me how to fix it? Thanks, Raj -- Rajanikanth From matt.p.foster at gmail.com Thu Jan 29 14:29:20 2009 From: matt.p.foster at gmail.com (Matt Foster) Date: Thu, 29 Jan 2009 13:29:20 +0000 Subject: [Pythonmac-SIG] MacPython and Gnuplot In-Reply-To: <463862.68297.qm@web54503.mail.re2.yahoo.com> References: <463862.68297.qm@web54503.mail.re2.yahoo.com> Message-ID: <1dcb3f200901290529y76674160ya3f21bb180b43c04@mail.gmail.com> On Tue, Jan 27, 2009 at 5:33 AM, raf . wrote: > I have MacPython 2.5 on my iMac. I also have Gnuplot.app Version 4,2. > How do I get them to work together? > > Can someone show a simple example or instructions. They both came with my > iMac. > > ron francis You'll probably need to get something like gnuplot.py: http://gnuplot-py.sourceforge.net/ There's a demo file inside of the package that will show you how to get started. You might need to use something like, too: import Gnuplot Gnuplot.GnuplotOpts.gnuplot_command = '/Applications/Gnuplot.app/Contents/Resources/bin/gnuplot' If you're interested in using gnuplot on it's own, I maintain an open source bundle for TextMate which you might find useful: http://github.com/mattfoster/gnuplot-tmbundle/tree/master I hope this helps, Matt -- Matt Foster | http://hackerific.net From dwf at cs.toronto.edu Thu Jan 29 21:01:12 2009 From: dwf at cs.toronto.edu (David Warde-Farley) Date: Thu, 29 Jan 2009 15:01:12 -0500 Subject: [Pythonmac-SIG] MacPython and Gnuplot In-Reply-To: <1dcb3f200901290529y76674160ya3f21bb180b43c04@mail.gmail.com> References: <463862.68297.qm@web54503.mail.re2.yahoo.com> <1dcb3f200901290529y76674160ya3f21bb180b43c04@mail.gmail.com> Message-ID: On 29-Jan-09, at 8:29 AM, Matt Foster wrote: > On Tue, Jan 27, 2009 at 5:33 AM, raf . wrote: >> I have MacPython 2.5 on my iMac. I also have Gnuplot.app Version >> 4,2. >> How do I get them to work together? >> >> Can someone show a simple example or instructions. They both came >> with my >> iMac. >> >> ron francis > > You'll probably need to get something like gnuplot.py: > http://gnuplot-py.sourceforge.net/ > There's a demo file inside of the package that will show you how to > get started. > > You might need to use something like, too: > > import Gnuplot > Gnuplot.GnuplotOpts.gnuplot_command = > '/Applications/Gnuplot.app/Contents/Resources/bin/gnuplot' I might also point out that matplotlib is available for OS X, with a convenient universal installer, and IMHO produces much nicer plots than Gnuplot (and has amazing documentation). If you haven't tried it out and are not particularly married to Gnuplot, I strongly recommend it: http://matplotlib.sourceforge.net/ David From rowen at u.washington.edu Thu Jan 29 21:27:02 2009 From: rowen at u.washington.edu (Russell E. Owen) Date: Thu, 29 Jan 2009 12:27:02 -0800 Subject: [Pythonmac-SIG] appscript install error References: <84bdef3c0901281801n711713fagc12ecd27426bd48c@mail.gmail.com> Message-ID: In article <84bdef3c0901281801n711713fagc12ecd27426bd48c at mail.gmail.com>, Rajanikanth Jammalamadaka wrote: > hi! > > I get this error when trying to install appscript from source on Mac > OS X(using python 2.6.1): > > ld: in /Developer/SDKs/MacOSX10.4u.sdk/usr/local/lib/libPng.dylib, > file is not of required architecture for architecture ppc > collect2: ld returned 1 exit status > lipo: can't open input file: > /var/folders/1F/1FIgkp3qEImZWgJI447-qU+TFxI/-Tmp-//ccmr16bT.out (No > such file or directory) > error: command 'gcc' failed with exit status 1 > > > Could somebody tell me how to fix it? You might make sure your easy_install and macholib are up to date: each_install-U macholib==dev If that fails and tells you to do a selfupdate then do that and try again. -- Russell From rowen at u.washington.edu Thu Jan 29 21:28:48 2009 From: rowen at u.washington.edu (Russell E. Owen) Date: Thu, 29 Jan 2009 12:28:48 -0800 Subject: [Pythonmac-SIG] MacPython and Gnuplot References: <463862.68297.qm@web54503.mail.re2.yahoo.com> <1dcb3f200901290529y76674160ya3f21bb180b43c04@mail.gmail.com> Message-ID: In article <1dcb3f200901290529y76674160ya3f21bb180b43c04 at mail.gmail.com>, Matt Foster wrote: > On Tue, Jan 27, 2009 at 5:33 AM, raf . wrote: > > I have MacPython 2.5 on my iMac. I also have Gnuplot.app Version 4,2. > > How do I get them to work together? > > > > Can someone show a simple example or instructions. They both came with my > > iMac. > > > > ron francis > > You'll probably need to get something like gnuplot.py: > http://gnuplot-py.sourceforge.net/ > There's a demo file inside of the package that will show you how to get > started. > > You might need to use something like, too: > > import Gnuplot > Gnuplot.GnuplotOpts.gnuplot_command = > '/Applications/Gnuplot.app/Contents/Resources/bin/gnuplot' > > If you're interested in using gnuplot on it's own, I maintain an open > source bundle for TextMate which you might find useful: > http://github.com/mattfoster/gnuplot-tmbundle/tree/master > > I hope this helps, > > Matt I believe the matplotlib installer is intended for use with python.org's python -- not a bad thing, but it means you'll also want to install a new Python before you install matplotlib. -- Russell From jskibbie at schawk.com Fri Jan 30 21:24:41 2009 From: jskibbie at schawk.com (Jim Skibbie) Date: Fri, 30 Jan 2009 14:24:41 -0600 Subject: [Pythonmac-SIG] Python CoreGraphics script running in Applescript Message-ID: I have a script that needs to get the height and width dimensions of the media box of a PDF using Applescript. In OS X 10.4, I was using the following: > set shellScript to "python " & quoted form of PythonPath & " " & POSIXThisFile > set dims to every paragraph of (do shell script shellScript) The PythonPath is a path to the below Python script and the POSIXThisFile is the path to the PDF. The response is two paragraphs where paragraph 1 is the width and paragraph 2 is the height. Here?s the python script: # step 1: import the required modules import os, sys from CoreGraphics import * if len( sys.argv ) != 2: print "ERROR: useage: python example2.py pdf_filename" sys.exit(1) # step 2: read the pdf file name from the command line arguments pdf_filename = sys.argv[1] pdf_name, ext = os.path.splitext( pdf_filename ) # step 3: create the input PDF document provider = CGDataProviderCreateWithFilename( pdf_filename ) pdf = CGPDFDocumentCreateWithProvider( provider ) if pdf is None: print "ERROR reading PDF document - \r\n check that the supplied filename points to a PDF file" sys.exit(1) page_number = 1 page_rect = pdf.getMediaBox( page_number ) page_width = int(page_rect.getWidth()) page_height = int(page_rect.getHeight()) print "%d \r\n%d" % (page_width, page_height) Under OS 10.5, this script now uses a deprecated function of CoreGraphics and I get an error that says: > : The function `CGPDFDocumentGetMediaBox' is obsolete and will be > removed in an upcoming update. Unfortunately, this application, or a library > it uses, is using this obsolete function, and is thereby contributing to an > overall degradation of system performance. Please use `CGPDFPageGetBoxRect' > instead. Can anyone steer me in the right direction on how to work with the CGPDFPageGetBoxRect function? Thanks. Jim -------------- next part -------------- An HTML attachment was scrubbed... URL: From noon at snow.nrcc.cornell.edu Fri Jan 30 21:56:45 2009 From: noon at snow.nrcc.cornell.edu (Bill Noon) Date: Fri, 30 Jan 2009 15:56:45 -0500 Subject: [Pythonmac-SIG] Python CoreGraphics script running in Applescript In-Reply-To: References: Message-ID: <98BB33BD-91A5-457E-BC2A-502879C34518@snow.nrcc.cornell.edu> On Jan 30, 2009, at 3:24 PM, Jim Skibbie wrote: ... > page_rect = pdf.getMediaBox( page_number ) > page_width = int(page_rect.getWidth()) > page_height = int(page_rect.getHeight()) > > print "%d \r\n%d" % (page_width, page_height) > > > Under OS 10.5, this script now uses a deprecated function of > CoreGraphics and I get an error that says: > > >> : The function `CGPDFDocumentGetMediaBox' is obsolete and >> will be removed in an upcoming update. Unfortunately, this >> application, or a library it uses, is using this obsolete >> function, and is thereby contributing to an overall degradation of >> system performance. Please use `CGPDFPageGetBoxRect' instead. > > > Can anyone steer me in the right direction on how to work with the > CGPDFPageGetBoxRect function? > > Thanks. > Jim Jim -- Try the following: page_rect = pdf.getPage(page_number).getBoxRect(page_number) --Bill Noon -------------- next part -------------- An HTML attachment was scrubbed... URL: From hengist.podd at virgin.net Fri Jan 30 18:39:58 2009 From: hengist.podd at virgin.net (has) Date: Fri, 30 Jan 2009 17:39:58 +0000 Subject: [Pythonmac-SIG] appscript install error In-Reply-To: References: Message-ID: Rajanikanth Jammalamadaka wrote: > I get this error when trying to install appscript from source on Mac > OS X(using python 2.6.1): > > ld: in /Developer/SDKs/MacOSX10.4u.sdk/usr/local/lib/libPng.dylib, > file is not of required architecture for architecture ppc > collect2: ld returned 1 exit status > lipo: can't open input file: > /var/folders/1F/1FIgkp3qEImZWgJI447-qU+TFxI/-Tmp-//ccmr16bT.out (No > such file or directory) > error: command 'gcc' failed with exit status 1 Looks like you've installed an i386-only build of libPng in /usr/local/ bin, overriding the 4-way fat version included in OS X. Appscript builds as 32-bit fat by default, so when the linker tries to link in the PPC versions all the Carbon libraries it can't find the fat version of libPng that Carbon normally expects. The best solution would be to rebuild your custom libPng installation as 4-way fat, otherwise you'll run into the same problem when building other fat projects. HTH has -- Control AppleScriptable applications from Python, Ruby and ObjC: http://appscript.sourceforge.net From janssen at parc.com Sat Jan 31 00:20:12 2009 From: janssen at parc.com (Bill Janssen) Date: Fri, 30 Jan 2009 15:20:12 PST Subject: [Pythonmac-SIG] appscript rocket-in-dock preventing logout Message-ID: <45862.1233357612@parc.com> We discussed this a bit last year, but with no resolution that I remember. I've got a situation where a Python program is preventing logout/shutdown. It's a script that just runs in an endless loop watching what app I'm working with; when it sees one it knows (Preview, MS Word, Safari, etc.) it uses appscript to ask the app what document I'm looking at. It then squirrels that document away in a journal so that I've got a record of what I've been working with. The basic control loop is something like this: while True: ... see what's running, and possibly what document ... time.sleep(1.0) When I fire this up, it creates a Python rocket icon in the dock. Not great, but I can live with it. But it also prevents logout and shutdown from working -- I keep getting the message "Logout has timed out because the application Python has failed to quit". Does anyone know what I've got to do to this script to keep it from preventing logout? For bonus points, what do I have to do to keep it from putting the rocket in the dock? Bill From vivacarlie at gmail.com Sat Jan 31 06:48:53 2009 From: vivacarlie at gmail.com (Nehemiah Dacres) Date: Fri, 30 Jan 2009 23:48:53 -0600 Subject: [Pythonmac-SIG] pyobjc python3k languagebridge Message-ID: <65fadfc30901302148p169ddee0l1d7f816c816355be@mail.gmail.com> I have a few questions about Python Objective-C. First, how is the development of python3 objective-C going?will python3.0 objective3 be implimented with the Leopard scripting bridge? Is PowerPC a target for these developments? -- "lalalalala! it's not broken because I can use it" http://linux.slashdot.org/comments.pl?sid=194281&threshold=1&commentsort=0&mode=thread&cid=15927703 -------------- next part -------------- An HTML attachment was scrubbed... URL: From thomas at deniau.org Sat Jan 31 12:05:31 2009 From: thomas at deniau.org (Thomas Deniau) Date: Sat, 31 Jan 2009 12:05:31 +0100 Subject: [Pythonmac-SIG] New release of macholib ? Message-ID: <869098B6-CBC5-4D30-9C6F-22B5A1B6635B@deniau.org> Hello, I've noticed that the newest release of macholib (1.1) came out in July 2006. Since then fixes have been made on the trunk to fix serious bugs such as the "unknown load command 27" problem. (see http://mail.python.org/pipermail/pythonmac-sig/2007-June/019060.html ) This problem has become quite blocking now : with Leopard, even /bin/ ls has the "unknown load command 27" bug. Would it be possible to tag a new release of macholib in order to let port systems such as MacPorts integrate it within their distribution ? Thanks :-) From hengist.podd at virgin.net Sat Jan 31 19:03:36 2009 From: hengist.podd at virgin.net (has) Date: Sat, 31 Jan 2009 18:03:36 +0000 Subject: [Pythonmac-SIG] appscript rocket-in-dock preventing logout In-Reply-To: References: Message-ID: Bill Janssen wrote: > We discussed this a bit last year, but with no resolution that I > remember. I've got a situation where a Python program is preventing > logout/shutdown. It's a script that just runs in an endless loop > watching what app I'm working with; when it sees one it knows > (Preview, > MS Word, Safari, etc.) it uses appscript to ask the app what document > I'm looking at. It then squirrels that document away in a journal so > that I've got a record of what I've been working with. > > The basic control loop is something like this: > > while True: > ... see what's running, and possibly what document ... > time.sleep(1.0) See: http://mail.python.org/pipermail/pythonmac-sig/2008-December/020792.html Two options described there: replace your 'while True' loop with a Carbon/Cocoa event loop, allowing a GUI-based process to handle incoming events, or prevent the OS from automatically upgrading your python process to a GUI process (which it only does if it knows the executable is located in an application bundle, e.g. Python.app/ Contents/MacOS/python). Regards, has -- Control AppleScriptable applications from Python, Ruby and ObjC: http://appscript.sourceforge.net From janssen at parc.com Sat Jan 31 21:18:43 2009 From: janssen at parc.com (Bill Janssen) Date: Sat, 31 Jan 2009 12:18:43 PST Subject: [Pythonmac-SIG] appscript rocket-in-dock preventing logout In-Reply-To: References: Message-ID: <55150.1233433123@parc.com> has wrote: > ...or prevent the OS from automatically upgrading your > python process to a GUI process (which it only does if it knows the > executable is located in an application bundle, e.g. Python.app/ > Contents/MacOS/python). Thanks! I'm not running Python.app -- I'm running /usr/bin/python, which if I follow the symlinks leads me to /System/Library/Frameworks/Python.framework/Versions/2.5/bin/python2.5, which in turn "file" shows to be a dual-architecture executable, which in my case is "Mach-O executable i386". So I don't see how this rule about automatic upgrading really applies -- I'm not using Python.app. Perhaps it's not the OS "upgrading" the process, but rather some code in some extension calling "TransformProcessType" (http://www.cocoadev.com/index.pl?TransformProcessType)? And I still don't see how to fix the logout/shutdown problem. The Apple Cocoa document on this, http://developer.apple.com/documentation/Cocoa/Conceptual/AppArchitecture/Tasks/GracefulAppTermination.html, seems to say "In Cocoa, all raw events requiring application termination result in the invocation of the NSApplication delegation method applicationShouldTerminate:. If the delegate does not implement this method, the application is terminated regardless of any unsaved documents." Presumably, my script doesn't implement this method, and thus "the application is terminated". How? Is it as simple as installing a SIGTERM handler? Bill > Bill Janssen wrote: > > > We discussed this a bit last year, but with no resolution that I > > remember. I've got a situation where a Python program is preventing > > logout/shutdown. It's a script that just runs in an endless loop > > watching what app I'm working with; when it sees one it knows > > (Preview, > > MS Word, Safari, etc.) it uses appscript to ask the app what document > > I'm looking at. It then squirrels that document away in a journal so > > that I've got a record of what I've been working with. > > > > The basic control loop is something like this: > > > > while True: > > ... see what's running, and possibly what document ... > > time.sleep(1.0) > > > See: > > http://mail.python.org/pipermail/pythonmac-sig/2008-December/020792.html > > Two options described there: replace your 'while True' loop with a > Carbon/Cocoa event loop, allowing a GUI-based process to handle > incoming events, or prevent the OS from automatically upgrading your > python process to a GUI process (which it only does if it knows the > executable is located in an application bundle, e.g. Python.app/ > Contents/MacOS/python). > > Regards, > > has From janssen at parc.com Sat Jan 31 21:29:28 2009 From: janssen at parc.com (Bill Janssen) Date: Sat, 31 Jan 2009 12:29:28 PST Subject: [Pythonmac-SIG] appscript rocket-in-dock preventing logout In-Reply-To: <55150.1233433123@parc.com> References: <55150.1233433123@parc.com> Message-ID: <55534.1233433768@parc.com> Bill Janssen wrote: > I'm not running Python.app -- I'm running /usr/bin/python, which if I > follow the symlinks leads me to > /System/Library/Frameworks/Python.framework/Versions/2.5/bin/python2.5, > which in turn "file" shows to be a dual-architecture executable, which > in my case is "Mach-O executable i386". So I don't see how this rule > about automatic upgrading really applies -- I'm not using Python.app. Hmmm, but when I do a "ps", I see that the system, at least, thinks I'm using Python.app. Bill From nad at acm.org Sat Jan 31 22:36:21 2009 From: nad at acm.org (Ned Deily) Date: Sat, 31 Jan 2009 13:36:21 -0800 Subject: [Pythonmac-SIG] appscript rocket-in-dock preventing logout References: <55150.1233433123@parc.com> Message-ID: In article <55150.1233433123 at parc.com>, Bill Janssen wrote: > has wrote: > > ...or prevent the OS from automatically upgrading your > > python process to a GUI process (which it only does if it knows the > > executable is located in an application bundle, e.g. Python.app/ > > Contents/MacOS/python). > I'm not running Python.app -- I'm running /usr/bin/python, which if I > follow the symlinks leads me to > /System/Library/Frameworks/Python.framework/Versions/2.5/bin/python2.5, > which in turn "file" shows to be a dual-architecture executable, which > in my case is "Mach-O executable i386". So I don't see how this rule > about automatic upgrading really applies -- I'm not using Python.app. Actually, you probably are. This can be a bit confusing unless you carefully trace through the steps in the Mac/Makefile.in, as I have been doing recently. Note that the binary at /bin/python2.5 is *not* the actual python interpreter binary. Rather it is the so-called pythonw binary whose only function is to execv to the real python binary which is located at /Resources/Python.app/Contents/MacOS/Python and that is inside an app bundle. -- Ned Deily, nad at acm.org From hengist.podd at virgin.net Sat Jan 31 22:55:52 2009 From: hengist.podd at virgin.net (has) Date: Sat, 31 Jan 2009 21:55:52 +0000 Subject: [Pythonmac-SIG] appscript rocket-in-dock preventing logout In-Reply-To: <55150.1233433123@parc.com> References: <55150.1233433123@parc.com> Message-ID: On 31 Jan 2009, at 20:18, Bill Janssen wrote: > has wrote: >> ...or prevent the OS from automatically upgrading your >> python process to a GUI process (which it only does if it knows the >> executable is located in an application bundle, e.g. Python.app/ >> Contents/MacOS/python). > > Thanks! > > I'm not running Python.app -- I'm running /usr/bin/python, which if I > follow the symlinks leads me to > /System/Library/Frameworks/Python.framework/Versions/2.5/bin/ > python2.5, That's just a stub that kicks off the real executable at: /System/Library/Frameworks/Python.framework/Versions/2.5/Resources/ Python.app/Contents/MacOS/Python > Perhaps it's not the OS "upgrading" the process, but rather some > code in > some extension calling "TransformProcessType" It's the Carbon Process Manager. (There's no good reason for it to do so, but hey, I didn't write the thing.) > And I still don't see how to fix the logout/shutdown problem. The > Apple > Cocoa document on this, > http://developer.apple.com/documentation/Cocoa/Conceptual/AppArchitecture/Tasks/GracefulAppTermination.html > , > seems to say "In Cocoa, all raw events requiring application > termination > result in the invocation of the NSApplication delegation method > applicationShouldTerminate:. If the delegate does not implement this > method, the application is terminated regardless of any unsaved > documents." Right now this is irrelevant as your process doesn't have an event loop. Regards, has -- Control AppleScriptable applications from Python, Ruby and ObjC: http://appscript.sourceforge.net From janssen at parc.com Sat Jan 31 23:00:57 2009 From: janssen at parc.com (Bill Janssen) Date: Sat, 31 Jan 2009 14:00:57 PST Subject: [Pythonmac-SIG] appscript rocket-in-dock preventing logout In-Reply-To: References: <55150.1233433123@parc.com> Message-ID: <57488.1233439257@parc.com> Ned Deily wrote: > In article <55150.1233433123 at parc.com>, Bill Janssen > wrote: > > has wrote: > > > ...or prevent the OS from automatically upgrading your > > > python process to a GUI process (which it only does if it knows the > > > executable is located in an application bundle, e.g. Python.app/ > > > Contents/MacOS/python). > > I'm not running Python.app -- I'm running /usr/bin/python, which if I > > follow the symlinks leads me to > > /System/Library/Frameworks/Python.framework/Versions/2.5/bin/python2.5, > > which in turn "file" shows to be a dual-architecture executable, which > > in my case is "Mach-O executable i386". So I don't see how this rule > > about automatic upgrading really applies -- I'm not using Python.app. > > Actually, you probably are. This can be a bit confusing unless you > carefully trace through the steps in the Mac/Makefile.in, as I have been > doing recently. > > Note that the binary at /bin/python2.5 is *not* the actual python > interpreter binary. Rather it is the so-called pythonw binary whose > only function is to execv to the real python binary which is located at > > /Resources/Python.app/Contents/MacOS/Python > > and that is inside an app bundle. Thanks, Ned. Yes, so I see, looking at the sources. The next question is, since the rocket-in-the-dock only happens sometime, is there something I can do to forestall the "promotion"? And, is the promotion happening because of the OS, or because of code in some extension (appscript, say, or PyObjC). Bill