From brendan.simon at etrix.com.au Sun May 1 12:17:54 2011 From: brendan.simon at etrix.com.au (Brendan Simon (eTRIX)) Date: Sun, 01 May 2011 20:17:54 +1000 Subject: [Pythonmac-SIG] python 2.7 problem with crcmod -- "ImportError: No module named predefined" Message-ID: <4DBD3352.9010109@etrix.com.au> I get the following error when trying to run my app when built with py2app and python 2.7. File "crcmod/__init__.pyc", line 7, in ImportError: No module named predefined The app works fine when built with Python 2.5 or Python 2.6. It seems the folks in py2exe land are having the same issue. http://thread.gmane.org/gmane.comp.python.py2exe/4301 http://thread.gmane.org/gmane.comp.python.py2exe/4302 Any ideas what would be causing this and how it can be fixed/solved/worked-around ?? Thanks, Brendan. -------------- next part -------------- An HTML attachment was scrubbed... URL: From irmen at xs4all.nl Sun May 1 23:26:13 2011 From: irmen at xs4all.nl (Irmen de Jong) Date: Sun, 01 May 2011 23:26:13 +0200 Subject: [Pythonmac-SIG] Extension module compile fail, due to isysroot param pointing to sdk without certain headers. Any tips? Message-ID: <4DBDCFF5.5050006@xs4all.nl> Hi, I recently ran into a problem installing a module because it needed to compile an extension written in C. The compilation failed because the c extension needed a header file+lib that gcc could not find. This was caused by the fact that distutils was adding a '-isysroot' parameter to the gcc command line that pointed to the 10.4 SDK location on my mac. That SDK location doesn't have the particular header file. The issue is almost identical to this old message: http://mail.python.org/pipermail/pythonmac-sig/2009-October/021712.html In the meantime, I worked around the problem by replacing the Python.org python by a non-framework version that I built from source. Building the extension module was fine because it could find the c-library dependency just fine from /usr/local/include this time. This is on a mac mini powerpc, mac os 10.5.8, python.org python 2.7.1 for ppc+intel. My questions are: It's only recently that I discovered about the -isysroot option and I'm not sure how to deal with it. What would be the right way to solve the error I experienced? Can I compile+install custom c libraries in the SDK location? If so, how would I do that? (I only seem to manage to compile+install them into /usr/local) Thanks Irmen de Jong From nad at acm.org Mon May 2 00:28:45 2011 From: nad at acm.org (Ned Deily) Date: Sun, 01 May 2011 15:28:45 -0700 Subject: [Pythonmac-SIG] Extension module compile fail, due to isysroot param pointing to sdk without certain headers. Any tips? References: <4DBDCFF5.5050006@xs4all.nl> Message-ID: In article <4DBDCFF5.5050006 at xs4all.nl>, Irmen de Jong wrote: > I recently ran into a problem installing a module because it needed to > compile an > extension written in C. The compilation failed because the c extension needed > a header > file+lib that gcc could not find. This was caused by the fact that distutils > was adding > a '-isysroot' parameter to the gcc command line that pointed to the 10.4 SDK > location on > my mac. That SDK location doesn't have the particular header file. The issue > is almost > identical to this old message: > http://mail.python.org/pipermail/pythonmac-sig/2009-October/021712.html > > In the meantime, I worked around the problem by replacing the Python.org > python by a > non-framework version that I built from source. Building the extension module > was fine > because it could find the c-library dependency just fine from > /usr/local/include this time. > > This is on a mac mini powerpc, mac os 10.5.8, python.org python 2.7.1 for > ppc+intel. > > My questions are: > It's only recently that I discovered about the -isysroot option and I'm not > sure how to > deal with it. What would be the right way to solve the error I experienced? > Can I compile+install custom c libraries in the SDK location? If so, how > would I do > that? (I only seem to manage to compile+install them into /usr/local) If the extra header files and lib files are in /usr/local, you should be able to include those by either modifying the setup.py file included with the module or, more simply, by setting the appropriate values in the conventional environment variables CFLAGS and LDFLAGS which Distutils looks at and uses. If the module itself requires OS X interfaces that are not in the 10.3 ABI (most python.org Pythons are built with MACOSX_DEPLOYMENT_TARGET=10.3), you may be able to override the -sysroot value by pointing at the 10.5 SDK but I'm not sure that really works. If you could supply an example and open a bug tracker issue, that would be good. The relevant code for 2.7.1 is here: http://hg.python.org/cpython/file/5395f96588d4/Lib/distutils/ccompiler.py http://hg.python.org/cpython/file/5395f96588d4/Lib/distutils/unixccompile r.py -- Ned Deily, nad at acm.org From ronaldoussoren at mac.com Mon May 2 22:18:05 2011 From: ronaldoussoren at mac.com (Ronald Oussoren) Date: Mon, 02 May 2011 22:18:05 +0200 Subject: [Pythonmac-SIG] python 2.7 problem with crcmod -- "ImportError: No module named predefined" In-Reply-To: <4DBD3352.9010109@etrix.com.au> References: <4DBD3352.9010109@etrix.com.au> Message-ID: <4EC6FEB4-8E2B-41DB-A87C-7E9E5D1DFEA3@mac.com> On 1 May, 2011, at 12:17, Brendan Simon (eTRIX) wrote: > I get the following error when trying to run my app when built with py2app and python 2.7. > > File "crcmod/__init__.pyc", line 7, in > ImportError: No module named predefined > > The app works fine when built with Python 2.5 or Python 2.6. > > It seems the folks in py2exe land are having the same issue. > http://thread.gmane.org/gmane.comp.python.py2exe/4301 > http://thread.gmane.org/gmane.comp.python.py2exe/4302 > > Any ideas what would be causing this and how it can be fixed/solved/worked-around ?? The crcmod package contains a module named crcmod. My guess is that both py2app and py2exe get confused by this and try to fetch 'crcmod.predefined' from the nested module instead of the toplevel package. This basicly means that both py2*s have a bug in their emulation of the __import__ code. I'll see if I can create a testcase for this for the modulegraph package, it should then be fairly easy to actually fix the issue. As this is only a problem with python2.7 this may end up being a bug in the stdlib though. As a workaround try adding includes for crcmod.predefined, or even the entire crcmod package (setup(..., package=['crcmod'], ...)) Ronald Ronald > > Thanks, Brendan. > > _______________________________________________ > Pythonmac-SIG maillist - Pythonmac-SIG at python.org > http://mail.python.org/mailman/listinfo/pythonmac-sig > unsubscribe: http://mail.python.org/mailman/options/Pythonmac-SIG -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: smime.p7s Type: application/pkcs7-signature Size: 2224 bytes Desc: not available URL: From ronaldoussoren at mac.com Mon May 2 22:22:56 2011 From: ronaldoussoren at mac.com (Ronald Oussoren) Date: Mon, 02 May 2011 22:22:56 +0200 Subject: [Pythonmac-SIG] Extension module compile fail, due to isysroot param pointing to sdk without certain headers. Any tips? In-Reply-To: <4DBDCFF5.5050006@xs4all.nl> References: <4DBDCFF5.5050006@xs4all.nl> Message-ID: On 1 May, 2011, at 23:26, Irmen de Jong wrote: > Hi, > > I recently ran into a problem installing a module because it needed to compile an > extension written in C. The compilation failed because the c extension needed a header > file+lib that gcc could not find. This was caused by the fact that distutils was adding > a '-isysroot' parameter to the gcc command line that pointed to the 10.4 SDK location on > my mac. That SDK location doesn't have the particular header file. The issue is almost > identical to this old message: > http://mail.python.org/pipermail/pythonmac-sig/2009-October/021712.html > > In the meantime, I worked around the problem by replacing the Python.org python by a > non-framework version that I built from source. Building the extension module was fine > because it could find the c-library dependency just fine from /usr/local/include this time. > > This is on a mac mini powerpc, mac os 10.5.8, python.org python 2.7.1 for ppc+intel. > > My questions are: > It's only recently that I discovered about the -isysroot option and I'm not sure how to > deal with it. What would be the right way to solve the error I experienced? > Can I compile+install custom c libraries in the SDK location? If so, how would I do > that? (I only seem to manage to compile+install them into /usr/local) Adding ['-isysroot', '/'] to extra_compile_flags and extra_link_flags for the extension should work. It worries my a little that the OSX 10.4u SDK causes failures for libraries in /usr/local, that should work just fine, the SDK should only affect files in system locations (/usr/include and /System/Library). Which file couldn't be found? It it a file that's also included in OSX? Can you reproduce the problem with a self-contained example that you can share? Ronald -------------- next part -------------- A non-text attachment was scrubbed... Name: smime.p7s Type: application/pkcs7-signature Size: 2224 bytes Desc: not available URL: From irmen at xs4all.nl Tue May 3 00:32:51 2011 From: irmen at xs4all.nl (Irmen de Jong) Date: Tue, 03 May 2011 00:32:51 +0200 Subject: [Pythonmac-SIG] Extension module compile fail, due to isysroot param pointing to sdk without certain headers. Any tips? In-Reply-To: References: <4DBDCFF5.5050006@xs4all.nl> Message-ID: <4DBF3113.5050808@xs4all.nl> On 2-5-2011 22:22, Ronald Oussoren wrote: > Adding ['-isysroot', '/'] to extra_compile_flags and extra_link_flags for the extension should work. I wiped everything and started over tonight, and lo and behold, I mananged to get it to work by adding a custom option to the setup.py script that in effect added -I/usr/local/include -I/usr/local to the compile command. That fixed the compiler error where it couldn't find the appropriate header file at first. > It worries my a little that the OSX 10.4u SDK causes failures for libraries in /usr/local, that > should work just fine, the SDK should only affect files in system locations (/usr/include and > /System/Library). > > Which file couldn't be found? It it a file that's also included in OSX? Can you reproduce the > problem with a self-contained example that you can share? I wanted to build gevent and it needs the headers from libevent. I compiled and installed libevent into /usr/local. At first those headers could not be found when building gevent. It worked with the custom setup.py option that I mentioned above (--libevent /usr/local)... but I swear last night I couldn't get it to work no matter what I tried. I remember tweaking the compiler options and such but it always failed with not finding the libevent headers, or stdarg.h (weird, because that file is available everywhere??). Unfortunately it seems I cannot reproduce my initial problems, I should have saved my console logs of last night :( I still see a problem when you are not installing by hand, but with PIP or easy_install. When you are installing a package with a weird setup script like gevent, using PIP, you hit a barrier. Because I cannot tweak the setup.py script that PIP will be running (and the --install-option of PIP didn't do what the setup.py script wanted, I tried it but the setup.py didn't like it in any shape or form) I'm comfortable with developing in a unix like environment but the sysroot/sdk stuff of OS X is a bit alien to me. Am I supposed to not touch the SDK locations at all? So installing custom libraries should always be done into /usr/local and then referred to by adding explicit -I/usr/local flags to the compile command? Thanks for your time. Irmen de Jong From brendan.simon at etrix.com.au Tue May 3 02:07:12 2011 From: brendan.simon at etrix.com.au (Brendan Simon (eTRIX)) Date: Tue, 03 May 2011 10:07:12 +1000 Subject: [Pythonmac-SIG] python 2.7 problem with crcmod -- "ImportError: No module named predefined" In-Reply-To: <4EC6FEB4-8E2B-41DB-A87C-7E9E5D1DFEA3@mac.com> References: <4DBD3352.9010109@etrix.com.au> <4EC6FEB4-8E2B-41DB-A87C-7E9E5D1DFEA3@mac.com> Message-ID: <4DBF4730.9070302@etrix.com.au> On 3/05/11 6:18 AM, Ronald Oussoren wrote: >> I get the following error when trying to run my app when built with >> py2app and python 2.7. >> >> File "crcmod/__init__.pyc", line 7, in >> ImportError: No module named predefined >> >> >> The app works fine when built with Python 2.5 or Python 2.6. >> >> It seems the folks in py2exe land are having the same issue. >> >> http://thread.gmane.org/gmane.comp.python.py2exe/4301 >> http://thread.gmane.org/gmane.comp.python.py2exe/4302 >> >> >> Any ideas what would be causing this and how it can be >> fixed/solved/worked-around ?? > > The crcmod package contains a module named crcmod. My guess is that > both py2app and py2exe get confused by this and try to fetch > 'crcmod.predefined' from the nested module instead of the toplevel > package. This basicly means that both py2*s have a bug in their > emulation of the __import__ code. > > I'll see if I can create a testcase for this for the modulegraph > package, it should then be fairly easy to actually fix the issue. As > this is only a problem with python2.7 this may end up being a bug in > the stdlib though. > > As a workaround try adding includes for crcmod.predefined, or even the > entire crcmod package (setup(..., package=['crcmod'], ...)) Yep. Forcing inclusion of the module in setup does resolve the issue. Here is the snippet of my setup file that worked for me :) Hopefully py2app can be fixed so this is not necessary, but at least I have a workaround now. Thanks Ronald !! PACKAGES = [ 'crcmod', ] OPTIONS = { 'argv_emulation' : True, 'iconfile' : 'images/myapp.icns', 'plist' : Plist, 'packages' : PACKAGES, } setup( app = APP, data_files = DATA_FILES, options = { 'py2app' : OPTIONS }, setup_requires=['py2app'], ) -------------- next part -------------- An HTML attachment was scrubbed... URL: From nad at acm.org Tue May 3 02:43:34 2011 From: nad at acm.org (Ned Deily) Date: Mon, 02 May 2011 17:43:34 -0700 Subject: [Pythonmac-SIG] Extension module compile fail, due to isysroot param pointing to sdk without certain headers. Any tips? References: <4DBDCFF5.5050006@xs4all.nl> <4DBF3113.5050808@xs4all.nl> Message-ID: In article <4DBF3113.5050808 at xs4all.nl>, Irmen de Jong wrote: > I still see a problem when you are not installing by hand, but with PIP or > easy_install. > When you are installing a package with a weird setup script like gevent, > using PIP, you > hit a barrier. Because I cannot tweak the setup.py script that PIP will be > running (and > the --install-option of PIP didn't do what the setup.py script wanted, I > tried it but > the setup.py didn't like it in any shape or form) Try setting the options in the environment variables like CFLAGS and LDFLAGS, as I mentioned in my previous reply. Then you shouldn't need to modify setup.py so you can easy_install or pip. -- Ned Deily, nad at acm.org From ronaldoussoren at mac.com Tue May 3 08:20:49 2011 From: ronaldoussoren at mac.com (Ronald Oussoren) Date: Tue, 03 May 2011 08:20:49 +0200 Subject: [Pythonmac-SIG] Extension module compile fail, due to isysroot param pointing to sdk without certain headers. Any tips? In-Reply-To: <4DBF3113.5050808@xs4all.nl> References: <4DBDCFF5.5050006@xs4all.nl> <4DBF3113.5050808@xs4all.nl> Message-ID: On 3 May, 2011, at 0:32, Irmen de Jong wrote: > > > I'm comfortable with developing in a unix like environment but the sysroot/sdk stuff of > OS X is a bit alien to me. Am I supposed to not touch the SDK locations at all? So > installing custom libraries should always be done into /usr/local and then referred to > by adding explicit -I/usr/local flags to the compile command? You shouldn't touch the SDK locations at all, those get erased when you install a new version of Xcode. I haven't looked into the problem you have with automaticly picking up dependencies in /usr/local, AFAIK that should just work the same as without -isysroot. Ronald -------------- next part -------------- A non-text attachment was scrubbed... Name: smime.p7s Type: application/pkcs7-signature Size: 2224 bytes Desc: not available URL: From ronaldoussoren at mac.com Tue May 3 09:01:10 2011 From: ronaldoussoren at mac.com (Ronald Oussoren) Date: Tue, 03 May 2011 09:01:10 +0200 Subject: [Pythonmac-SIG] python 2.7 problem with crcmod -- "ImportError: No module named predefined" In-Reply-To: <4DBF4730.9070302@etrix.com.au> References: <4DBD3352.9010109@etrix.com.au> <4EC6FEB4-8E2B-41DB-A87C-7E9E5D1DFEA3@mac.com> <4DBF4730.9070302@etrix.com.au> Message-ID: <18E2FAB2-03D4-4083-B240-37ED76E30946@mac.com> On 3 May, 2011, at 2:07, Brendan Simon (eTRIX) wrote: > > > On 3/05/11 6:18 AM, Ronald Oussoren wrote: >>> I get the following error when trying to run my app when built with py2app and python 2.7. >>> >>> File "crcmod/__init__.pyc", line 7, in >>> ImportError: No module named predefined >>> >>> The app works fine when built with Python 2.5 or Python 2.6. >>> >>> It seems the folks in py2exe land are having the same issue. >>> http://thread.gmane.org/gmane.comp.python.py2exe/4301 >>> http://thread.gmane.org/gmane.comp.python.py2exe/4302 >>> >>> Any ideas what would be causing this and how it can be fixed/solved/worked-around ?? >> >> The crcmod package contains a module named crcmod. My guess is that both py2app and py2exe get confused by this and try to fetch 'crcmod.predefined' from the nested module instead of the toplevel package. This basicly means that both py2*s have a bug in their emulation of the __import__ code. >> >> I'll see if I can create a testcase for this for the modulegraph package, it should then be fairly easy to actually fix the issue. As this is only a problem with python2.7 this may end up being a bug in the stdlib though. >> >> As a workaround try adding includes for crcmod.predefined, or even the entire crcmod package (setup(..., package=['crcmod'], ...)) > > Yep. Forcing inclusion of the module in setup does resolve the issue. Here is the snippet of my setup file that worked for me :) > > Hopefully py2app can be fixed so this is not necessary, but at least I have a workaround now. I think I can fix this in modulegraph, I'm not quite sure why it works in 2.6 but not in 2.7 though. Are you using the same version of crcmod in both cases? My current impresssion of what's going on here: crcmod.__init__ contains: try: from crcmod.crcmod import * import crcmod.predefined except ImportError: # Make this backward compatible from crcmod import * import predefined A test with a simular package structure fails on both 2.6 and 2.7, but works with 3.2. Modulegraph fails because it creates a MissingModule node for crcmod.predefined, which seems to indicate a bug in how we process imports in a package as it should have created a MissingModule node for crcmod.crcmod.predefined for the second import statement and then a real node for the last one. Ronald > > Thanks Ronald !! > > PACKAGES = [ 'crcmod', ] > > OPTIONS = { > 'argv_emulation' : True, > 'iconfile' : 'images/myapp.icns', > 'plist' : Plist, > 'packages' : PACKAGES, > } > > setup( > app = APP, > data_files = DATA_FILES, > options = { 'py2app' : OPTIONS }, > setup_requires=['py2app'], > ) > > _______________________________________________ > Pythonmac-SIG maillist - Pythonmac-SIG at python.org > http://mail.python.org/mailman/listinfo/pythonmac-sig > unsubscribe: http://mail.python.org/mailman/options/Pythonmac-SIG -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: smime.p7s Type: application/pkcs7-signature Size: 2224 bytes Desc: not available URL: From brendan.simon at etrix.com.au Tue May 3 10:37:04 2011 From: brendan.simon at etrix.com.au (Brendan Simon (eTRIX)) Date: Tue, 03 May 2011 18:37:04 +1000 Subject: [Pythonmac-SIG] python 2.7 problem with crcmod -- "ImportError: No module named predefined" In-Reply-To: <18E2FAB2-03D4-4083-B240-37ED76E30946@mac.com> References: <4DBD3352.9010109@etrix.com.au> <4EC6FEB4-8E2B-41DB-A87C-7E9E5D1DFEA3@mac.com> <4DBF4730.9070302@etrix.com.au> <18E2FAB2-03D4-4083-B240-37ED76E30946@mac.com> Message-ID: <4DBFBEB0.60302@etrix.com.au> On 3/05/11 5:01 PM, Ronald Oussoren wrote: > The crcmod package contains a module named crcmod. My guess is that > both py2app and py2exe get confused by this and try to fetch > 'crcmod.predefined' from the nested module instead of the toplevel > package. This basicly means that both py2*s have a bug in their > emulation of the __import__ code. >>> >>> I'll see if I can create a testcase for this for the modulegraph >>> package, it should then be fairly easy to actually fix the issue. As >>> this is only a problem with python2.7 this may end up being a bug in >>> the stdlib though. >>> >>> As a workaround try adding includes for crcmod.predefined, or even >>> the entire crcmod package (setup(..., package=['crcmod'], ...)) >> >> Yep. Forcing inclusion of the module in setup does resolve the >> issue. Here is the snippet of my setup file that worked for me :) >> >> Hopefully py2app can be fixed so this is not necessary, but at least >> I have a workaround now. > > I think I can fix this in modulegraph, I'm not quite sure why it works > in 2.6 but not in 2.7 though. Are you using the same version of crcmod > in both cases? > > My current impresssion of what's going on here: crcmod.__init__ contains: > > try: > from crcmod.crcmod import * > import crcmod.predefined > except ImportError: > # Make this backward compatible > from crcmod import * > import predefined > > A test with a simular package structure fails on both 2.6 and 2.7, but > works with 3.2. Modulegraph fails because it creates a MissingModule > node for crcmod.predefined, which seems to indicate a bug in how we > process imports in a package as it should have created a MissingModule > node for crcmod.crcmod.predefined for the second import statement and > then a real node for the last one. Ah, yes, there are different versions of crcmod installed. $ /Library/Frameworks/Python.framework/Versions/2.5/bin/pip freeze | grep crcmod crcmod==1.5 $ /Library/Frameworks/Python.framework/Versions/2.6/bin/pip freeze | grep crcmod crcmod==1.6.1 $ /Library/Frameworks/Python.framework/Versions/2.7/bin/pip freeze | grep crcmod crcmod==1.7 -- Brendan. From ronaldoussoren at mac.com Tue May 3 12:34:59 2011 From: ronaldoussoren at mac.com (Ronald Oussoren) Date: Tue, 03 May 2011 12:34:59 +0200 Subject: [Pythonmac-SIG] python 2.7 problem with crcmod -- "ImportError: No module named predefined" In-Reply-To: <4DBFBEB0.60302@etrix.com.au> References: <4DBD3352.9010109@etrix.com.au> <4EC6FEB4-8E2B-41DB-A87C-7E9E5D1DFEA3@mac.com> <4DBF4730.9070302@etrix.com.au> <18E2FAB2-03D4-4083-B240-37ED76E30946@mac.com> <4DBFBEB0.60302@etrix.com.au> Message-ID: On 3 May, 2011, at 10:37, Brendan Simon (eTRIX) wrote: > > > On 3/05/11 5:01 PM, Ronald Oussoren wrote: >> The crcmod package contains a module named crcmod. My guess is that >> both py2app and py2exe get confused by this and try to fetch >> 'crcmod.predefined' from the nested module instead of the toplevel >> package. This basicly means that both py2*s have a bug in their >> emulation of the __import__ code. >>>> >>>> I'll see if I can create a testcase for this for the modulegraph >>>> package, it should then be fairly easy to actually fix the issue. As >>>> this is only a problem with python2.7 this may end up being a bug in >>>> the stdlib though. >>>> >>>> As a workaround try adding includes for crcmod.predefined, or even >>>> the entire crcmod package (setup(..., package=['crcmod'], ...)) >>> >>> Yep. Forcing inclusion of the module in setup does resolve the >>> issue. Here is the snippet of my setup file that worked for me :) >>> >>> Hopefully py2app can be fixed so this is not necessary, but at least >>> I have a workaround now. >> >> I think I can fix this in modulegraph, I'm not quite sure why it works >> in 2.6 but not in 2.7 though. Are you using the same version of crcmod >> in both cases? >> >> My current impresssion of what's going on here: crcmod.__init__ contains: >> >> try: >> from crcmod.crcmod import * >> import crcmod.predefined >> except ImportError: >> # Make this backward compatible >> from crcmod import * >> import predefined >> >> A test with a simular package structure fails on both 2.6 and 2.7, but >> works with 3.2. Modulegraph fails because it creates a MissingModule >> node for crcmod.predefined, which seems to indicate a bug in how we >> process imports in a package as it should have created a MissingModule >> node for crcmod.crcmod.predefined for the second import statement and >> then a real node for the last one. > Ah, yes, there are different versions of crcmod installed. > > $ /Library/Frameworks/Python.framework/Versions/2.5/bin/pip freeze | > grep crcmod > crcmod==1.5 > > $ /Library/Frameworks/Python.framework/Versions/2.6/bin/pip freeze | > grep crcmod > crcmod==1.6.1 > > $ /Library/Frameworks/Python.framework/Versions/2.7/bin/pip freeze | > grep crcmod > crcmod==1.7 That explains the difference in behaviour. I've pushed a fix to the bitbucket repository (at http://bitbucket.org/ronaldoussoren/modulegraph) that should fix this issue. I'll push out a new release of modulegraph when I've done some more testing. Ronald > > -- Brendan. > _______________________________________________ > Pythonmac-SIG maillist - Pythonmac-SIG at python.org > http://mail.python.org/mailman/listinfo/pythonmac-sig > unsubscribe: http://mail.python.org/mailman/options/Pythonmac-SIG -------------- next part -------------- A non-text attachment was scrubbed... Name: smime.p7s Type: application/pkcs7-signature Size: 2224 bytes Desc: not available URL: From irmen at xs4all.nl Tue May 3 19:57:55 2011 From: irmen at xs4all.nl (Irmen de Jong) Date: Tue, 03 May 2011 19:57:55 +0200 Subject: [Pythonmac-SIG] Extension module compile fail, due to isysroot param pointing to sdk without certain headers. Any tips? In-Reply-To: References: <4DBDCFF5.5050006@xs4all.nl> <4DBF3113.5050808@xs4all.nl> Message-ID: <4DC04223.9060204@xs4all.nl> On 3-5-2011 2:43, Ned Deily wrote: > > Try setting the options in the environment variables like CFLAGS and > LDFLAGS, as I mentioned in my previous reply. Then you shouldn't need > to modify setup.py so you can easy_install or pip. > Sorry I missed that, will try it next time. Thanks Irmen From irmen at xs4all.nl Tue May 3 20:28:08 2011 From: irmen at xs4all.nl (Irmen de Jong) Date: Tue, 03 May 2011 20:28:08 +0200 Subject: [Pythonmac-SIG] Extension module compile fail, due to isysroot param pointing to sdk without certain headers. Any tips? In-Reply-To: References: <4DBDCFF5.5050006@xs4all.nl> <4DBF3113.5050808@xs4all.nl> Message-ID: <4DC04938.7070009@xs4all.nl> On 3-5-2011 8:20, Ronald Oussoren wrote: > > On 3 May, 2011, at 0:32, Irmen de Jong wrote: >> >> >> I'm comfortable with developing in a unix like environment but the sysroot/sdk >> stuff of OS X is a bit alien to me. Am I supposed to not touch the SDK locations at >> all? So installing custom libraries should always be done into /usr/local and then >> referred to by adding explicit -I/usr/local flags to the compile command? > > You shouldn't touch the SDK locations at all, those get erased when you install a new > version of Xcode. Roger. > I haven't looked into the problem you have with automaticly picking up dependencies > in /usr/local, AFAIK that should just work the same as without -isysroot. charon:~ irmen$ cat /usr/local/include/irmen.h #define FOO 1 charon:~ irmen$ cat test.c #include int main(void) { return 0; } charon:~ irmen$ gcc test.c charon:~ irmen$ charon:~ irmen$ gcc -isysroot /Developer/SDKs/MacOSX10.4u.sdk test.c test.c:1:19: error: irmen.h: No such file or directory According to what gcc prints when compiling with -v, the -isysroot replaces /usr/local/include include-path (and some others). So it's expected that it now fails to compile, right? I can get it to compile again when I explicitly add /usr/local/include to the include path once more: $ MACOSX_DEPLOYMENT_TARGET=10.4 gcc -I/usr/local/include -isysroot /Developer/SDKs/MacOSX10.4u.sdk test.c I guess the situation is the same with libs living in /usr/local/lib. I'm not entirely sure though if the above is what you were talking about Ronald? Anyway, I got my stuff to compile in the end. And it will probably get easier in the future when I decide to replace the aging mac mini I'm doing this on. I had none of these issues on my other, newer machine which is running OS X 10.6. Thanks! Irmen. From amorris at mistermorris.com Wed May 4 11:35:07 2011 From: amorris at mistermorris.com (Adam Morris) Date: Wed, 4 May 2011 16:35:07 +0700 Subject: [Pythonmac-SIG] appscript 1.0 osax.OSAX() behavior Message-ID: Hello all, A while ago I wrote a Python class around appscript that would avoid (with calls to the shell osascript command) using the standard addition library's calls like display_dialog because it required the launch of Python Launcher, which slowed down the interaction with the user considerably. Then recently while I was doing some testing it looked like perhaps I don't need to use that code anymore, as that Python Launcher no longer appears with 1.0? Is this because of a (much appreciated) improvement in 1.0? -Adam aka brainysmurf From amorris at mistermorris.com Wed May 4 11:41:24 2011 From: amorris at mistermorris.com (Adam Morris) Date: Wed, 4 May 2011 16:41:24 +0700 Subject: [Pythonmac-SIG] improving interactivity in scripts Message-ID: Dear all, I was wondering what sort of options are out there for a poor soul who deploys Python extensively in his workflows, and uses appscript and calls to display dialog and the like to interact with the user, but would really, really like it if there could just be something out there, as easy as display dialog, that would give me more options for dialog boxes. I want something as "easy as python" to use in my program, and that doesn't make me use Interface Builder. I don't know why, but I prefer to handle and maintain everything with straight code. Could you suggest a package or different packages to use to get me things like checkboxes in my simple dialog boxes that also ask for input? -Adam From erik at letterror.com Wed May 4 13:46:40 2011 From: erik at letterror.com (Erik van Blokland) Date: Wed, 4 May 2011 13:46:40 +0200 Subject: [Pythonmac-SIG] improving interactivity in scripts In-Reply-To: References: Message-ID: <0BDAD7F3-DC82-425C-AD8F-86B1A2EB32BB@letterror.com> On 4 mei 2011, at 11:41, Adam Morris wrote: > Could you suggest a package or different packages to use to get me > things like checkboxes in my simple dialog boxes that also ask for > input? I've found the Vanilla library easy to work with to build simple dialogs, but more complex stuff as well. http://code.typesupply.com/wiki/Vanilla Erik From nad at acm.org Thu May 5 03:39:00 2011 From: nad at acm.org (Ned Deily) Date: Wed, 04 May 2011 18:39:00 -0700 Subject: [Pythonmac-SIG] improving interactivity in scripts References: <0BDAD7F3-DC82-425C-AD8F-86B1A2EB32BB@letterror.com> Message-ID: In article <0BDAD7F3-DC82-425C-AD8F-86B1A2EB32BB at letterror.com>, Erik van Blokland wrote: > On 4 mei 2011, at 11:41, Adam Morris wrote: > > > Could you suggest a package or different packages to use to get me > > things like checkboxes in my simple dialog boxes that also ask for > > input? > > I've found the Vanilla library easy to work with to build simple dialogs, but > more complex stuff as well. > http://code.typesupply.com/wiki/Vanilla There's also the venerable CocoaDialog: http://cocoadialog.sourceforge.net/ -- Ned Deily, nad at acm.org From awugit at gmail.com Thu May 5 04:13:17 2011 From: awugit at gmail.com (Andrew Wu) Date: Wed, 4 May 2011 19:13:17 -0700 Subject: [Pythonmac-SIG] [Ann][pyatom] Announce: Automated Testing on Macintosh (PyATOM) 0.9 released In-Reply-To: References: Message-ID: Hi all, I am new to this list (as in just subscribed) and am already sending an announcement e-mail about a new open source project, so I hope this isn't going to be taken as spam. The announcement is about a new (hopefully new) python bridge into Apple's Accessibility API to facilitate UI automation, testing of an application's accessibility hooks, and the like. My team at work has been involved with developing it and we have been using internally successfully to do GUI automation. We hope you'll find it just as useful. If you have any questions or concerns, please e-mail me or the pyatom list. And of course we welcome your help if you're interested in helping out with further development! Thank you! Andrew ------------------------------------------------------- Subject: [pyatom] Announce: Automated Testing on Macintosh (PyATOM) 0.9 released To: pyatom at lists.pyatom.com Hello, The PyATOM team is proud to announce the initial release of PyATOM. About PyATOM: Short for Automated Testing on Macintosh, PyATOM is the first Python library to fully enable GUI testing of Macintosh applications via the Apple Accessibility API. PyATOM has direct access to the API. It's fast and easy to use to write tests. Changes in this release: It's the first public release, so none yet! Special thanks: The VMware Fusion automation team Nagappan Alagappan and the LDTP team Download source: https://github.com/pyatom/pyatom Documentation references: Documentation is still a work in progress. Read the README on the Github page for an introduction to PyATOM. Report bugs - https://github.com/pyatom/pyatom/issues To subscribe to PyATOM mailing lists, visit http://lists.pyatom.com/ IRC Channel - #pyatom on irc.freenode.net _______________________________________________ pyatom mailing list pyatom at lists.pyatom.com http://lists.pyatom.com/listinfo.cgi/pyatom-pyatom.com -------------- next part -------------- An HTML attachment was scrubbed... URL: From ronaldoussoren at mac.com Thu May 5 08:06:14 2011 From: ronaldoussoren at mac.com (Ronald Oussoren) Date: Thu, 05 May 2011 08:06:14 +0200 Subject: [Pythonmac-SIG] Extension module compile fail, due to isysroot param pointing to sdk without certain headers. Any tips? In-Reply-To: <4DC04938.7070009@xs4all.nl> References: <4DBDCFF5.5050006@xs4all.nl> <4DBF3113.5050808@xs4all.nl> <4DC04938.7070009@xs4all.nl> Message-ID: On 3 May, 2011, at 20:28, Irmen de Jong wrote: > > >> I haven't looked into the problem you have with automaticly picking up dependencies >> in /usr/local, AFAIK that should just work the same as without -isysroot. > > charon:~ irmen$ cat /usr/local/include/irmen.h > #define FOO 1 > > charon:~ irmen$ cat test.c > #include > int main(void) > { > return 0; > } > > charon:~ irmen$ gcc test.c > charon:~ irmen$ > charon:~ irmen$ gcc -isysroot /Developer/SDKs/MacOSX10.4u.sdk test.c > test.c:1:19: error: irmen.h: No such file or directory > > > According to what gcc prints when compiling with -v, the -isysroot replaces > /usr/local/include include-path (and some others). So it's expected that it now fails to > compile, right? I can get it to compile again when I explicitly add /usr/local/include > to the include path once more: > > $ MACOSX_DEPLOYMENT_TARGET=10.4 gcc -I/usr/local/include -isysroot > /Developer/SDKs/MacOSX10.4u.sdk test.c > > I guess the situation is the same with libs living in /usr/local/lib. > > I'm not entirely sure though if the above is what you were talking about Ronald? -isysroot /FOO adds "/FOO" to the front of items on the default search path for the compiler, that is instead of looking in "/usr/include" the compiler will look in "/FOO/usr/include". For you example this means that the compiler will look in /Developer/SDKs/MacOSX10.4u.sdk/usr/local/include for "irmen.h". That should work because "/usr/local" in the SDK is a symlink to the actual system-wide "/usr/local" directory: $ ls -l /Developer/SDKs/MacOSX10.4u.sdk/usr/local total 8 lrwxr-xr-x 1 root wheel 14 Mar 24 09:10 lib -> /usr/local/lib This is on a 10.6 system with Xcode 3, but I'm pretty sure that the compiler worked the same in earlier releases. Have you changed files in the SDK? BTW. The reason "-I/usr/local/include" fixes your prolbem is that the location is then added as a user-supplied item on the search path and those aren't resolved relative to the SDK root. Ronald -------------- next part -------------- A non-text attachment was scrubbed... Name: smime.p7s Type: application/pkcs7-signature Size: 2224 bytes Desc: not available URL: From dave at bcs.co.nz Thu May 5 12:19:35 2011 From: dave at bcs.co.nz (David Brooks) Date: Thu, 05 May 2011 22:19:35 +1200 Subject: [Pythonmac-SIG] Extension module compile fail, due to isysroot param pointing to sdk without certain headers. Any tips? In-Reply-To: References: <4DBDCFF5.5050006@xs4all.nl> <4DBF3113.5050808@xs4all.nl> <4DC04938.7070009@xs4all.nl> Message-ID: <4DC279B7.9080305@bcs.co.nz> On 5/05/11 6:06 PM, Ronald Oussoren wrote: > On 3 May, 2011, at 20:28, Irmen de Jong wrote: >> >>> I haven't looked into the problem you have with automaticly picking up dependencies >>> in /usr/local, AFAIK that should just work the same as without -isysroot. >> charon:~ irmen$ cat /usr/local/include/irmen.h >> #define FOO 1 >> >> charon:~ irmen$ cat test.c >> #include >> int main(void) >> { >> return 0; >> } >> >> charon:~ irmen$ gcc test.c >> charon:~ irmen$ >> charon:~ irmen$ gcc -isysroot /Developer/SDKs/MacOSX10.4u.sdk test.c >> test.c:1:19: error: irmen.h: No such file or directory >> >> >> According to what gcc prints when compiling with -v, the -isysroot replaces >> /usr/local/include include-path (and some others). So it's expected that it now fails to >> compile, right? I can get it to compile again when I explicitly add /usr/local/include >> to the include path once more: >> >> $ MACOSX_DEPLOYMENT_TARGET=10.4 gcc -I/usr/local/include -isysroot >> /Developer/SDKs/MacOSX10.4u.sdk test.c >> >> I guess the situation is the same with libs living in /usr/local/lib. >> >> I'm not entirely sure though if the above is what you were talking about Ronald? > -isysroot /FOO adds "/FOO" to the front of items on the default search path for the compiler, > that is instead of looking in "/usr/include" the compiler will look in "/FOO/usr/include". > > For you example this means that the compiler will look in /Developer/SDKs/MacOSX10.4u.sdk/usr/local/include > for "irmen.h". That should work because "/usr/local" in the SDK is a symlink to the actual system-wide > "/usr/local" directory: > > $ ls -l /Developer/SDKs/MacOSX10.4u.sdk/usr/local > total 8 > lrwxr-xr-x 1 root wheel 14 Mar 24 09:10 lib -> /usr/local/lib > > This is on a 10.6 system with Xcode 3, but I'm pretty sure that the compiler worked the same in earlier > releases. Have you changed files in the SDK? > > BTW. The reason "-I/usr/local/include" fixes your prolbem is that the location is then added > as a user-supplied item on the search path and those aren't resolved relative to the SDK root. > > Ronald > Aha, the problem is because "./usr/local" in the SDK **does not** symlink to the system "/usr/local". Instead "./usr/local/lib" is symlinked to "/usr/local/lib, and there is no corresponding symlink to "/usr/local/include". Dave From ronaldoussoren at mac.com Thu May 5 12:50:34 2011 From: ronaldoussoren at mac.com (Ronald Oussoren) Date: Thu, 05 May 2011 12:50:34 +0200 Subject: [Pythonmac-SIG] Extension module compile fail, due to isysroot param pointing to sdk without certain headers. Any tips? In-Reply-To: <4DC279B7.9080305@bcs.co.nz> References: <4DBDCFF5.5050006@xs4all.nl> <4DBF3113.5050808@xs4all.nl> <4DC04938.7070009@xs4all.nl> <4DC279B7.9080305@bcs.co.nz> Message-ID: On 5 May, 2011, at 12:19, David Brooks wrote: > > > On 5/05/11 6:06 PM, Ronald Oussoren wrote: >> On 3 May, 2011, at 20:28, Irmen de Jong wrote: >>> >>>> I haven't looked into the problem you have with automaticly picking up dependencies >>>> in /usr/local, AFAIK that should just work the same as without -isysroot. >>> charon:~ irmen$ cat /usr/local/include/irmen.h >>> #define FOO 1 >>> >>> charon:~ irmen$ cat test.c >>> #include >>> int main(void) >>> { >>> return 0; >>> } >>> >>> charon:~ irmen$ gcc test.c >>> charon:~ irmen$ >>> charon:~ irmen$ gcc -isysroot /Developer/SDKs/MacOSX10.4u.sdk test.c >>> test.c:1:19: error: irmen.h: No such file or directory >>> >>> >>> According to what gcc prints when compiling with -v, the -isysroot replaces >>> /usr/local/include include-path (and some others). So it's expected that it now fails to >>> compile, right? I can get it to compile again when I explicitly add /usr/local/include >>> to the include path once more: >>> >>> $ MACOSX_DEPLOYMENT_TARGET=10.4 gcc -I/usr/local/include -isysroot >>> /Developer/SDKs/MacOSX10.4u.sdk test.c >>> >>> I guess the situation is the same with libs living in /usr/local/lib. >>> >>> I'm not entirely sure though if the above is what you were talking about Ronald? >> -isysroot /FOO adds "/FOO" to the front of items on the default search path for the compiler, >> that is instead of looking in "/usr/include" the compiler will look in "/FOO/usr/include". >> >> For you example this means that the compiler will look in /Developer/SDKs/MacOSX10.4u.sdk/usr/local/include >> for "irmen.h". That should work because "/usr/local" in the SDK is a symlink to the actual system-wide >> "/usr/local" directory: >> >> $ ls -l /Developer/SDKs/MacOSX10.4u.sdk/usr/local >> total 8 >> lrwxr-xr-x 1 root wheel 14 Mar 24 09:10 lib -> /usr/local/lib >> >> This is on a 10.6 system with Xcode 3, but I'm pretty sure that the compiler worked the same in earlier >> releases. Have you changed files in the SDK? >> >> BTW. The reason "-I/usr/local/include" fixes your prolbem is that the location is then added >> as a user-supplied item on the search path and those aren't resolved relative to the SDK root. >> >> Ronald >> > > Aha, the problem is because "./usr/local" in the SDK **does not** symlink to the system "/usr/local". Instead "./usr/local/lib" is symlinked to "/usr/local/lib, and there is no corresponding symlink to "/usr/local/include". Oops... I don't understand why I didn't notice this myself. I've filed issue #9388597 for this in Apple's tracker. If you have a developer account you can file an issue about this as well, the amount of developers that report the same bug affects how soon Apple will actually address the issue (if ever). Ronald -------------- next part -------------- A non-text attachment was scrubbed... Name: smime.p7s Type: application/pkcs7-signature Size: 2224 bytes Desc: not available URL: From Chris.Barker at noaa.gov Thu May 5 18:04:43 2011 From: Chris.Barker at noaa.gov (Christopher Barker) Date: Thu, 05 May 2011 09:04:43 -0700 Subject: [Pythonmac-SIG] improving interactivity in scripts In-Reply-To: References: Message-ID: <4DC2CA9B.3050901@noaa.gov> On 5/4/11 2:41 AM, Adam Morris wrote: > I was wondering what sort of options are out there for a poor soul who > deploys Python extensively in his workflows, and uses appscript and > calls to display dialog and the like to interact with the user, but > would really, really like it if there could just be something out > there, as easy as display dialog, that would give me more options for > dialog boxes. > > I want something as "easy as python" to use in my program, and that > doesn't make me use Interface Builder. I don't know why, but I prefer > to handle and maintain everything with straight code. Do you have any need for something platform independent? wxPython give a lot of options, and is particularly nice, I think, if you want to describe your dialogs in code. (or maybe it's just NOT nice if you want to use a GUI builder...) It can be a bit verbose to create and use a dialog, but if you have some common ones you use, a few utility functions are easy to whip up. It's usually used for full-on event driven GUIs, but I've enclosed a sample of using dialogs in a procedural, or script-like program. -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 -------------- A non-text attachment was scrubbed... Name: ProceduralTest.py Type: application/x-python Size: 2199 bytes Desc: not available URL: From irmen at xs4all.nl Thu May 5 20:17:07 2011 From: irmen at xs4all.nl (Irmen de Jong) Date: Thu, 05 May 2011 20:17:07 +0200 Subject: [Pythonmac-SIG] Extension module compile fail, due to isysroot param pointing to sdk without certain headers. Any tips? In-Reply-To: References: <4DBDCFF5.5050006@xs4all.nl> <4DBF3113.5050808@xs4all.nl> <4DC04938.7070009@xs4all.nl> <4DC279B7.9080305@bcs.co.nz> Message-ID: <4DC2E9A3.2040804@xs4all.nl> On 05-05-11 12:50, Ronald Oussoren wrote: > > On 5 May, 2011, at 12:19, David Brooks wrote: > >> >> Aha, the problem is because "./usr/local" in the SDK **does not** >> symlink to the system "/usr/local". Instead "./usr/local/lib" is >> symlinked to "/usr/local/lib, and there is no corresponding symlink >> to "/usr/local/include". > > Oops... I don't understand why I didn't notice this myself. I've > filed issue #9388597 for this in Apple's tracker. If you have a > developer account you can file an issue about this as well, the > amount of developers that report the same bug affects how soon Apple > will actually address the issue (if ever). > > Ronald Odd. This is the case in all SDKs that are installed on my macs. (10.4 and 10.5 on the one with OS X 10.5, and 10.5 and 10.6 on the one with OSX 10.6). I find it weird that they take the effort to symlink /usr/local/lib and not /usr/local/include, but is it really a bug when all 4 SDK installations have the same problem? I would say yes, but can't imagine someone else hasn't tripped over this before... :) A little bit of googling doesn't find anything particularly interesting, apart from this thread itself, and the following page: http://www.kyngchaos.com/macosx/notes/universal64 They suggest adding a symlink yourself. I might do just that. (and add a bug in Apple's tracker). Anyway thanks for the help on this. I've learned something new :) Irmen de Jong From cweisiger at msg.ucsf.edu Thu May 5 21:23:50 2011 From: cweisiger at msg.ucsf.edu (Chris Weisiger) Date: Thu, 5 May 2011 12:23:50 -0700 Subject: [Pythonmac-SIG] OSX 10.5 and 64-bit Python Message-ID: Is there a readily-installable 64-bit Python for OSX 10.5? python.org only has 64-bit for 10.6, and while my searches have turned up instructions (of greater or lesser complexity) for building it from scratch, I'd rather use a vetted install if possible. Moreover, I'm eventually going to py2app this thing, and I'd rather not restrict my userbase based on their operating system version. Thanks for any advice or assistance. -Chris -------------- next part -------------- An HTML attachment was scrubbed... URL: From nad at acm.org Thu May 5 21:58:50 2011 From: nad at acm.org (Ned Deily) Date: Thu, 05 May 2011 12:58:50 -0700 Subject: [Pythonmac-SIG] OSX 10.5 and 64-bit Python References: Message-ID: In article , Chris Weisiger wrote: > Is there a readily-installable 64-bit Python for OSX 10.5? python.org only > has 64-bit for 10.6, and while my searches have turned up instructions (of > greater or lesser complexity) for building it from scratch, I'd rather use a > vetted install if possible. Moreover, I'm eventually going to py2app this > thing, and I'd rather not restrict my userbase based on their operating > system version. There is none from python.org. If you intend to only provide a 64-bit-only version of your app, that will, of course, exclude a significant portion of 10.5 and 10.6 users, i.e. those with earlier 32-bit-only Intel processors and (for 10.5) PPC users. And that's the main reason why such a configuration isn't provided on python.org. The 32-bit-only Pythons provided there will run on all Macs that run 10.3.9 through 10.6. If you do need 64-bit, it is possible to build a 10-5+ universal version. I'd suggest looking at the Mac/BuildScript README.txt and build-installer.py script in the Python source tree. The relevant option to the installer script is --universal-archs. The current top of trunk for 2.7.x is here (and these files are more up-to-date than the 2.7.1 released versions): http://hg.python.org/cpython/file/76a2354aa427/Mac/BuildScript You'd have to tweak the script a bit to get *just* 64-bit Intel, if you need that. -- Ned Deily, nad at acm.org From irmen at xs4all.nl Thu May 5 22:11:12 2011 From: irmen at xs4all.nl (Irmen de Jong) Date: Thu, 05 May 2011 22:11:12 +0200 Subject: [Pythonmac-SIG] OSX 10.5 and 64-bit Python In-Reply-To: References: Message-ID: <4DC30460.3030609@xs4all.nl> On 05-05-11 21:23, Chris Weisiger wrote: > Is there a readily-installable 64-bit Python for OSX 10.5? python.org > only has 64-bit for 10.6, and while my searches have > turned up instructions (of greater or lesser complexity) for building it > from scratch, I'd rather use a vetted install if possible. Moreover, I'm > eventually going to py2app this thing, and I'd rather not restrict my > userbase based on their operating system version. > > Thanks for any advice or assistance. > It seems ActivePython is available in 64 bits for 10.5: http://www.activestate.com/activepython/downloads (haven't tried it, I tend to stick with python.org's builds) Irmen From cweisiger at msg.ucsf.edu Thu May 5 22:24:28 2011 From: cweisiger at msg.ucsf.edu (Chris Weisiger) Date: Thu, 5 May 2011 13:24:28 -0700 Subject: [Pythonmac-SIG] OSX 10.5 and 64-bit Python In-Reply-To: <4DC30460.3030609@xs4all.nl> References: <4DC30460.3030609@xs4all.nl> Message-ID: On Thu, May 5, 2011 at 1:11 PM, Irmen de Jong wrote: > It seems ActivePython is available in 64 bits for 10.5: > http://www.activestate.com/activepython/downloads > > (haven't tried it, I tend to stick with python.org's builds) That looks promising. Thanks! I'm going to end up with a 32/64-bit split anyway; I just don't want to have to rebuild Python by hand on a borrowed computer (my normal dev machine is only 32-bit). -Chris -------------- next part -------------- An HTML attachment was scrubbed... URL: From nad at acm.org Fri May 6 02:06:36 2011 From: nad at acm.org (Ned Deily) Date: Thu, 05 May 2011 17:06:36 -0700 Subject: [Pythonmac-SIG] OSX 10.5 and 64-bit Python References: <4DC30460.3030609@xs4all.nl> Message-ID: In article , Chris Weisiger wrote: > On Thu, May 5, 2011 at 1:11 PM, Irmen de Jong wrote: > > It seems ActivePython is available in 64 bits for 10.5: > > http://www.activestate.com/activepython/downloads > > > (haven't tried it, I tend to stick with python.org's builds) > That looks promising. Thanks! Just be aware that the ActiveState distributions are not open-source and make sure your intended usage is compatible with the ActiveState licenses. -- Ned Deily, nad at acm.org From pancakes at snet.net Fri May 6 22:49:11 2011 From: pancakes at snet.net (Susi) Date: Fri, 6 May 2011 13:49:11 -0700 Subject: [Pythonmac-SIG] pygame.error: File is not a Windows BMP file Message-ID: Hi, if you could help that'd be great. Pygame won't render anything but bmps. I know absolutely nothing about python; I just started. I'm trying to run tutorials but they won't work! I think I installed pygame wrong? I also tried to install PIL but it didn't work. Is PIL required? So I'm trying to run a game tutorial I downloaded and keep getting pygame.error: File is not a Windows BMP file I tried putting export VERSIONER_PYTHON_PREFER_32_BIT=yes in terminal, but it didn't help. I'm on Snow Leopard. I've googled the crap out of this. As far as I can tell, the problem is usually that the SDL libraries aren't there. But... in my /Library/Frameworks, I totally have SDL_image, SDL_mixer, SDL_ttf, and SDL.framework. I have OSX 10.6.7, Python comes on the mac, so I didn't install it. It's 2.6.1. (I did install python 3.2 but with I try to run things with python3 I get a symbol not found error for PyCObject_asVoidPtr... whatever that is). If you have any ideas I'd appreciate it. Thanks! -- Don't sweat the petty things and don't pet the sweaty things. -------------- next part -------------- An HTML attachment was scrubbed... URL: From carl.aksynczak at gmail.com Wed May 11 19:29:55 2011 From: carl.aksynczak at gmail.com (Carl Aksynczak) Date: Wed, 11 May 2011 13:29:55 -0400 Subject: [Pythonmac-SIG] no app found Message-ID: Hi everyone, I'm trying to create an executable on Mac OSX 10.6. The program compile with setup.py and the egg is created in "/dist" folder, with no error listed. After a search on all files, no app are found. The project : http://github.com/sat-metalab/frigo Thanks for your time ca -- """ Carl Aksynczak carl.aksynczak at gmail.com -------------- next part -------------- An HTML attachment was scrubbed... URL: From rowen at uw.edu Wed May 11 20:49:20 2011 From: rowen at uw.edu (Russell E. Owen) Date: Wed, 11 May 2011 11:49:20 -0700 Subject: [Pythonmac-SIG] no app found References: Message-ID: In article , Carl Aksynczak wrote: > Hi everyone, > > I'm trying to create an executable on Mac OSX 10.6. > > The program compile with setup.py and the egg is created in "/dist" folder, > with no error listed. > After a search on all files, no app are found. > > The project : http://github.com/sat-metalab/frigo > > Thanks for your time Are you using py2app as follows: python setup.py py2app and if so, which version and what is shown when you do it? If not, install it and try it. The app should be in the dist directory. -- Russell From carl.aksynczak at gmail.com Thu May 19 21:54:13 2011 From: carl.aksynczak at gmail.com (Carl Aksynczak) Date: Thu, 19 May 2011 15:54:13 -0400 Subject: [Pythonmac-SIG] no app found In-Reply-To: References: Message-ID: Thanks for your answer Russell, I did what you wrote for py2app and It works well for Mac OS 10.4 (power pc) But an other thing appends when I've try to build on 10.6. I get a 64 bit error. I've change the var VERSIONER_PYTHON_PREFER_32_BIT to yes. And still not compiling. This is an issue because argv_emulation is set to true. Thanks Carl 2011/5/11 Russell E. Owen > In article , > Carl Aksynczak wrote: > > > Hi everyone, > > > > I'm trying to create an executable on Mac OSX 10.6. > > > > The program compile with setup.py and the egg is created in "/dist" > folder, > > with no error listed. > > After a search on all files, no app are found. > > > > The project : http://github.com/sat-metalab/frigo > > > > Thanks for your time > > Are you using py2app as follows: > > python setup.py py2app > > and if so, which version and what is shown when you do it? If not, > install it and try it. The app should be in the dist directory. > > -- Russell > > _______________________________________________ > Pythonmac-SIG maillist - Pythonmac-SIG at python.org > http://mail.python.org/mailman/listinfo/pythonmac-sig > unsubscribe: http://mail.python.org/mailman/options/Pythonmac-SIG > -------------- next part -------------- An HTML attachment was scrubbed... URL: From kw at codebykevin.com Thu May 19 22:53:04 2011 From: kw at codebykevin.com (Kevin Walzer) Date: Thu, 19 May 2011 16:53:04 -0400 Subject: [Pythonmac-SIG] no app found In-Reply-To: References: Message-ID: <4DD58330.5020408@codebykevin.com> On 5/19/11 3:54 PM, Carl Aksynczak wrote: > Thanks for your answer Russell, > > I did what you wrote for py2app and It works well for Mac OS 10.4 (power pc) > > But an other thing appends when I've try to build on 10.6. I get a 64 > bit error. I've change the var VERSIONER_PYTHON_PREFER_32_BIT to yes. > And still not compiling. This is an issue because argv_emulation is set > to true. > > Thanks > > Carl > IIRC, argv_emulation doesn't work in 64-bit because it depends on deprecated API's in Carbon that were not ported to 64-bit. -- Kevin Walzer Code by Kevin http://www.codebykevin.com From tangle1 at mindspring.com Sun May 22 03:40:42 2011 From: tangle1 at mindspring.com (tangle1 at mindspring.com) Date: Sat, 21 May 2011 18:40:42 -0700 (GMT-07:00) Subject: [Pythonmac-SIG] terminate called without an active exception on 1 iMac but not another Message-ID: <24868146.1306028443358.JavaMail.root@mswamui-andean.atl.sa.earthlink.net> Hello, I'm developing an iMac python script; actually its Maya wrapper around python. It crashes with "Abort trap" on one iMac but ends without crash on another iMac. In both cases, program finishes operations and prints final "... Exiting normally" message that my script issues. Any ideas as to what's causing this ? Thanks for any suggestions !!! I'm writing this from home and I'm planning to test more on Monday. Here's snippet of ending statements and also the console output from both bad and good endings. The script has been working for couple of weeks and this crash behavior just popped up. --------------------------------------- if (trimqa(cid,cgl)): print "trimqa %s Exiting normally" % sys.argv[0] cmds.quit(force=True) sys.exit(0) else: print "trimqa %s Exiting with errors" % sys.argv[1] cmds.quit(force=True) sys.exit(1) ----------------------------------------------------------- bad ending: (but saved maya scene is good) ------------------------------------------------- trimqa Saving qa scene /xserve4/cg_production/05_trim-qa/renderScenes/QA_turntable_CID00344_CGL00280.mb for render trimqa /xserve4/cg_production/00_resources/production_scripts/trimqa.py Exiting normally pure virtual method called terminate called without an active exception Abort trap -------------------------------------------- good ending: -------------------------------------- trimqa Saving qa scene /xserve4/cg_production/05_trim-qa/renderScenes/QA_turntable_CID00005_CGL00216.mb for render trimqa /Volumes/cg_production/00_resources/production_scripts/trimqa.py Exiting normally CGI-13:~ CGI-13$ --------------------------------- Apple log details ------------------------------------- Process: Python [18444] Path: /Applications/Autodesk/maya2011/Maya.app/Contents/Frameworks/Python.framework/Versions/2.6/Resources/Python.app/Contents/MacOS/Python Identifier: Python Version: ??? (???) Code Type: X86-64 (Native) Parent Process: bash [18361] Date/Time: 2011-05-20 16:32:54.103 -0700 OS Version: Mac OS X 10.6.7 (10J869) Report Version: 6 Interval Since Last Report: 1746326 sec Crashes Since Last Report: 12 Per-App Crashes Since Last Report: 8 Anonymous UUID: A702737D-9D3D-473D-B58F-D3ED3608B55A Exception Type: EXC_CRASH (SIGABRT) Exception Codes: 0x0000000000000000, 0x0000000000000000 Crashed Thread: 5 Application Specific Information: abort() called Thread 0: Dispatch queue: com.apple.main-thread 0 libSystem.B.dylib 0x00007fff81d7bf8a __semwait_signal + 10 1 libSystem.B.dylib 0x00007fff81d7be19 nanosleep + 148 2 libSystem.B.dylib 0x00007fff81d7bd83 usleep + 57 3 libvray.dylib 0x0000000122e47eae TNet::Done() + 334 4 libvray.dylib 0x0000000122cdac58 FloatingClient::~FloatingClient() + 104 5 libSystem.B.dylib 0x00007fff81d53894 __cxa_finalize + 203 6 libSystem.B.dylib 0x00007fff81d537ac exit + 18 7 org.python.python 0x00000001000e678d handle_system_exit + 253 8 org.python.python 0x00000001000e69d5 PyErr_PrintEx + 485 9 org.python.python 0x00000001000e6f37 PyRun_SimpleFileExFlags + 279 10 org.python.python 0x00000001000f729e Py_Main + 2766 11 org.python.python 0x0000000100000f54 0x100000000 + 3924 Thread 1: Dispatch queue: com.apple.libdispatch-manager 0 libSystem.B.dylib 0x00007fff81d5a12a kevent + 10 1 libSystem.B.dylib 0x00007fff81d5bffd _dispatch_mgr_invoke + 154 2 libSystem.B.dylib 0x00007fff81d5bcd4 _dispatch_queue_invoke + 185 3 libSystem.B.dylib 0x00007fff81d5b7fe _dispatch_worker_thread2 + 252 4 libSystem.B.dylib 0x00007fff81d5b128 _pthread_wqthread + 353 5 libSystem.B.dylib 0x00007fff81d5afc5 start_wqthread + 13 .................................. From jeffrey.denison at gmail.com Mon May 23 03:42:12 2011 From: jeffrey.denison at gmail.com (Jeffrey Denison) Date: Sun, 22 May 2011 18:42:12 -0700 Subject: [Pythonmac-SIG] wide python config Message-ID: I need assistance for a "wide" install of Python 2.7 on a G5 running Leopard 10.5.8. Trying to get the config files options set correctly. I'm not using fink. thanks From nad at acm.org Mon May 23 06:22:09 2011 From: nad at acm.org (Ned Deily) Date: Sun, 22 May 2011 21:22:09 -0700 Subject: [Pythonmac-SIG] wide python config References: Message-ID: In article , Jeffrey Denison wrote: > I need assistance for a "wide" install of Python 2.7 on a G5 running > Leopard 10.5.8. Trying to get the config files options set correctly. > I'm not using fink. Note, it's usually recommended to not use a wide build on OS X: http://article.gmane.org/gmane.comp.python.devel/116519 But, if you must, for 2.7, the relevant ./configure option should be --enable-unicode=ucs4. So, for a G5 if you want to try to include 64-bit support, try something like (untested!): ./configure --with-universal-archs=all --enable-unicode=ucs4 BTW, MacPorts appears to support +ucs4 as a variant for python27 builds. -- Ned Deily, nad at acm.org From ronaldoussoren at mac.com Mon May 23 08:15:37 2011 From: ronaldoussoren at mac.com (Ronald Oussoren) Date: Mon, 23 May 2011 08:15:37 +0200 Subject: [Pythonmac-SIG] wide python config In-Reply-To: References: Message-ID: On 23 May, 2011, at 6:22, Ned Deily wrote: > In article , > Jeffrey Denison wrote: >> I need assistance for a "wide" install of Python 2.7 on a G5 running >> Leopard 10.5.8. Trying to get the config files options set correctly. >> I'm not using fink. > > Note, it's usually recommended to not use a wide build on OS X: > > http://article.gmane.org/gmane.comp.python.devel/116519 > > But, if you must, for 2.7, the relevant ./configure option should be > --enable-unicode=ucs4. So, for a G5 if you want to try to include > 64-bit support, try something like (untested!): > > ./configure --with-universal-archs=all --enable-unicode=ucs4 Why is that? I'd advise to not use 4-byte unicode because the most of the system uses a 2-byte unicode (UniChar in the Cocoa and Carbon frameworks). There is also a 4-byte wchar_t, but that is basically not used by anything from Apple. Ronald -------------- next part -------------- A non-text attachment was scrubbed... Name: smime.p7s Type: application/pkcs7-signature Size: 2224 bytes Desc: not available URL: From ronaldoussoren at mac.com Mon May 23 09:28:33 2011 From: ronaldoussoren at mac.com (Ronald Oussoren) Date: Mon, 23 May 2011 07:28:33 +0000 (GMT) Subject: [Pythonmac-SIG] wide python config In-Reply-To: Message-ID: On 23 May, 2011,at 08:15 AM, Ronald Oussoren wrote: On 23 May, 2011, at 6:22, Ned Deily wrote: > In article , > Jeffrey Denison wrote: >> I need assistance for a "wide" install of Python 2.7 on a G5 running >> Leopard 10.5.8. Trying to get the config files options set correctly. >> I'm not using fink. > > Note, it's usually recommended to not use a wide build on OS X: > > http://article.gmane.org/gmane.comp.python.devel/116519 > > But, if you must, for 2.7, the relevant ./configure option should be > --enable-unicode=ucs4. So, for a G5 if you want to try to include > 64-bit support, try something like (untested!): > > ./configure --with-universal-archs=all --enable-unicode=ucs4 Why is that? I'd advise to not use 4-byte unicode because the most of the system uses a 2-byte unicode (UniChar in the Cocoa and Carbon frameworks). There is also a 4-byte wchar_t, but that is basically not used by anything from Apple. ? Never mind, I wasn't fully awake when I wrote that mail and somehow read "system-wide" instead of "wide-unicode". Ronald -------------- next part -------------- An HTML attachment was scrubbed... URL: