From cohar at conncoll.edu Sun Mar 4 21:18:49 2012 From: cohar at conncoll.edu (Charles Hartman) Date: Sun, 4 Mar 2012 15:18:49 -0500 Subject: [Pythonmac-SIG] (re)newbie py2app question Message-ID: I'm just coming back to programming after years, trying to recompile an old program that works but needs updating and expansion. I'm now on OS 10.6.8, Python 2.7.2, with wxPython (64/32bit). My newly installed py2app is: py2app-0.6.4-py2.7.egg. All of these were in earlier versions when I last packaged the program with py2app. In Console, the errors seem to be of two kinds. There's a long list of ScriptingAdditions messages about missing architectures. Before that, there's this: [0x0-0x1bcfbce].org.pythonmac.unspecified.PyProse[87375] NameError: global name 'self' is not defined That seems to be in a module of the program that certainly did work before. I can debug the program in WingIDE, I get no problems or errors (except maybe the ScriptingAdditions ones) when I run it there. Have I forgotten something simple? Has something changed that I missed? Thanks for any help. -- Charles O. Hartman Poet in Residence Lucy Marsh Haskell '19 Professor of Literatures in English oak.conncoll.edu/cohar -------------- next part -------------- An HTML attachment was scrubbed... URL: From nad at acm.org Mon Mar 5 03:05:53 2012 From: nad at acm.org (Ned Deily) Date: Sun, 04 Mar 2012 18:05:53 -0800 Subject: [Pythonmac-SIG] Fix for international characters in Tcl/Tk 8.5 Message-ID: Good news for users of IDLE and other Tkinter-based applications! A fix for Cocoa Tcl/Tk 8.5 for improved handling of Mac OS X input methods was recently applied and has now been released in the latest ActiveState Tcl release (8.5.11.1) available here: http://www.activestate.com/activetcl/downloads It appears to fix a number of long standing problems with Cocoa Tcl/Tk 8.5 involving composite characters, like the French keyboard tilde (Option-N) problem and the inability to enter Option-U + vowel to form "umlauted" vowels on US keyboards. Entering these characters in IDLE, for instance, used to immediately crash Tcl and, hence, Python and IDLE. In fact, the Apple-supplied Tcl 8.5.9 in OS X 10.7 Lion exhibits this behavior (try it with /usr/bin/idle). (The Apple-supplied TCL 8.5 in OS X 10.6 Snow Leopard is so buggy as to be essentially unusable with IDLE.) Many thanks to Adrian Robert, Kevin Walzer, and the ActiveState team for addressing this nasty problem. If you install ActiveState Tcl 8.5.x, it will automatically be used by the python.org 2.7.x, 3.2.x, and 3.3.x 64-bit/32-bit Pythons for OS X 10.6 and 10.7. It will *not* be used by the Apple-supplied system Pythons nor by 32-bit-only python.org Pythons. More details here: http://www.python.org/download/mac/tcltk/ -- Ned Deily, nad at acm.org From nad at acm.org Mon Mar 5 03:24:11 2012 From: nad at acm.org (Ned Deily) Date: Sun, 04 Mar 2012 18:24:11 -0800 Subject: [Pythonmac-SIG] (re)newbie py2app question References: Message-ID: In article , Charles Hartman wrote: > I'm just coming back to programming after years, trying to recompile an old > program that works but needs updating and expansion. I'm now on OS 10.6.8, > Python 2.7.2, with wxPython (64/32bit). My newly installed py2app > is: py2app-0.6.4-py2.7.egg. All of these were in earlier versions when I > last packaged the program with py2app. > > In Console, the errors seem to be of two kinds. There's a long list of > ScriptingAdditions messages about missing architectures. Before that, > there's this: > [0x0-0x1bcfbce].org.pythonmac.unspecified.PyProse[87375] NameError: global > name 'self' is not defined > > That seems to be in a module of the program that certainly did work before. > I can debug the program in WingIDE, I get no problems or errors (except > maybe the ScriptingAdditions ones) when I run it there. > > Have I forgotten something simple? Has something changed that I missed? There are significant changes in OS X 10.6 compared to earlier versions. The major difference is that 64-bit Intel (aka -arch x86_64) is now the preferred build and execution architecture. While 32-bit Intel and even 32-bit PPC execution (via Rosetta emulation) are still supported, a 64-bit/32-bit executable will, by default, run in 64-bit mode. Unfortunately, many older Carbon APIs are only available in 32-bit mode, as Apple cancelled earlier plans to make 64-bit versions of them. Chances are you are running into a problem with trying to use them. You *may* be able to work around the problem by forcing your 64-bit/32-bit Python to run in 32-bit mode. For the python.org 2.7.2, you should be able to do this by invoking Python as 'python2.7-32'. Another option might be to use the 32-bit-only python.org installer but be aware that there will be problems using this method on OS X 10.7 Lion. Also, life will likely be easier for you on 10.6 if you stick with Xcode 3.2.x (still available for download from the Apple Developer Connection) rather than the optional Xcode 4.x releases which are also the default on 10.7; the latest versions of Xcode 4.x no longer supply the traditional gcc-4.2 that those Pythons were built with and expect to find to build C extension modules. But, if you will eventually need to support 10.7, you should probably dig deeper into the errors and make your program work in 64-bit mode as well. Good luck! -- Ned Deily, nad at acm.org From cohar at conncoll.edu Mon Mar 5 04:28:33 2012 From: cohar at conncoll.edu (Charles Hartman) Date: Sun, 4 Mar 2012 22:28:33 -0500 Subject: [Pythonmac-SIG] (re)newbie py2app question In-Reply-To: References: Message-ID: Dear Ned (the ever-helpfu-and-clear; I've been following the listserv even over the non-programming years), Thanks. FWIW, I'm not using Xcode at all. I'm aware of the 32/64 change. I thought I had addressed it: my Python 2.7 runs in 64-bit mode (sys.maxsize == 2 ** 64 yields True). My wxPython ("classic," they call it, for no clear reason; filename wxPython2.9-osx-2.9.3.1-cocoa-py2.7.dmg) purports to be friendly to either 64-bit or 32-bit. What other API would be out of step? Is the fact that the program runs without error inside the Wing IDE debugger irrelevant? Grateful but still bewildered, Charles Hartman On Sun, Mar 4, 2012 at 9:24 PM, Ned Deily wrote: > In article > , > Charles Hartman wrote: > > > I'm just coming back to programming after years, trying to recompile an > old > > program that works but needs updating and expansion. I'm now on OS > 10.6.8, > > Python 2.7.2, with wxPython (64/32bit). My newly installed py2app > > is: py2app-0.6.4-py2.7.egg. All of these were in earlier versions when I > > last packaged the program with py2app. > > > > In Console, the errors seem to be of two kinds. There's a long list of > > ScriptingAdditions messages about missing architectures. Before that, > > there's this: > > [0x0-0x1bcfbce].org.pythonmac.unspecified.PyProse[87375] NameError: > global > > name 'self' is not defined > > > > That seems to be in a module of the program that certainly did work > before. > > I can debug the program in WingIDE, I get no problems or errors (except > > maybe the ScriptingAdditions ones) when I run it there. > > > > Have I forgotten something simple? Has something changed that I missed? > > There are significant changes in OS X 10.6 compared to earlier versions. > The major difference is that 64-bit Intel (aka -arch x86_64) is now the > preferred build and execution architecture. While 32-bit Intel and > even 32-bit PPC execution (via Rosetta emulation) are still supported, a > 64-bit/32-bit executable will, by default, run in 64-bit mode. > Unfortunately, many older Carbon APIs are only available in 32-bit mode, > as Apple cancelled earlier plans to make 64-bit versions of them. > Chances are you are running into a problem with trying to use them. You > *may* be able to work around the problem by forcing your 64-bit/32-bit > Python to run in 32-bit mode. For the python.org 2.7.2, you should be > able to do this by invoking Python as 'python2.7-32'. > > Another option might be to use the 32-bit-only python.org installer but > be aware that there will be problems using this method on OS X 10.7 Lion. > > Also, life will likely be easier for you on 10.6 if you stick with Xcode > 3.2.x (still available for download from the Apple Developer Connection) > rather than the optional Xcode 4.x releases which are also the default > on 10.7; the latest versions of Xcode 4.x no longer supply the > traditional gcc-4.2 that those Pythons were built with and expect to > find to build C extension modules. But, if you will eventually need to > support 10.7, you should probably dig deeper into the errors and make > your program work in 64-bit mode as well. > > Good luck! > > -- > Ned Deily, > nad at acm.org > > _______________________________________________ > 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 > -- Charles O. Hartman Poet in Residence Lucy Marsh Haskell '19 Professor of Literatures in English oak.conncoll.edu/cohar -------------- next part -------------- An HTML attachment was scrubbed... URL: From nad at acm.org Mon Mar 5 09:49:22 2012 From: nad at acm.org (Ned Deily) Date: Mon, 05 Mar 2012 00:49:22 -0800 Subject: [Pythonmac-SIG] (re)newbie py2app question References: Message-ID: In article , Charles Hartman wrote: > Thanks. FWIW, I'm not using Xcode at all. I'm aware of the 32/64 change. > I thought I had addressed it: my Python 2.7 runs in 64-bit mode > (sys.maxsize == 2 ** 64 yields True). My wxPython ("classic," they call > it, for no clear reason; filename wxPython2.9-osx-2.9.3.1-cocoa-py2.7.dmg) > purports to be friendly to either 64-bit or 32-bit. What other API would > be out of step? > > Is the fact that the program runs without error inside the Wing IDE > debugger irrelevant? So much for idle (not IDLE) speculation on my part. Without more information, it's hard to guess and I don't have any personal experience with the new Cocoa-based wxPython. Perhaps if you posted more details (in particular, exactly what errors you see), someone might be able to help. You could also try printing the value of sys.path when you are running in the debugger and when not. -- Ned Deily, nad at acm.org From chris.barker at noaa.gov Tue Mar 6 23:19:02 2012 From: chris.barker at noaa.gov (Chris Barker) Date: Tue, 6 Mar 2012 14:19:02 -0800 Subject: [Pythonmac-SIG] (re)newbie py2app question In-Reply-To: References: Message-ID: On Sun, Mar 4, 2012 at 7:28 PM, Charles Hartman wrote: > ?My wxPython ("classic," they call it, > for no clear reason; IN case you're curios -- "classic" refers to it being the latest version of the SWIG-based wrappers that have been around for years -- Robin is now working on an updated wxPython built differently, that he calls "Project Phoenix". -- 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 cohar at conncoll.edu Tue Mar 6 23:32:48 2012 From: cohar at conncoll.edu (Charles Hartman) Date: Tue, 6 Mar 2012 17:32:48 -0500 Subject: [Pythonmac-SIG] (re)newbie py2app question In-Reply-To: References: Message-ID: Ah, thanks. On the wxPython list I had a response from RD which suggested, puzzlingly, that it might be a 32-bit/64-bit problem. But my Python is running in 64-bit, and that version of wxPython is advertised as 32/64. So I'm baffled. On Tue, Mar 6, 2012 at 5:19 PM, Chris Barker wrote: > On Sun, Mar 4, 2012 at 7:28 PM, Charles Hartman > wrote: > > My wxPython ("classic," they call it, > > for no clear reason; > > IN case you're curios -- "classic" refers to it being the latest > version of the SWIG-based wrappers that have been around for years -- > Robin is now working on an updated wxPython built differently, that he > calls "Project Phoenix". > > -- > > 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 > _______________________________________________ > 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 > -- Charles O. Hartman Poet in Residence Lucy Marsh Haskell '19 Professor of Literatures in English oak.conncoll.edu/cohar -------------- next part -------------- An HTML attachment was scrubbed... URL: From carlos.grohmann at gmail.com Thu Mar 8 00:09:28 2012 From: carlos.grohmann at gmail.com (Carlos Grohmann) Date: Wed, 7 Mar 2012 20:09:28 -0300 Subject: [Pythonmac-SIG] shrink app bundle size (removing unused stuff)? Message-ID: Hi there, I've been reasonably successful in building an app bundle with py2app. I'm running OS X Lion, python 2.7.2 (from python.org), wxpython 2.9beta, and my app uses matplotlib and numpy. Using py2exe, the final folder has 14MB, or 11MB compressed. Using py2app, the .app has 250MB (!) or 100MB compressed with Disk utility Examining the Contents of the .app, I can see that there's A LOT of stuff I don't need, like Editra (11MB), Locales, or Matplotlib "tests" folder (38MB) So, how could I remove these itens from my app? I tried the 'excludes' option in py2app setup.py, but without any luck. Also, what are those "codecs" in lib-dynload? I have no idea what they are. my setup.py follows. (BTW, I tried to run it without any reference to 'wx' but then the app crashes) many thanks Carlos from setuptools import setup from glob import glob import shutil shutil.rmtree("build", ignore_errors=True) shutil.rmtree("dist", ignore_errors=True) APPNAME = 'OpenStereo' APP = ['resources/OpenStereo.py'] VERSION = '0.1.2g' # must be in X.X.X format DATA_FILES = ['license/gpl-3.0.txt'] #[glob(r'resources/*')] OPTIONS = { 'plist':dict( CFBundleName = 'OpenStereo', CFBundleShortVersionString = VERSION, CFBundleVersion = VERSION, CFBundleGetInfoString = 'OpenStereo, Open-Source Structural Geology Analysis', CFBundleExecutable = 'OpenStereo', CFBundleIdentifier = "br.usp.igc", NSHumanReadableCopyright = 'Carlos H. Grohmann'), 'argv_emulation': True, 'optimize': 1, 'compressed': True, 'strip': True, 'semi_standalone': False, 'packages': ['wx'], 'dylib_excludes': ['Tcl.framework','Tk.framework'], 'resources': ['icons/openstereo_icon_noname_256x256x32.png'], 'iconfile': 'icons/openstereo_icon_noname.icns', } setup( app=APP, data_files=DATA_FILES, options={'py2app': OPTIONS}, setup_requires=['py2app'], ) -- Prof. Carlos Henrique Grohmann - Geologist D.Sc. Institute of Geosciences - Univ. of S?o Paulo, Brazil --- http://www.igc.usp.br/pessoais/guano http://digitalelevation.wordpress.com/ http://lattes.cnpq.br/5846052449613692 (CV) --- Twitter: @CarlosGrohmann http://carlosgrohmann.tumblr.com/ ________________ Can?t stop the signal. From ronaldoussoren at mac.com Thu Mar 8 01:59:48 2012 From: ronaldoussoren at mac.com (Ronald Oussoren) Date: Wed, 07 Mar 2012 16:59:48 -0800 Subject: [Pythonmac-SIG] (re)newbie py2app question In-Reply-To: References: Message-ID: <17D33888-D890-4C73-9931-DD5962BF1831@mac.com> On 4 Mar, 2012, at 12:18, Charles Hartman wrote: > I'm just coming back to programming after years, trying to recompile an old program that works but needs updating and expansion. I'm now on OS 10.6.8, Python 2.7.2, with wxPython (64/32bit). My newly installed py2app is: py2app-0.6.4-py2.7.egg. All of these were in earlier versions when I last packaged the program with py2app. > > In Console, the errors seem to be of two kinds. There's a long list of ScriptingAdditions messages about missing architectures. Before that, there's this: > [0x0-0x1bcfbce].org.pythonmac.unspecified.PyProse[87375] NameError: global name 'self' is not defined > > That seems to be in a module of the program that certainly did work before. I can debug the program in WingIDE, I get no problems or errors (except maybe the ScriptingAdditions ones) when I run it there. > > Have I forgotten something simple? Has something changed that I missed? You could try to run the application from Terminal.app, for an app named Foo.app you'd run /path/to/Foo.app/Contents/MacOS/Foo (where /path/to is the directory containing Foo.app). That way errors get printed to the Terminal window instead of in the console log, that way you should be able to see more information and probably also a Python traceback for the NameError, which will hopefully help in locating the source of the problem. Ronald > > Thanks for any help. > > -- > > Charles O. Hartman > Poet in Residence > Lucy Marsh Haskell '19 Professor of Literatures in English > oak.conncoll.edu/cohar > > _______________________________________________ > 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: 4788 bytes Desc: not available URL: From christian at prinoth.name Thu Mar 8 16:05:47 2012 From: christian at prinoth.name (Christian Prinoth) Date: Thu, 8 Mar 2012 16:05:47 +0100 Subject: [Pythonmac-SIG] appscript dead? Message-ID: Hi, I just learned that appscript development has been halted. I use it a lot, especially in scripts that automate interactions between Office and various other aspects of OSX. Does anyone know if there is any alternative coming up? More generally, is there an official Apple roadmap on scripting in OSX? Thanks -- Christian Prinoth -------------- next part -------------- An HTML attachment was scrubbed... URL: From kw at codebykevin.com Thu Mar 8 16:57:24 2012 From: kw at codebykevin.com (Kevin Walzer) Date: Thu, 08 Mar 2012 10:57:24 -0500 Subject: [Pythonmac-SIG] appscript dead? In-Reply-To: References: Message-ID: <4F58D6E4.6030905@codebykevin.com> On 3/8/12 10:05 AM, Christian Prinoth wrote: > Hi, > ? I just learned that appscript development has been halted. I use it a > lot, especially in scripts that automate interactions between Office and > various other aspects of OSX. Does anyone know if there is any > alternative coming up? > More generally, is there an official Apple roadmap on scripting in OSX? > First, a caveat: while I haven't used the appscript library for its most popular use case (sending Apple Events to other scriptable apps from Python), I have made extensive use of has' work in making my own Python apps scriptable (via the "aemreceive" module in the appscript source tree), and I've also done some low-level work in modernizing bindings for AppleScript via another scripting language (Tcl). As I understand it, has decided to halt appscript development because Apple has recently categorized the low-level AppleEvent API's that appscript depends on as "legacy" API's. See this post in the "applescript-implementors" mailing list for details: http://lists.apple.com/archives/applescript-implementors/2010/Jan/msg00044.html Out of an abundance of caution, has now discourages use of appscript for new projects: "As appscript cannot be ported to the Apple-sanctioned Cocoa APIs, all cautions and caveats that apply to legacy OS X APIs effectively apply to appscript as well." I understand his caution, but I think you are still perfectly safe in using appscript, even going forward, as long as you are comfortable with using it as an essentially complete and mature library that will not undergo further development, in part because it no longer needs much refinement. My more positive assessment of the status of the Apple Events API rests, in part, on the language that the Apple engineer in the link above uses to describe it: "legacy," "superseded," but NOT the kiss of death: "deprecated." "Deprecated" means that Apple has marked the API not only for no further development, but eventual removal from the system. "Superseded" and "legacy" are a bit different in their emphasis: as I read them, they are older API's that are no longer promoted or developed much, but are not going to be removed in part because they are too foundational/critical to the system. As the Apple developer in the link above points out, the older "legacy" API's are still the basis of the shiny new Cocoa-based API's that Apple is now promoting for Apple Events. Apple is trying to steer developers to the newer API's for common functions, but the older, "legacy" API's are still there because they are the foundation for everything else. I've done some work with those low-level API's, and they are not fun to work with. If I were a Cocoa developer I would definitely use the higher-level stuff. But to *implement* the higher-level stuff (whether it is appscript, a more Cocoa-centric approach to Apple Events, or Tclapplescript, the library I've worked on), sometimes it's necessary to get your hands dirty with the low-level bits. The biggest risk of calling these API's "legacy" is that eventually fewer developers will understand how they work, and there will be less innovation along the lines of appscript. That's a real concern, but it still falls short of active deprecation and removal by Apple. To bring this back to your specific questions: 1. I am not aware of any significant change to AppleScript coming up. It's still there and still promoted by Apple. 2. Apple typically doesn't release a "roadmap" unless they are *actively* trying to steer developers in a specific direction. Removing 64-bit support from Carbon is an example of this. Marking the AppleEvent API as "legacy" is not, in my view. 3. There's no real alternative to appscript in Python, unless you shift to running AppleScripts via a shell command (osascript) or use one of the "approved" Cocoa API's via PyObjC. I'm not sure either of these approaches buys you anything that appscript does not. Hope this helps, Kevin -- Kevin Walzer Code by Kevin http://www.codebykevin.com From kw at codebykevin.com Fri Mar 9 03:38:50 2012 From: kw at codebykevin.com (Kevin Walzer) Date: Thu, 08 Mar 2012 21:38:50 -0500 Subject: [Pythonmac-SIG] shrink app bundle size (removing unused stuff)? In-Reply-To: References: Message-ID: <4F596D3A.3010004@codebykevin.com> On 3/7/12 6:09 PM, Carlos Grohmann wrote: > Hi there, > > I've been reasonably successful in building an app bundle with py2app. > I'm running OS X Lion, python 2.7.2 (from python.org), wxpython > 2.9beta, and my app > uses matplotlib and numpy. > > Using py2exe, the final folder has 14MB, or 11MB compressed. > > Using py2app, the .app has 250MB (!) or 100MB compressed with Disk utility > > Examining the Contents of the .app, I can see that there's A LOT of > stuff I don't need, > like Editra (11MB), Locales, or Matplotlib "tests" folder (38MB) > > So, how could I remove these itens from my app? > I tried the 'excludes' option in py2app setup.py, but without any luck. > > Also, what are those "codecs" in lib-dynload? I have no idea what they are. > > my setup.py follows. (BTW, I tried to run it without any reference to > 'wx' but then > the app crashes) > > many thanks > > Carlos > I hope this isn't stating the obvious, but how about simply removing the unwanted bits after running setup.py? I run my py2app builds from a shell script because I have to do some additional manipulation of the app bundle. Here's an excerpt from my build script: #!/bin/sh echo "Starting dist process..." if [ -a cbk/Phynchronicity.dmg ] then rm cbk/Phynchronicity.dmg fi if [ -a cbk/Phynchronicity.app ] then rm -rf cbk/Phynchronicity.app fi python2.7 setup.py py2app mkdir dist/Phynchronicity.app/Contents/lib #copy the supporting libraries for lib in libs/* do echo "Copying $lib library..." cp -R -f $lib dist/Phynchronicity.app/Contents/lib done cp -rf dist/Phynchronicity.app cbk/Phynchronicity.app ditto --rsrc --arch i386 --arch x86_64 cbk/Phynchronicity.app cbk/Phynchronicity_intel.app rm -rf cbk/Phynchronicity.app mv cbk/Phynchronicity_intel.app cbk/Phynchronicity.app ...and so on. Hope this helps, Kevin -- Kevin Walzer Code by Kevin http://www.codebykevin.com From ronaldoussoren at mac.com Fri Mar 9 05:43:32 2012 From: ronaldoussoren at mac.com (Ronald Oussoren) Date: Thu, 08 Mar 2012 20:43:32 -0800 Subject: [Pythonmac-SIG] shrink app bundle size (removing unused stuff)? In-Reply-To: References: Message-ID: <627ECE2F-C19D-4BFB-97B1-F0D882FA2B3E@mac.com> On 7 Mar, 2012, at 15:09, Carlos Grohmann wrote: > Hi there, > > I've been reasonably successful in building an app bundle with py2app. > I'm running OS X Lion, python 2.7.2 (from python.org), wxpython > 2.9beta, and my app > uses matplotlib and numpy. > > Using py2exe, the final folder has 14MB, or 11MB compressed. > > Using py2app, the .app has 250MB (!) or 100MB compressed with Disk utility > > Examining the Contents of the .app, I can see that there's A LOT of > stuff I don't need, > like Editra (11MB), Locales, or Matplotlib "tests" folder (38MB) matplatlib is included as is because it won't work when you include only the bits that are referenced in the "import" graph, I'll check how hard it will be to exclude the tests in this copy. The only editra I could find was which is an editor, I don't know why that gets copied into your application. How did you install Editra, did you use the binary DMG on the website, or did you install from source? I don't know what "Locales" is at all. Is there a python package on your system that is named "Locales"? > > So, how could I remove these itens from my app? > I tried the 'excludes' option in py2app setup.py, but without any luck. That this didn't work for matplotlib is expected, a py2app recipe for matplotlib overrides your exclude option. > > Also, what are those "codecs" in lib-dynload? I have no idea what they are. The codecs are the stdlib support for translating between bytestrings and unicode in various encodings. These are implicitly imported when you use the codecs module (either directory or through somestring.decoe("encoding"). Py2app cannot detect if you do this and therefore conservatively includes all encodings just in case they are needed. Adding a way to specify which encodings should be included would be nice, I'm not sure when I'll get around to implementing this. > > my setup.py follows. (BTW, I tried to run it without any reference to > 'wx' but then > the app crashes) Can you reproduce this using a smaller example? BTW. Are you trying to package this OpenStereo: http://www.igc.usp.br/index.php?id=openstereo. If so, I can try to reproduce the issue on my machine. Ronald > > many thanks > > Carlos > > > > > > from setuptools import setup > from glob import glob > > import shutil > shutil.rmtree("build", ignore_errors=True) > shutil.rmtree("dist", ignore_errors=True) > > APPNAME = 'OpenStereo' > APP = ['resources/OpenStereo.py'] > VERSION = '0.1.2g' # must be in X.X.X format > > DATA_FILES = ['license/gpl-3.0.txt'] #[glob(r'resources/*')] > > OPTIONS = { > 'plist':dict( > CFBundleName = 'OpenStereo', > CFBundleShortVersionString = VERSION, > CFBundleVersion = VERSION, > CFBundleGetInfoString = 'OpenStereo, Open-Source > Structural Geology Analysis', > CFBundleExecutable = 'OpenStereo', > CFBundleIdentifier = "br.usp.igc", > NSHumanReadableCopyright = 'Carlos H. Grohmann'), > > 'argv_emulation': True, > 'optimize': 1, > 'compressed': True, > 'strip': True, > 'semi_standalone': False, > 'packages': ['wx'], > 'dylib_excludes': ['Tcl.framework','Tk.framework'], > 'resources': ['icons/openstereo_icon_noname_256x256x32.png'], > 'iconfile': 'icons/openstereo_icon_noname.icns', > } > > setup( > app=APP, > data_files=DATA_FILES, > options={'py2app': OPTIONS}, > setup_requires=['py2app'], > ) > > > > > > > -- > Prof. Carlos Henrique Grohmann - Geologist D.Sc. > Institute of Geosciences - Univ. of S?o Paulo, Brazil > --- > http://www.igc.usp.br/pessoais/guano > http://digitalelevation.wordpress.com/ > http://lattes.cnpq.br/5846052449613692 (CV) > --- > Twitter: @CarlosGrohmann > http://carlosgrohmann.tumblr.com/ > ________________ > Can?t stop the signal. > _______________________________________________ > 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: 4788 bytes Desc: not available URL: From chris.barker at noaa.gov Fri Mar 9 07:51:04 2012 From: chris.barker at noaa.gov (Chris Barker) Date: Thu, 8 Mar 2012 22:51:04 -0800 Subject: [Pythonmac-SIG] shrink app bundle size (removing unused stuff)? In-Reply-To: <627ECE2F-C19D-4BFB-97B1-F0D882FA2B3E@mac.com> References: <627ECE2F-C19D-4BFB-97B1-F0D882FA2B3E@mac.com> Message-ID: > The only editra I could find was which is an editor, I don't know why that gets copied into your application. How did you install Editra, did you use the binary DMG on the website, or did you install from source? Editra is shipped with wxPython -- so it may have snuck in that way. But I agree with Kevin, while the more we can clean this up with py2app, it's an imperfect system -- I"ve generally ended with some custom code to clean things out a bit after a build -- I write mine in Python, and put it at the end of the setup.py, but the idea is the same. -Chris > I don't know what "Locales" is at all. Is there a python package on ?your system that is named "Locales"? > >> >> So, how could I remove these itens from my app? >> I tried the 'excludes' option in py2app setup.py, but without any luck. > > That this didn't work for matplotlib is expected, a py2app recipe for matplotlib overrides your exclude option. >> >> Also, what are those "codecs" in lib-dynload? I have no idea what they are. > > The codecs are the stdlib support for translating between bytestrings and unicode in various encodings. ?These are implicitly imported when you use the codecs module (either directory or through somestring.decoe("encoding"). ?Py2app cannot detect if you do this and therefore conservatively includes all encodings just in case they are needed. ?Adding a way to specify which encodings should be included would be nice, I'm not sure when I'll get around to implementing this. > >> >> my setup.py follows. (BTW, I tried to run it without any reference to >> 'wx' but then >> the app crashes) > > Can you reproduce this using a smaller example? > > BTW. Are you trying to package this OpenStereo: http://www.igc.usp.br/index.php?id=openstereo. If so, I can try to reproduce the issue on my machine. > > Ronald > >> >> many thanks >> >> Carlos >> >> >> >> >> >> from setuptools import setup >> from glob import glob >> >> import shutil >> shutil.rmtree("build", ignore_errors=True) >> shutil.rmtree("dist", ignore_errors=True) >> >> APPNAME = 'OpenStereo' >> APP = ['resources/OpenStereo.py'] >> VERSION = '0.1.2g' # must be in X.X.X format >> >> DATA_FILES = ['license/gpl-3.0.txt'] #[glob(r'resources/*')] >> >> OPTIONS = { >> ? ? ? ? ? ?'plist':dict( >> ? ? ? ? ? ?CFBundleName ? ? ? ? ? ? ? ?= 'OpenStereo', >> ? ? ? ? ? ?CFBundleShortVersionString ?= VERSION, >> ? ? ? ? ? ?CFBundleVersion ? ? ? ? ? ? = VERSION, >> ? ? ? ? ? ?CFBundleGetInfoString ? ? ? = 'OpenStereo, Open-Source >> Structural Geology Analysis', >> ? ? ? ? ? ?CFBundleExecutable ? ? ? ? ?= 'OpenStereo', >> ? ? ? ? ? ?CFBundleIdentifier ? ? ? ? ?= "br.usp.igc", >> ? ? ? ? ? ?NSHumanReadableCopyright ? ?= 'Carlos H. Grohmann'), >> >> ? ? ? ? ? ?'argv_emulation': True, >> ? ? ? ? ? ?'optimize': 1, >> ? ? ? ? ? ?'compressed': True, >> ? ? ? ? ? ?'strip': True, >> ? ? ? ? ? ?'semi_standalone': False, >> ? ? ? ? ? ?'packages': ['wx'], >> ? ? ? ? ? ?'dylib_excludes': ['Tcl.framework','Tk.framework'], >> ? ? ? ? ? ?'resources': ['icons/openstereo_icon_noname_256x256x32.png'], >> ? ? ? ? ? ?'iconfile': 'icons/openstereo_icon_noname.icns', >> ? ? ? ? ? ?} >> >> setup( >> ? ?app=APP, >> ? ?data_files=DATA_FILES, >> ? ?options={'py2app': OPTIONS}, >> ? ?setup_requires=['py2app'], >> ) >> >> >> >> >> >> >> -- >> Prof. Carlos Henrique Grohmann - Geologist D.Sc. >> Institute of Geosciences - Univ. of S?o Paulo, Brazil >> --- >> http://www.igc.usp.br/pessoais/guano >> http://digitalelevation.wordpress.com/ >> http://lattes.cnpq.br/5846052449613692 (CV) >> --- >> Twitter: @CarlosGrohmann >> http://carlosgrohmann.tumblr.com/ >> ________________ >> Can?t stop the signal. >> _______________________________________________ >> 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 > > > _______________________________________________ > 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 > -- 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 ronaldoussoren at mac.com Fri Mar 9 16:22:07 2012 From: ronaldoussoren at mac.com (Ronald Oussoren) Date: Fri, 09 Mar 2012 07:22:07 -0800 Subject: [Pythonmac-SIG] shrink app bundle size (removing unused stuff)? In-Reply-To: References: <627ECE2F-C19D-4BFB-97B1-F0D882FA2B3E@mac.com> Message-ID: <6D937BAF-5208-4529-BF05-DEC8C3E0F87F@mac.com> On 8 Mar, 2012, at 22:51, Chris Barker wrote: >> The only editra I could find was which is an editor, I don't know why that gets copied into your application. How did you install Editra, did you use the binary DMG on the website, or did you install from source? > > Editra is shipped with wxPython -- so it may have snuck in that way. > > But I agree with Kevin, while the more we can clean this up with > py2app, it's an imperfect system -- I"ve generally ended with some > custom code to clean things out a bit after a build -- I write mine in > Python, and put it at the end of the setup.py, but the idea is the > same. Py2app will never be able to do everything, but I'd prefer to get closer than we're currently. Are there things you have to do every time that could (easily) be expressed as configuration for py2app? It seems that python is slowly moving towards a more declarative way of specifying builds using a setup.cfg file instead of setup.py though the distutils2/packaging project and py2app should do the same when that happens (without dropping support for setup.py files of course). Ronald -------------- next part -------------- A non-text attachment was scrubbed... Name: smime.p7s Type: application/pkcs7-signature Size: 4788 bytes Desc: not available URL: From carlos.grohmann at gmail.com Fri Mar 9 19:55:01 2012 From: carlos.grohmann at gmail.com (Carlos Grohmann) Date: Fri, 9 Mar 2012 15:55:01 -0300 Subject: [Pythonmac-SIG] shrink app bundle size (removing unused stuff)? In-Reply-To: <6D937BAF-5208-4529-BF05-DEC8C3E0F87F@mac.com> References: <627ECE2F-C19D-4BFB-97B1-F0D882FA2B3E@mac.com> <6D937BAF-5208-4529-BF05-DEC8C3E0F87F@mac.com> Message-ID: I think that if the 'excludes' weren't overwritten by the wx/numpy/matplotlib/etc recipes, it would be easier to fine-tune our options (maybe run the recipes first and aftrer run the excludes?) best Carlos On Fri, Mar 9, 2012 at 12:22, Ronald Oussoren wrote: > > On 8 Mar, 2012, at 22:51, Chris Barker wrote: > >>> The only editra I could find was which is an editor, I don't know why that gets copied into your application. How did you install Editra, did you use the binary DMG on the website, or did you install from source? >> >> Editra is shipped with wxPython -- so it may have snuck in that way. >> >> But I agree with Kevin, while the more we can clean this up with >> py2app, it's an imperfect system -- I"ve generally ended with some >> custom code to clean things out a bit after a build -- I write mine in >> Python, and put it at the end of the setup.py, but the idea is the >> same. > > Py2app will never be able to do everything, but I'd prefer to get closer than we're currently. Are there things you have to do every time that could (easily) be expressed as configuration for py2app? ?It seems that python is slowly moving towards a more declarative way of specifying builds using a setup.cfg file instead of setup.py though the distutils2/packaging project and py2app should do the same when that happens (without dropping support for setup.py files of course). > > Ronald > -- Prof. Carlos Henrique Grohmann - Geologist D.Sc. Institute of Geosciences - Univ. of S?o Paulo, Brazil --- http://www.igc.usp.br/pessoais/guano http://digitalelevation.wordpress.com/ http://lattes.cnpq.br/5846052449613692 (CV) --- Twitter: @CarlosGrohmann http://carlosgrohmann.tumblr.com/ ________________ Can?t stop the signal. From ronaldoussoren at mac.com Sat Mar 10 01:33:56 2012 From: ronaldoussoren at mac.com (Ronald Oussoren) Date: Fri, 09 Mar 2012 16:33:56 -0800 Subject: [Pythonmac-SIG] shrink app bundle size (removing unused stuff)? In-Reply-To: References: <627ECE2F-C19D-4BFB-97B1-F0D882FA2B3E@mac.com> <6D937BAF-5208-4529-BF05-DEC8C3E0F87F@mac.com> Message-ID: <2C581688-25B4-428E-8922-80405D46214B@mac.com> On 9 Mar, 2012, at 10:55, Carlos Grohmann wrote: > I think that if the 'excludes' weren't overwritten by the > wx/numpy/matplotlib/etc recipes, it would be easier to fine-tune our > options (maybe run the recipes first and aftrer run the excludes?) The matplotlib issue seems to be a bug that's not related to recipes: py2app copies package data into the application bundle, and this code accidently also copied all subpackages like the matplotlib.test package. I have a patch, but need to test if this actually fixes the bug before I commit. Ronald -------------- next part -------------- A non-text attachment was scrubbed... Name: smime.p7s Type: application/pkcs7-signature Size: 4788 bytes Desc: not available URL: From ronaldoussoren at mac.com Sat Mar 10 18:03:33 2012 From: ronaldoussoren at mac.com (Ronald Oussoren) Date: Sat, 10 Mar 2012 09:03:33 -0800 Subject: [Pythonmac-SIG] shrink app bundle size (removing unused stuff)? In-Reply-To: References: <627ECE2F-C19D-4BFB-97B1-F0D882FA2B3E@mac.com> <6D937BAF-5208-4529-BF05-DEC8C3E0F87F@mac.com> <2C581688-25B4-428E-8922-80405D46214B@mac.com> Message-ID: <833CEF13-0EC5-4C02-9B75-F15941B27657@mac.com> On 10 Mar, 2012, at 8:47, Ronald Oussoren wrote: > With this the application bundle already shrinks a little (curently 123 MByte, before I started it was about 160 MByte). About 70 Mbyte of this is wx itself (the wxWidgets library and wxPython extensions). Another 21 MByte is because all of numpy is included, not just the bits that are actually needed. That's because of another py2app recipe which can hopefully be improved. BTW. The size of the binaries is at least partially due to the support for multiple architectures, the python installer contains support for two architectures and wx even includes support for 3 different architectures. Ronald -------------- next part -------------- A non-text attachment was scrubbed... Name: smime.p7s Type: application/pkcs7-signature Size: 4788 bytes Desc: not available URL: From ronaldoussoren at mac.com Sat Mar 10 17:47:25 2012 From: ronaldoussoren at mac.com (Ronald Oussoren) Date: Sat, 10 Mar 2012 08:47:25 -0800 Subject: [Pythonmac-SIG] shrink app bundle size (removing unused stuff)? In-Reply-To: <2C581688-25B4-428E-8922-80405D46214B@mac.com> References: <627ECE2F-C19D-4BFB-97B1-F0D882FA2B3E@mac.com> <6D937BAF-5208-4529-BF05-DEC8C3E0F87F@mac.com> <2C581688-25B4-428E-8922-80405D46214B@mac.com> Message-ID: On 9 Mar, 2012, at 16:33, Ronald Oussoren wrote: > > On 9 Mar, 2012, at 10:55, Carlos Grohmann wrote: > >> I think that if the 'excludes' weren't overwritten by the >> wx/numpy/matplotlib/etc recipes, it would be easier to fine-tune our >> options (maybe run the recipes first and aftrer run the excludes?) > > The matplotlib issue seems to be a bug that's not related to recipes: py2app copies package data into the application bundle, and this code accidently also copied all subpackages like the matplotlib.test package. I have a patch, but need to test if this actually fixes the bug before I commit. It didn't, but I did make some progress: 1) I added a py2app recipe that does the right thing with the pubsub library in wxPython. That library uses __path__ hacks and that confuses modulegraph (and hence py2app). Because of this you no longer have to explicitly include 'wx' in the application bundle 2) I tweaked the matplotlib recipe in py2app, it no longer copies the entire package but adds a hook to tell matplotlib where its data is. This solution is not fully complete yet, I'm currently including mpl-data twice (once in Resources, once in site-packages.zip) and the later copy is not needed. With this the application bundle already shrinks a little (curently 123 MByte, before I started it was about 160 MByte). About 70 Mbyte of this is wx itself (the wxWidgets library and wxPython extensions). Another 21 MByte is because all of numpy is included, not just the bits that are actually needed. That's because of another py2app recipe which can hopefully be improved. I just pushed updates to modulegraph and py2app to my bitbucket repositories. Ronald > > Ronald > > _______________________________________________ > 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: 4788 bytes Desc: not available URL: From chris.barker at noaa.gov Sun Mar 11 00:02:06 2012 From: chris.barker at noaa.gov (Chris Barker) Date: Sat, 10 Mar 2012 15:02:06 -0800 Subject: [Pythonmac-SIG] shrink app bundle size (removing unused stuff)? In-Reply-To: <6D937BAF-5208-4529-BF05-DEC8C3E0F87F@mac.com> References: <627ECE2F-C19D-4BFB-97B1-F0D882FA2B3E@mac.com> <6D937BAF-5208-4529-BF05-DEC8C3E0F87F@mac.com> Message-ID: On Fri, Mar 9, 2012 at 7:22 AM, Ronald Oussoren > Py2app will never be able to do everything, but I'd prefer to get closer than we're currently. A laudable goal, for sure -- and we much appreciate your work on py2app. > Are there things you have to do every time that could > (easily) be expressed as configuration for py2app? As suggested, 'include', 'excludes', and 'packages' could perhaps be more robust. I haven't checked recently -- have you fixed the issue where you had to explicitly include the parent package when you want to includ ea sub-package? ie. you want to be able to : import libA.libB (but nothing else in libA) IN the past, I've had to do: packages = ['libA', 'libA.libB'] ANother major thought: I've thought that maybe we need a way to build a module graph from run-time information, rather than code inspection -- that would address both: importing packages you don't need and fancy dynamic imports. The trick is that you'd need to have a way to run your code that guaranteed that eveything ws imported that might be needed (i.e. dynamci import), but it seems that you'd want test code that did that anyway. I may be missing something, but it seems all you'd need to do is look at sys.modules, and write out a modulegraph (or would it even need to be graph? a simple list would do...) Then Py2app would need a way to load the modulegraph (or list) from a file. Even without a runtime inspector -- this could be handy as you could: 1) only re-run the code inspection part when you knew you'd added a module, rather than on every build 2) you could tweak the module graph by hand and re-use it, rather than tweaking the resulting package. Anyway, maybe too much architectural work for now... > 1) I added a py2app recipe that does the right thing > with the pubsub library in wxPython. That library uses > __path__ hacks and that confuses modulegraph (and > hence py2app). Because of this you no longer have to > explicitly include 'wx' in the application bundle Very nice! I happen to need that for a project right now. > 2) I tweaked the matplotlib recipe in py2app, it no > longer copies the entire package but adds a hook to > tell matplotlib where its data is. This solution is not fully > complete yet, I'm currently including mpl-data twice > (once in Resources, once in site-packages.zip) and > the later copy is not needed. also nice -- did you use: matplotlib.get_py2exe_datafiles() That is handy for py2exe. Thanks for you work... -Chris ?It seems that python is slowly moving towards a more declarative way of specifying builds using a setup.cfg file instead of setup.py though the distutils2/packaging project and py2app should do the same when that happens (without dropping support for setup.py files of course). > > Ronald > -- 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 Sun Mar 11 00:05:08 2012 From: chris.barker at noaa.gov (Chris Barker) Date: Sat, 10 Mar 2012 15:05:08 -0800 Subject: [Pythonmac-SIG] PyCon.. In-Reply-To: References: Message-ID: On Tue, Feb 14, 2012 at 7:23 AM, Ned Deily wrote: > I'm planning to sprint through Thursday. ? I've added a > Mac OS X Support > project to the PyCon sprint page. ?Feel free to add topics and add > yourself. ?Hope to see you all there! I"ve seen neither you nor Ronald yet... I'm here(there) Monday -- not suer what I'm sprinting on yet -- any ideas what you'd like to do for MacPython? I do note that there are a LOT of macs here -- but darn few MacPython folks -- I suppose most of them use it like *nix, and don't need/want anything mac-specific. -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 ronaldoussoren at mac.com Sun Mar 11 01:56:26 2012 From: ronaldoussoren at mac.com (Ronald Oussoren) Date: Sat, 10 Mar 2012 16:56:26 -0800 Subject: [Pythonmac-SIG] PyCon.. In-Reply-To: References: Message-ID: <361BD72C-FF53-45CD-8A38-44582E607180@mac.com> On 10 Mar, 2012, at 15:05, Chris Barker wrote: > On Tue, Feb 14, 2012 at 7:23 AM, Ned Deily wrote: > >> I'm planning to sprint through Thursday. I've added a > Mac OS X Support >> project to the PyCon sprint page. Feel free to add topics and add >> yourself. Hope to see you all there! > > I"ve seen neither you nor Ronald yet... Both of us are here. I'm currently in the mailman 3 session. > > I'm here(there) Monday -- not suer what I'm sprinting on yet -- any > ideas what you'd like to do for MacPython? I won't sprint myself, but Ned has a list. From the top of my head: * distutils/packaging needs some work to deal with recent Xcodes, and possibly OSX 10.8 * add support for liblzma to the build script for the osx installer (this in seems to be trivial, my limited testing of the xz package seems to indicate that it will build a universal binary without using lipo) * possibly add openssl to the installer as Apple's copy is not up-to-date and contains bugs that users have run into * default MACOSX_DEPLOYMENT_TARGET should be the OS release of the build machine, that is less confusing for users * needs work If you don't mind wading through distutils-related code: there are a number of open issues on the py2app bugtracker > > I do note that there are a LOT of macs here -- but darn few MacPython > folks -- I suppose most of them use it like *nix, and don't need/want > anything mac-specific. There have always been a lot of macs at technical conferences, but this year there are even more than usual. Ronald -------------- next part -------------- A non-text attachment was scrubbed... Name: smime.p7s Type: application/pkcs7-signature Size: 4788 bytes Desc: not available URL: From ronaldoussoren at mac.com Sun Mar 11 01:46:31 2012 From: ronaldoussoren at mac.com (Ronald Oussoren) Date: Sat, 10 Mar 2012 16:46:31 -0800 Subject: [Pythonmac-SIG] shrink app bundle size (removing unused stuff)? In-Reply-To: References: <627ECE2F-C19D-4BFB-97B1-F0D882FA2B3E@mac.com> <6D937BAF-5208-4529-BF05-DEC8C3E0F87F@mac.com> Message-ID: <204A9529-52AA-4F27-BA2F-E2E00B5F7468@mac.com> On 10 Mar, 2012, at 15:02, Chris Barker wrote: >> 2) I tweaked the matplotlib recipe in py2app, it no >> longer copies the entire package but adds a hook to >> tell matplotlib where its data is. This solution is not fully >> complete yet, I'm currently including mpl-data twice >> (once in Resources, once in site-packages.zip) and >> the later copy is not needed. > > also nice -- did you use: > > matplotlib.get_py2exe_datafiles() That seemed to have assumptions about how py2exe bundles applications. I currently set and environment variable in the bootstrap module and that seems to work fine. Ronald -------------- next part -------------- A non-text attachment was scrubbed... Name: smime.p7s Type: application/pkcs7-signature Size: 4788 bytes Desc: not available URL: From njriley at illinois.edu Sun Mar 11 03:03:02 2012 From: njriley at illinois.edu (Nicholas Riley) Date: Sat, 10 Mar 2012 21:03:02 -0500 Subject: [Pythonmac-SIG] PyCon.. In-Reply-To: <361BD72C-FF53-45CD-8A38-44582E607180@mac.com> References: <361BD72C-FF53-45CD-8A38-44582E607180@mac.com> Message-ID: <20120311020302.GA31488@illinois.edu> On Sat, Mar 10, 2012 at 04:56:26PM -0800, Ronald Oussoren wrote: > > On 10 Mar, 2012, at 15:05, Chris Barker wrote: > > > On Tue, Feb 14, 2012 at 7:23 AM, Ned Deily wrote: > > > >> I'm planning to sprint through Thursday. I've added a > Mac OS X Support > >> project to the PyCon sprint page. Feel free to add topics and add > >> yourself. Hope to see you all there! I'm at PyCon (with a laptop/external drive that has 10.6, 10.7 and 10.8 installed, so I can do some testing across OSes) and should be able to spend a day or two sprinting on MacPython. -- Nicholas Riley From nad at acm.org Sun Mar 11 07:57:02 2012 From: nad at acm.org (Ned Deily) Date: Sat, 10 Mar 2012 22:57:02 -0800 Subject: [Pythonmac-SIG] PyCon.. References: <361BD72C-FF53-45CD-8A38-44582E607180@mac.com> <20120311020302.GA31488@illinois.edu> Message-ID: In article <20120311020302.GA31488 at illinois.edu>, Nicholas Riley wrote: > On Sat, Mar 10, 2012 at 04:56:26PM -0800, Ronald Oussoren wrote: > > On 10 Mar, 2012, at 15:05, Chris Barker wrote: > > > On Tue, Feb 14, 2012 at 7:23 AM, Ned Deily wrote: > > >> I'm planning to sprint through Thursday. I've added a > Mac OS X > > >> Support > > >> project to the PyCon sprint page. Feel free to add topics and add > > >> yourself. Hope to see you all there! > I'm at PyCon (with a laptop/external drive that has 10.6, 10.7 and > 10.8 installed, so I can do some testing across OSes) and should be > able to spend a day or two sprinting on MacPython. Great! Thanks, Ronald, for the summary. The highest-priority items I think are to get Python 3.3 ready for release and to have more robust solutions (for 3.2 and 2.7, as well at 3.3) for extension module building with the multiple Xcode versions for 10.6+. But there are plenty of open issues to work on and, for 3.3, potential new features. For anyone who is interested, it would be great if you could attend the "Intro to Sprints" session at 4:30p following the Sunday afternoon Lightning Talks to find out more about the logistics. Otherwise, contact me directly. I believe the sprint space will be available in the adjacent Hyatt from Monday through Thursday. -- Ned Deily, nad at acm.org From ronaldoussoren at mac.com Sun Mar 11 16:48:50 2012 From: ronaldoussoren at mac.com (Ronald Oussoren) Date: Sun, 11 Mar 2012 08:48:50 -0700 Subject: [Pythonmac-SIG] PyCon.. In-Reply-To: References: <361BD72C-FF53-45CD-8A38-44582E607180@mac.com> <20120311020302.GA31488@illinois.edu> Message-ID: <44222702-E35D-4F51-BCB9-2A6F6E9438C1@mac.com> On 10 Mar, 2012, at 22:57, Ned Deily wrote: > In article <20120311020302.GA31488 at illinois.edu>, > Nicholas Riley wrote: >> On Sat, Mar 10, 2012 at 04:56:26PM -0800, Ronald Oussoren wrote: >>> On 10 Mar, 2012, at 15:05, Chris Barker wrote: >>>> On Tue, Feb 14, 2012 at 7:23 AM, Ned Deily wrote: >>>>> I'm planning to sprint through Thursday. I've added a > Mac OS X >>>>> Support >>>>> project to the PyCon sprint page. Feel free to add topics and add >>>>> yourself. Hope to see you all there! >> I'm at PyCon (with a laptop/external drive that has 10.6, 10.7 and >> 10.8 installed, so I can do some testing across OSes) and should be >> able to spend a day or two sprinting on MacPython. > > Great! > > Thanks, Ronald, for the summary. The highest-priority items I think > are to get Python 3.3 ready for release One thing to look into w.r.t. is to look at the new functions in the os/posix module (and possibly other extension modules as well) 1) Do or could these work on OSX 2) How does the affect the installer, in particular w.r.t. symbols available on the build machine but not on earlier OSX releases. Posixmodule.c already contains some code to deal with this for a number of functions. Issue 1404 is about adding a monotonic timer to the OSX port, with the same interface as is used for the linux port. Ronald -------------- next part -------------- A non-text attachment was scrubbed... Name: smime.p7s Type: application/pkcs7-signature Size: 4788 bytes Desc: not available URL: From chris.barker at noaa.gov Sun Mar 11 23:21:20 2012 From: chris.barker at noaa.gov (Chris Barker) Date: Sun, 11 Mar 2012 15:21:20 -0700 Subject: [Pythonmac-SIG] PyCon.. In-Reply-To: <44222702-E35D-4F51-BCB9-2A6F6E9438C1@mac.com> References: <361BD72C-FF53-45CD-8A38-44582E607180@mac.com> <20120311020302.GA31488@illinois.edu> <44222702-E35D-4F51-BCB9-2A6F6E9438C1@mac.com> Message-ID: A note about sprint topics: One of the things we might want to work on is docs. There is also a sprint on: Python-Guide.org The Mac-OS-X page essentially tels folks that they should install homebrew, and then build eveything from there (plus Distribute and virtualenv). I'm not convinced that that's the best option for all users (though probably a good one for ex-*nix folks) Anyway, we might want to work on that page some... -Chris On Sun, Mar 11, 2012 at 8:48 AM, Ronald Oussoren wrote: > > On 10 Mar, 2012, at 22:57, Ned Deily wrote: > >> In article <20120311020302.GA31488 at illinois.edu>, >> Nicholas Riley wrote: >>> On Sat, Mar 10, 2012 at 04:56:26PM -0800, Ronald Oussoren wrote: >>>> On 10 Mar, 2012, at 15:05, Chris Barker wrote: >>>>> On Tue, Feb 14, 2012 at 7:23 AM, Ned Deily wrote: >>>>>> I'm planning to sprint through Thursday. ? I've added a > Mac OS X >>>>>> Support >>>>>> project to the PyCon sprint page. ?Feel free to add topics and add >>>>>> yourself. ?Hope to see you all there! >>> I'm at PyCon (with a laptop/external drive that has 10.6, 10.7 and >>> 10.8 installed, so I can do some testing across OSes) and should be >>> able to spend a day or two sprinting on MacPython. >> >> Great! >> >> Thanks, Ronald, for the summary. ? The highest-priority items I think >> are to get Python 3.3 ready for release > > One thing to look into w.r.t. is to look at the new functions in the os/posix module (and possibly other extension modules as well) > > 1) Do or could these work on OSX > > 2) How does the affect the installer, in particular w.r.t. symbols available on the build machine but not on earlier OSX releases. Posixmodule.c already contains some code to deal with this for a number of functions. > > Issue 1404 ? is about adding a monotonic timer to the OSX port, with the same interface as is used for the linux port. > > Ronald > > > _______________________________________________ > 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 > -- 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 Mar 12 03:52:39 2012 From: nad at acm.org (Ned Deily) Date: Sun, 11 Mar 2012 19:52:39 -0700 Subject: [Pythonmac-SIG] PyCon.. References: <361BD72C-FF53-45CD-8A38-44582E607180@mac.com> <20120311020302.GA31488@illinois.edu> <44222702-E35D-4F51-BCB9-2A6F6E9438C1@mac.com> Message-ID: In article , Chris Barker wrote: > A note about sprint topics: > > One of the things we might want to work on is docs. > > There is also a sprint on: > > Python-Guide.org > > The Mac-OS-X page essentially tels folks that they should install > homebrew, and then build eveything from there (plus Distribute and > virtualenv). I'm not convinced that that's the best option for all > users (though probably a good one for ex-*nix folks) > > Anyway, we might want to work on that page some... Thanks for noticing that. Perhaps you or someone else can sit down with Kenneth or other sprinters on that project and pick their brains a bit. -- Ned Deily, nad at acm.org From carlos.grohmann at gmail.com Mon Mar 12 16:59:25 2012 From: carlos.grohmann at gmail.com (Carlos Grohmann) Date: Mon, 12 Mar 2012 12:59:25 -0300 Subject: [Pythonmac-SIG] shrink app bundle size (removing unused stuff)? In-Reply-To: <833CEF13-0EC5-4C02-9B75-F15941B27657@mac.com> References: <627ECE2F-C19D-4BFB-97B1-F0D882FA2B3E@mac.com> <6D937BAF-5208-4529-BF05-DEC8C3E0F87F@mac.com> <2C581688-25B4-428E-8922-80405D46214B@mac.com> <833CEF13-0EC5-4C02-9B75-F15941B27657@mac.com> Message-ID: Can I build for only one (i386) architecture? cheers Carlos On Sat, Mar 10, 2012 at 14:03, Ronald Oussoren wrote: > > On 10 Mar, 2012, at 8:47, Ronald Oussoren wrote: > > > With this the application bundle already shrinks a little (curently 123 > MByte, before I started it was about 160 MByte). About 70 Mbyte of this is > wx itself (the wxWidgets library and wxPython extensions). Another 21 MByte > is because all of numpy is included, not just the bits that are actually > needed. That's because of another py2app recipe which can hopefully be > improved. > > BTW. The size of the binaries is at least partially due to the support for > multiple architectures, the python installer contains support for two > architectures and wx even includes support for 3 different architectures. > > Ronald > > -- Prof. Carlos Henrique Grohmann - Geologist D.Sc. Institute of Geosciences - Univ. of S?o Paulo, Brazil --- http://www.igc.usp.br/pessoais/guano http://digitalelevation.wordpress.com/ http://lattes.cnpq.br/5846052449613692 (CV) --- Twitter: @CarlosGrohmann http://carlosgrohmann.tumblr.com/ ________________ Can?t stop the signal. -------------- next part -------------- An HTML attachment was scrubbed... URL: From joao.vale at ndrive.com Mon Mar 12 19:34:24 2012 From: joao.vale at ndrive.com (=?UTF-8?Q?Jo=C3=A3o_Vale?=) Date: Mon, 12 Mar 2012 18:34:24 +0000 Subject: [Pythonmac-SIG] shrink app bundle size (removing unused stuff)? In-Reply-To: References: <627ECE2F-C19D-4BFB-97B1-F0D882FA2B3E@mac.com> <6D937BAF-5208-4529-BF05-DEC8C3E0F87F@mac.com> <2C581688-25B4-428E-8922-80405D46214B@mac.com> <833CEF13-0EC5-4C02-9B75-F15941B27657@mac.com> Message-ID: I run this command in my setup.py after the .app is generated, and it's been serving me well: ditto --rsrc --arch i386 file.app new_file.app Cheers, Jo?o Vale * * * * On Mon, Mar 12, 2012 at 3:59 PM, Carlos Grohmann wrote: > Can I build for only one (i386) architecture? > > cheers > > Carlos > > > > On Sat, Mar 10, 2012 at 14:03, Ronald Oussoren wrote: > >> >> On 10 Mar, 2012, at 8:47, Ronald Oussoren wrote: >> >> > With this the application bundle already shrinks a little (curently 123 >> MByte, before I started it was about 160 MByte). About 70 Mbyte of this is >> wx itself (the wxWidgets library and wxPython extensions). Another 21 MByte >> is because all of numpy is included, not just the bits that are actually >> needed. That's because of another py2app recipe which can hopefully be >> improved. >> >> BTW. The size of the binaries is at least partially due to the support >> for multiple architectures, the python installer contains support for two >> architectures and wx even includes support for 3 different architectures. >> >> Ronald >> >> > > > -- > Prof. Carlos Henrique Grohmann - Geologist D.Sc. > Institute of Geosciences - Univ. of S?o Paulo, Brazil > --- > http://www.igc.usp.br/pessoais/guano > http://digitalelevation.wordpress.com/ > http://lattes.cnpq.br/5846052449613692 (CV) > --- > Twitter: @CarlosGrohmann > http://carlosgrohmann.tumblr.com/ > ________________ > Can?t stop the signal. > > _______________________________________________ > 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 ronaldoussoren at mac.com Tue Mar 13 05:42:36 2012 From: ronaldoussoren at mac.com (Ronald Oussoren) Date: Mon, 12 Mar 2012 21:42:36 -0700 Subject: [Pythonmac-SIG] shrink app bundle size (removing unused stuff)? In-Reply-To: References: <627ECE2F-C19D-4BFB-97B1-F0D882FA2B3E@mac.com> <6D937BAF-5208-4529-BF05-DEC8C3E0F87F@mac.com> <2C581688-25B4-428E-8922-80405D46214B@mac.com> <833CEF13-0EC5-4C02-9B75-F15941B27657@mac.com> Message-ID: <9194064B-DCAC-44B1-89FD-55A167C8BF38@mac.com> On 12 Mar, 2012, at 11:34, Jo?o Vale wrote: > I run this command in my setup.py after the .app is generated, and it's been serving me well: > > ditto --rsrc --arch i386 file.app new_file.app Cool trick, and it doesn't even rely on the developer tools. I've filed an issue in the macholib tracker to remind me that this should be functionality in that library (which can then be used by py2app). Macholib already understands a lot about the structure of mac binaries, with some luck it will be easy to remove architectures from binaries. Ronald -------------- next part -------------- A non-text attachment was scrubbed... Name: smime.p7s Type: application/pkcs7-signature Size: 4788 bytes Desc: not available URL: From carlos.grohmann at gmail.com Wed Mar 14 01:17:38 2012 From: carlos.grohmann at gmail.com (Carlos Grohmann) Date: Tue, 13 Mar 2012 21:17:38 -0300 Subject: [Pythonmac-SIG] shrink app bundle size (removing unused stuff)? In-Reply-To: References: <627ECE2F-C19D-4BFB-97B1-F0D882FA2B3E@mac.com> <6D937BAF-5208-4529-BF05-DEC8C3E0F87F@mac.com> <2C581688-25B4-428E-8922-80405D46214B@mac.com> Message-ID: Hi Ronald, I downloaded your new version from bitbucket and installed it with sudo python setup.py install but when I run py2app I got this: GuanoMac:build_Mac guano$ python setup.py py2app running py2app creating /Users/guano/Documents/Arbeit/OpenStereo/development/build_Mac/build creating /Users/guano/Documents/Arbeit/OpenStereo/development/build_Mac/build/bdist.macosx-10.6-intel creating /Users/guano/Documents/Arbeit/OpenStereo/development/build_Mac/build/bdist.macosx-10.6-intel/python2.7-standalone creating /Users/guano/Documents/Arbeit/OpenStereo/development/build_Mac/build/bdist.macosx-10.6-intel/python2.7-standalone/app creating /Users/guano/Documents/Arbeit/OpenStereo/development/build_Mac/build/bdist.macosx-10.6-intel/python2.7-standalone/app/collect creating /Users/guano/Documents/Arbeit/OpenStereo/development/build_Mac/build/bdist.macosx-10.6-intel/python2.7-standalone/app/temp creating /Users/guano/Documents/Arbeit/OpenStereo/development/build_Mac/dist creating build/bdist.macosx-10.6-intel/python2.7-standalone/app/lib-dynload creating build/bdist.macosx-10.6-intel/python2.7-standalone/app/Frameworks *** using recipe: virtualenv *** *** using recipe: sip *** *** using recipe: matplotlib *** *** using recipe: numpy *** *** using recipe: wx *** Traceback (most recent call last): File "setup.py", line 75, in setup_requires=['py2app'], File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/distutils/core.py", line 152, in setup dist.run_commands() File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/distutils/dist.py", line 953, in run_commands self.run_command(cmd) File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/distutils/dist.py", line 972, in run_command cmd_obj.run() File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/py2app-0.6.5-py2.7.egg/py2app/build_app.py", line 480, in run self._run() File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/py2app-0.6.5-py2.7.egg/py2app/build_app.py", line 643, in _run self.run_normal() File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/py2app-0.6.5-py2.7.egg/py2app/build_app.py", line 716, in run_normal self.process_recipes(mf, filters, flatpackages, loader_files) File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/py2app-0.6.5-py2.7.egg/py2app/build_app.py", line 624, in process_recipes find_needed_modules(mf, includes=rval['includes']) File "build/bdist.macosx-10.6-intel/egg/modulegraph/find_modules.py", line 182, in find_needed_modules File "build/bdist.macosx-10.6-intel/egg/modulegraph/modulegraph.py", line 643, in import_hook File "build/bdist.macosx-10.6-intel/egg/modulegraph/modulegraph.py", line 734, in load_tail ImportError: No module named wx.lib.pubsub.pubsub2 GuanoMac:build_Mac guano$ Still some issues with pubsub.. tks Carlos On Sat, Mar 10, 2012 at 13:47, Ronald Oussoren wrote: > > On 9 Mar, 2012, at 16:33, Ronald Oussoren wrote: > > > > > On 9 Mar, 2012, at 10:55, Carlos Grohmann wrote: > > > >> I think that if the 'excludes' weren't overwritten by the > >> wx/numpy/matplotlib/etc recipes, it would be easier to fine-tune our > >> options (maybe run the recipes first and aftrer run the excludes?) > > > > The matplotlib issue seems to be a bug that's not related to recipes: > py2app copies package data into the application bundle, and this code > accidently also copied all subpackages like the matplotlib.test package. > I have a patch, but need to test if this actually fixes the bug before I > commit. > > It didn't, but I did make some progress: > > 1) I added a py2app recipe that does the right thing with the pubsub > library in wxPython. That library uses __path__ hacks and that confuses > modulegraph (and hence py2app). Because of this you no longer have to > explicitly include 'wx' in the application bundle > > 2) I tweaked the matplotlib recipe in py2app, it no longer copies the > entire package but adds a hook to tell matplotlib where its data is. This > solution is not fully complete yet, I'm currently including mpl-data twice > (once in Resources, once in site-packages.zip) and the later copy is not > needed. > > With this the application bundle already shrinks a little (curently 123 > MByte, before I started it was about 160 MByte). About 70 Mbyte of this is > wx itself (the wxWidgets library and wxPython extensions). Another 21 MByte > is because all of numpy is included, not just the bits that are actually > needed. That's because of another py2app recipe which can hopefully be > improved. > > I just pushed updates to modulegraph and py2app to my bitbucket > repositories. > > Ronald > > > > > Ronald > > > > _______________________________________________ > > 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 > > -- Prof. Carlos Henrique Grohmann - Geologist D.Sc. Institute of Geosciences - Univ. of S?o Paulo, Brazil --- http://www.igc.usp.br/pessoais/guano http://www.igc.usp.br/openstereo http://lattes.cnpq.br/5846052449613692 (CV) --- Twitter: @CarlosGrohmann http://carlosgrohmann.tumblr.com/ ________________ Can?t stop the signal. -------------- next part -------------- An HTML attachment was scrubbed... URL: From chris.barker at noaa.gov Wed Mar 14 21:46:14 2012 From: chris.barker at noaa.gov (Chris Barker) Date: Wed, 14 Mar 2012 13:46:14 -0700 Subject: [Pythonmac-SIG] shrink app bundle size (removing unused stuff)? In-Reply-To: References: <627ECE2F-C19D-4BFB-97B1-F0D882FA2B3E@mac.com> <6D937BAF-5208-4529-BF05-DEC8C3E0F87F@mac.com> <2C581688-25B4-428E-8922-80405D46214B@mac.com> Message-ID: Nothing to do with your issue (I don't think) but: On Tue, Mar 13, 2012 at 5:17 PM, Carlos Grohmann > *** using recipe: virtualenv *** > *** using recipe: sip *** > *** using recipe: matplotlib *** > *** using recipe: numpy *** > *** using recipe: wx *** recipe sip is usually used for PyQT (as sip is used to build pyQT) It seems odd that you'd have both SIP and wx in one app. Or is sip used fro something else that you're using? -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 Mar 14 22:55:10 2012 From: chris.barker at noaa.gov (Chris Barker) Date: Wed, 14 Mar 2012 14:55:10 -0700 Subject: [Pythonmac-SIG] shrink app bundle size (removing unused stuff)? In-Reply-To: References: <627ECE2F-C19D-4BFB-97B1-F0D882FA2B3E@mac.com> <6D937BAF-5208-4529-BF05-DEC8C3E0F87F@mac.com> <2C581688-25B4-428E-8922-80405D46214B@mac.com> Message-ID: On Wed, Mar 14, 2012 at 2:24 PM, Carlos Grohmann wrote: > I don't use sip at all. don't know why it's been used by py2app. one guess -- there is an optional QT back-end to matplotlib -- is py2app picking that up (It may drag in TK and even GTK, too). MIght be worth taking a look. -Chris > Carlos > > On Wed, Mar 14, 2012 at 17:46, Chris Barker wrote: >> >> Nothing to do with your issue (I don't think) but: >> >> >> On Tue, Mar 13, 2012 at 5:17 PM, Carlos Grohmann > *** using recipe: >> virtualenv *** >> > *** using recipe: sip *** >> > *** using recipe: matplotlib *** >> > *** using recipe: numpy *** >> > *** using recipe: wx *** >> >> recipe sip is usually used for PyQT (as sip is used to build pyQT) It >> seems odd that you'd have both SIP and wx in one app. >> >> Or is sip used fro something else that you're using? >> >> -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 >> _______________________________________________ >> 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 > > > > > -- > Prof. Carlos Henrique Grohmann - Geologist D.Sc. > Institute of Geosciences - Univ. of S?o Paulo, Brazil > --- > http://www.igc.usp.br/pessoais/guano > http://www.igc.usp.br/openstereo > http://lattes.cnpq.br/5846052449613692 (CV) > --- > Twitter: @CarlosGrohmann > http://carlosgrohmann.tumblr.com/ > ________________ > Can?t stop the signal. -- 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 ronaldoussoren at mac.com Thu Mar 15 01:41:16 2012 From: ronaldoussoren at mac.com (Ronald Oussoren) Date: Wed, 14 Mar 2012 17:41:16 -0700 Subject: [Pythonmac-SIG] shrink app bundle size (removing unused stuff)? In-Reply-To: References: <627ECE2F-C19D-4BFB-97B1-F0D882FA2B3E@mac.com> <6D937BAF-5208-4529-BF05-DEC8C3E0F87F@mac.com> <2C581688-25B4-428E-8922-80405D46214B@mac.com> Message-ID: <5D57410B-20B5-4688-8968-D94A89FA047D@mac.com> Py2app does indeed see all backends and therefore copies basicly every GUI library it can find into your bundle. Note that the recipe lines in the output don't necessarily mean anything, py2app prints something when it calls a recipe. Ronald Sent from my iPhone On 14 mrt. 2012, at 14:55, Chris Barker wrote: > On Wed, Mar 14, 2012 at 2:24 PM, Carlos Grohmann > wrote: >> I don't use sip at all. don't know why it's been used by py2app. > > one guess -- there is an optional QT back-end to matplotlib -- is > py2app picking that up (It may drag in TK and even GTK, too). MIght be > worth taking a look. > > -Chris > > > > > >> Carlos >> >> On Wed, Mar 14, 2012 at 17:46, Chris Barker wrote: >>> >>> Nothing to do with your issue (I don't think) but: >>> >>> >>> On Tue, Mar 13, 2012 at 5:17 PM, Carlos Grohmann > *** using recipe: >>> virtualenv *** >>>> *** using recipe: sip *** >>>> *** using recipe: matplotlib *** >>>> *** using recipe: numpy *** >>>> *** using recipe: wx *** >>> >>> recipe sip is usually used for PyQT (as sip is used to build pyQT) It >>> seems odd that you'd have both SIP and wx in one app. >>> >>> Or is sip used fro something else that you're using? >>> >>> -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 >>> _______________________________________________ >>> 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 >> >> >> >> >> -- >> Prof. Carlos Henrique Grohmann - Geologist D.Sc. >> Institute of Geosciences - Univ. of S?o Paulo, Brazil >> --- >> http://www.igc.usp.br/pessoais/guano >> http://www.igc.usp.br/openstereo >> http://lattes.cnpq.br/5846052449613692 (CV) >> --- >> Twitter: @CarlosGrohmann >> http://carlosgrohmann.tumblr.com/ >> ________________ >> Can?t stop the signal. > > > > -- > > 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 > _______________________________________________ > 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: 4812 bytes Desc: not available URL: From eddybarratt1 at yahoo.co.uk Thu Mar 22 01:08:38 2012 From: eddybarratt1 at yahoo.co.uk (Eddy Barratt) Date: Thu, 22 Mar 2012 00:08:38 +0000 (GMT) Subject: [Pythonmac-SIG] Building numpy/scipy for python3 on MacOS Lion Message-ID: <1332374918.1428.YahooMailNeo@web29504.mail.ird.yahoo.com> I can't get Numpy or Scipy to work with Python3 on Mac OSX Lion.? I have used pip successfully to install numpy, scipy and matplotlib, and they work well with Python2.7, but in Python3 typing 'import numpy' brings up 'No module named numpy'. I've tried downloading the source code directly and then running 'python3 setup.py build', but I get various error warnings, some in red that have to do with fortran (e.g. 'Could not locate executable f95'). In the end I get the following message: 2 warnings generated. gcc-4.2 -bundle -undefined dynamic_lookup -arch i386 -arch x86_64 -isysroot /Developer/SDKs/MacOSX10.6.sdk -isysroot /Developer/SDKs/MacOSX10.6.sdk -g build/temp.macosx-10.6-intel-3.2/numpy/core/src/dummymodule.o -Lbuild/temp.macosx-10.6-intel-3.2 -o build/lib.macosx-10.6-intel-3.2/numpy/core/_dummy.so sh: gcc-4.2: command not found sh: gcc-4.2: command not found error: Command "gcc-4.2 -bundle -undefined dynamic_lookup -arch i386 -arch x86_64 -isysroot /Developer/SDKs/MacOSX10.6.sdk -isysroot /Developer/SDKs/MacOSX10.6.sdk -g build/temp.macosx-10.6-intel-3.2/numpy/core/src/dummymodule.o -Lbuild/temp.macosx-10.6-intel-3.2 -o build/lib.macosx-10.6-intel-3.2/numpy/core/_dummy.so" failed with exit status 127 The Scipy website (http://www.scipy.org/Installing_SciPy/Mac_OS_X) suggests that there may be issues with the c compiler, but the same problems didn't arise using pip to install for python2.7. I have followed the instructions on the website regarding changing the compiler but this has not made any difference.? I have also tried installing using pip from a virtual environment:? >>>?source /usr/local/share/python/virtualenvwrapper.sh >>> mkvirtualenv -p python3.2 test1? >>> pip install numpy? But this fails with "Command python setup.py egg_info failed with error code 1 in /Users/Eddy/.virtualenvs/test1/build/numpy"? I've considered making python3 default, and then I thought a pip install might work, but I don't know how to do that. Does anyone have any suggestions for how I might proceed? I'm all but ready to give up on Python3!? Eddy? From nad at acm.org Thu Mar 22 01:41:54 2012 From: nad at acm.org (Ned Deily) Date: Wed, 21 Mar 2012 17:41:54 -0700 Subject: [Pythonmac-SIG] Building numpy/scipy for python3 on MacOS Lion References: <1332374918.1428.YahooMailNeo@web29504.mail.ird.yahoo.com> Message-ID: In article <1332374918.1428.YahooMailNeo at web29504.mail.ird.yahoo.com>, Eddy Barratt wrote: > I can't get Numpy or Scipy to work with Python3 on Mac OSX Lion.? > > > I have used pip successfully to install numpy, scipy and matplotlib, and they > work well with Python2.7, but in Python3 typing 'import numpy' brings up 'No > module named numpy'. I've tried downloading the source code directly and then > running 'python3 setup.py build', but I get various error warnings, some in > red that have to do with fortran (e.g. 'Could not locate executable f95'). In > the end I get the following message: > > 2 warnings generated. > gcc-4.2 -bundle -undefined dynamic_lookup -arch i386 -arch x86_64 -isysroot > /Developer/SDKs/MacOSX10.6.sdk -isysroot /Developer/SDKs/MacOSX10.6.sdk -g > build/temp.macosx-10.6-intel-3.2/numpy/core/src/dummymodule.o > -Lbuild/temp.macosx-10.6-intel-3.2 -o > build/lib.macosx-10.6-intel-3.2/numpy/core/_dummy.so > sh: gcc-4.2: command not found > sh: gcc-4.2: command not found > error: Command "gcc-4.2 -bundle -undefined dynamic_lookup -arch i386 -arch > x86_64 -isysroot /Developer/SDKs/MacOSX10.6.sdk -isysroot > /Developer/SDKs/MacOSX10.6.sdk -g > build/temp.macosx-10.6-intel-3.2/numpy/core/src/dummymodule.o > -Lbuild/temp.macosx-10.6-intel-3.2 -o > build/lib.macosx-10.6-intel-3.2/numpy/core/_dummy.so" failed with exit status > 127 > > > The Scipy website (http://www.scipy.org/Installing_SciPy/Mac_OS_X) suggests > that there may be issues with the c compiler, but the same problems didn't > arise using pip to install for python2.7. I have followed the instructions on > the website regarding changing the compiler but this has not made any > difference.? Chances are you are using a Python 3.2.x installer from python.org. Those Pythons are built using gcc-4.2 from Xcode 3 on OS X 10.6. When installing 3rd-party packages with C extension modules, Python's Distutils will attempt to use the same compiler and compiler options Unfortunately, in the latest versions of Xcode 4, Apple has removed gcc-4.2. That's why you see the gcc-4.2 not found. The instructions given at the SciPy website for working around the problem by using clang appear to be missing at least one important step. Besides overriding the CC environment variable, you also will need to override LDSHARED (untested with SciPy!): $ export CC=clang $ export LDSHARED='clang -bundle -undefined dynamic_lookup \ -arch i386 -arch x86_64 -isysroot /Developer/SDKs/MacOSX10.6.sdk -g' In the upcoming 3.2.3 maintenance release, Distutils will do the equivalent automatically if gcc-4.2 is called for but not present on the machine. Chances are that you are using the Apple-supplied Python 2.7 in 10.7, rather than a python.org version which should exhibit the same behavior as what you see with Python 3. The Apple system Python 2.7 is built with llvm-gcc, not gcc-4.2, so you wouldn't see this problem with it. However, as the SciPy page notes, there have been test failures noted when using llvm-gcc to build Python and it is recommend to not use it as it is not being actively maintained and is intended as a stepping stone to use of clang throughout OS X. Note that, starting with Xcode 4.3, Apple has made yet another major change: moving the contents of the former /Developer directory to inside the Xcode.app bundle itself. If you start with Xcode 4.3 or follow the installation step of allowing Xcode to remove the old /Developer directory, Distutils-initiated compiles will fail because they can't find the SDK with OS X header files. The workaround for that is to create a symlink from the new location to the old: $ sudo ln -s /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Deve loper /Developer -- Ned Deily, nad at acm.org From nad at acm.org Fri Mar 23 21:23:50 2012 From: nad at acm.org (Ned Deily) Date: Fri, 23 Mar 2012 13:23:50 -0700 Subject: [Pythonmac-SIG] Building numpy/scipy for python3 on MacOS Lion In-Reply-To: <1332528383.89067.YahooMailNeo@web29501.mail.ird.yahoo.com> References: <1332374918.1428.YahooMailNeo@web29504.mail.ird.yahoo.com> <1332528383.89067.YahooMailNeo@web29501.mail.ird.yahoo.com> Message-ID: <45732D0C-BDC9-4A1A-91C5-F8F7584A9743@acm.org> [Please keep the discussion on the list. Thanks!] On Mar 23, 2012, at 11:46 , Eddy Barratt wrote: > Thanks Ned, that's great, now I can get numpy to import so I'm definitely getting somewhere. But scipy still won't build, it 'failed with exit status 1'. The error message included the command about LDSHARE in it's final paragraph. I've included the error message at the end of this email, starting from the part where it appears to have run in to issues. > > I have Xcode 4.2.1. > > Thanks for your help. Eddy > > Error Message: > > compiling C sources > C compiler: clang -fno-strict-aliasing -fno-common -dynamic -arch i386 -arch x86_64 -Os -w -pipe -march=core2 -fwrapv -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes > > compile options: '-I/usr/local/Cellar/python/2.7.2/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/numpy/core/include -I/usr/local/Cellar/python/2.7.2/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/numpy/core/include -I/usr/local/Cellar/python/2.7.2/Frameworks/Python.framework/Versions/2.7/include/python2.7 -c' > clang: scipy/cluster/src/vq_module.c > clang: scipy/cluster/src/vq.c > clang -bundle -undefined dynamic_lookup -arch i386 x86_64 -isysroot/Developer/SDKs/MacOSX10.6.sdk -g build/temp.macosx-10.5-intel-2.7/scipy/cluster/src/vq_module.o build/temp.macosx-10.5-intel-2.7/scipy/cluster/src/vq.o -Lbuild/temp.macosx-10.5-intel-2.7 -o build/lib.macosx-10.5-intel-2.7/scipy/cluster/_vq.so > clang: error: no such file or directory: 'x86_64' > clang: error: no such file or directory: 'x86_64' > error: Command "clang -bundle -undefined dynamic_lookup -arch i386 x86_64 -isysroot/Developer/SDKs/MacOSX10.6.sdk -g build/temp.macosx-10.5-intel-2.7/scipy/cluster/src/vq_module.o build/temp.macosx-10.5-intel-2.7/scipy/cluster/src/vq.o -Lbuild/temp.macosx-10.5-intel-2.7 -o build/lib.macosx-10.5-intel-2.7/scipy/cluster/_vq.so" failed with exit status 1 It looks like a copy and paste error. Note the environment variable settings I suggested were: $ export CC=clang $ export LDSHARED='clang -bundle -undefined dynamic_lookup \ -arch i386 -arch x86_64 -isysroot /Developer/SDKs/MacOSX10.6.sdk -g' But in the Distutils output I see: "-arch i386 x86_64" -- Ned Deily nad at acm.org -- [] From eddybarratt1 at yahoo.co.uk Sat Mar 24 01:42:53 2012 From: eddybarratt1 at yahoo.co.uk (Eddy Barratt) Date: Sat, 24 Mar 2012 00:42:53 +0000 (GMT) Subject: [Pythonmac-SIG] Building numpy/scipy for python3 on MacOS Lion In-Reply-To: <45732D0C-BDC9-4A1A-91C5-F8F7584A9743@acm.org> References: <1332374918.1428.YahooMailNeo@web29504.mail.ird.yahoo.com> <1332528383.89067.YahooMailNeo@web29501.mail.ird.yahoo.com> <45732D0C-BDC9-4A1A-91C5-F8F7584A9743@acm.org> Message-ID: <1332549773.19437.YahooMailNeo@web29505.mail.ird.yahoo.com> Yeah, thanks, your right I typed it in wrong, but it still isn't working, though it did build for longer this time before failing. This is the error code this time. It talks about something being?depreciated?in numpy. Thank you so much for your help with this. Eddy compiling C sources C compiler: clang -fno-strict-aliasing -fno-common -dynamic -DNDEBUG -g -O3 -isysroot /Developer/SDKs/MacOSX10.6.sdk -arch i386 -arch x86_64 -isysroot /Developer/SDKs/MacOSX10.6.sdk compile options: '-DNO_ATLAS_INFO=3 -DUSE_VENDOR_BLAS=1 -I/Library/Frameworks/Python.framework/Versions/3.2/lib/python3.2/site-packages/numpy/core/include -I/Library/Frameworks/Python.framework/Versions/3.2/include/python3.2m -c' extra options: '-msse3' clang: scipy/sparse/linalg/dsolve/_superlumodule.c In file included from scipy/sparse/linalg/dsolve/_superlumodule.c:18: In file included from /Library/Frameworks/Python.framework/Versions/3.2/lib/python3.2/site-packages/numpy/core/include/numpy/arrayobject.h:15: In file included from /Library/Frameworks/Python.framework/Versions/3.2/lib/python3.2/site-packages/numpy/core/include/numpy/ndarrayobject.h:17: In file included from /Library/Frameworks/Python.framework/Versions/3.2/lib/python3.2/site-packages/numpy/core/include/numpy/ndarraytypes.h:1972: /Library/Frameworks/Python.framework/Versions/3.2/lib/python3.2/site-packages/numpy/core/include/numpy/npy_deprecated_api.h:11:2: warning: #warning "Using deprecated NumPy API, disable it by #defining NPY_NO_DEPRECATED_API" [-W#warnings] #warning "Using deprecated NumPy API, disable it by #defining NPY_NO_DEPRECATED_API" ?^ scipy/sparse/linalg/dsolve/_superlumodule.c:268:9: error: non-void function 'PyInit__superlu' should return a value [-Wreturn-type] ? ? ? ? return; ? ? ? ? ^ 1 warning and 1 error generated. In file included from scipy/sparse/linalg/dsolve/_superlumodule.c:18: In file included from /Library/Frameworks/Python.framework/Versions/3.2/lib/python3.2/site-packages/numpy/core/include/numpy/arrayobject.h:15: In file included from /Library/Frameworks/Python.framework/Versions/3.2/lib/python3.2/site-packages/numpy/core/include/numpy/ndarrayobject.h:17: In file included from /Library/Frameworks/Python.framework/Versions/3.2/lib/python3.2/site-packages/numpy/core/include/numpy/ndarraytypes.h:1972: /Library/Frameworks/Python.framework/Versions/3.2/lib/python3.2/site-packages/numpy/core/include/numpy/npy_deprecated_api.h:11:2: warning: #warning "Using deprecated NumPy API, disable it by #defining NPY_NO_DEPRECATED_API" [-W#warnings] #warning "Using deprecated NumPy API, disable it by #defining NPY_NO_DEPRECATED_API" ?^ scipy/sparse/linalg/dsolve/_superlumodule.c:268:9: error: non-void function 'PyInit__superlu' should return a value [-Wreturn-type] ? ? ? ? return; ? ? ? ? ^ 1 warning and 1 error generated. error: Command "clang -fno-strict-aliasing -fno-common -dynamic -DNDEBUG -g -O3 -isysroot /Developer/SDKs/MacOSX10.6.sdk -arch i386 -arch x86_64 -isysroot /Developer/SDKs/MacOSX10.6.sdk -DNO_ATLAS_INFO=3 -DUSE_VENDOR_BLAS=1 -I/Library/Frameworks/Python.framework/Versions/3.2/lib/python3.2/site-packages/numpy/core/include -I/Library/Frameworks/Python.framework/Versions/3.2/include/python3.2m -c scipy/sparse/linalg/dsolve/_superlumodule.c -o build/temp.macosx-10.6-intel-3.2/scipy/sparse/linalg/dsolve/_superlumodule.o -msse3" failed with exit status 1 ----- Original Message ----- From: Ned Deily To: pythonmac-sig at python.org Cc: Sent: Friday, 23 March 2012, 14:23 Subject: Re: [Pythonmac-SIG] Building numpy/scipy for python3 on MacOS Lion [Please keep the discussion on the list.? Thanks!] On Mar 23, 2012, at 11:46 , Eddy Barratt wrote: > Thanks Ned, that's great, now I can get numpy to import so I'm definitely getting somewhere. But scipy still won't build, it 'failed with exit status 1'. The error message included the command about LDSHARE in it's final paragraph. I've included the error message at the end of this email, starting from the part where it appears to have run in to issues. > > I have Xcode 4.2.1. > > Thanks for your help. Eddy > > Error Message: > > compiling C sources > C compiler: clang -fno-strict-aliasing -fno-common -dynamic -arch i386 -arch x86_64 -Os -w -pipe -march=core2 -fwrapv -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes > > compile options: '-I/usr/local/Cellar/python/2.7.2/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/numpy/core/include -I/usr/local/Cellar/python/2.7.2/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/numpy/core/include -I/usr/local/Cellar/python/2.7.2/Frameworks/Python.framework/Versions/2.7/include/python2.7 -c' > clang: scipy/cluster/src/vq_module.c > clang: scipy/cluster/src/vq.c > clang -bundle -undefined dynamic_lookup? -arch i386 x86_64 -isysroot/Developer/SDKs/MacOSX10.6.sdk -g build/temp.macosx-10.5-intel-2.7/scipy/cluster/src/vq_module.o build/temp.macosx-10.5-intel-2.7/scipy/cluster/src/vq.o -Lbuild/temp.macosx-10.5-intel-2.7 -o build/lib.macosx-10.5-intel-2.7/scipy/cluster/_vq.so > clang: error: no such file or directory: 'x86_64' > clang: error: no such file or directory: 'x86_64' > error: Command "clang -bundle -undefined dynamic_lookup? -arch i386 x86_64 -isysroot/Developer/SDKs/MacOSX10.6.sdk -g build/temp.macosx-10.5-intel-2.7/scipy/cluster/src/vq_module.o build/temp.macosx-10.5-intel-2.7/scipy/cluster/src/vq.o -Lbuild/temp.macosx-10.5-intel-2.7 -o build/lib.macosx-10.5-intel-2.7/scipy/cluster/_vq.so" failed with exit status 1 It looks like a copy and paste error.? Note the environment variable settings I suggested were: $ export CC=clang $ export LDSHARED='clang -bundle -undefined dynamic_lookup \ ? ? -arch i386 -arch x86_64 -isysroot /Developer/SDKs/MacOSX10.6.sdk -g' But in the Distutils output I see:? "-arch i386 x86_64" -- ? Ned Deily ? nad at acm.org -- [] _______________________________________________ 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 From nad at acm.org Sun Mar 25 03:29:55 2012 From: nad at acm.org (Ned Deily) Date: Sat, 24 Mar 2012 18:29:55 -0700 Subject: [Pythonmac-SIG] Building numpy/scipy for python3 on MacOS Lion References: <1332374918.1428.YahooMailNeo@web29504.mail.ird.yahoo.com> <1332528383.89067.YahooMailNeo@web29501.mail.ird.yahoo.com> <45732D0C-BDC9-4A1A-91C5-F8F7584A9743@acm.org> <1332549773.19437.YahooMailNeo@web29505.mail.ird.yahoo.com> Message-ID: In article <1332549773.19437.YahooMailNeo at web29505.mail.ird.yahoo.com>, Eddy Barratt wrote: > Yeah, thanks, your right I typed it in wrong, but it still isn't working, > though it did build for longer this time before failing. > > This is the error code this time. It talks about something > being?depreciated?in numpy. Thank you so much for your help with this. > > Eddy > > compiling C sources > C compiler: clang -fno-strict-aliasing -fno-common -dynamic -DNDEBUG -g -O3 > -isysroot /Developer/SDKs/MacOSX10.6.sdk -arch i386 -arch x86_64 -isysroot > /Developer/SDKs/MacOSX10.6.sdk > > compile options: '-DNO_ATLAS_INFO=3 -DUSE_VENDOR_BLAS=1 > -I/Library/Frameworks/Python.framework/Versions/3.2/lib/python3.2/site-package > s/numpy/core/include > -I/Library/Frameworks/Python.framework/Versions/3.2/include/python3.2m -c' > extra options: '-msse3' > clang: scipy/sparse/linalg/dsolve/_superlumodule.c > In file included from scipy/sparse/linalg/dsolve/_superlumodule.c:18: > In file included from > /Library/Frameworks/Python.framework/Versions/3.2/lib/python3.2/site-packages/ > numpy/core/include/numpy/arrayobject.h:15: > In file included from > /Library/Frameworks/Python.framework/Versions/3.2/lib/python3.2/site-packages/ > numpy/core/include/numpy/ndarrayobject.h:17: > In file included from > /Library/Frameworks/Python.framework/Versions/3.2/lib/python3.2/site-packages/ > numpy/core/include/numpy/ndarraytypes.h:1972: > /Library/Frameworks/Python.framework/Versions/3.2/lib/python3.2/site-packages/ > numpy/core/include/numpy/npy_deprecated_api.h:11:2: warning: #warning "Using > deprecated NumPy API, disable it by #defining NPY_NO_DEPRECATED_API" > [-W#warnings] > #warning "Using deprecated NumPy API, disable it by #defining > NPY_NO_DEPRECATED_API" > ?^ > scipy/sparse/linalg/dsolve/_superlumodule.c:268:9: error: non-void function > 'PyInit__superlu' should return a value [-Wreturn-type] > ? ? ? ? return; > ? ? ? ? ^ > 1 warning and 1 error generated. > In file included from scipy/sparse/linalg/dsolve/_superlumodule.c:18: > In file included from > /Library/Frameworks/Python.framework/Versions/3.2/lib/python3.2/site-packages/ > numpy/core/include/numpy/arrayobject.h:15: > In file included from > /Library/Frameworks/Python.framework/Versions/3.2/lib/python3.2/site-packages/ > numpy/core/include/numpy/ndarrayobject.h:17: > In file included from > /Library/Frameworks/Python.framework/Versions/3.2/lib/python3.2/site-packages/ > numpy/core/include/numpy/ndarraytypes.h:1972: > /Library/Frameworks/Python.framework/Versions/3.2/lib/python3.2/site-packages/ > numpy/core/include/numpy/npy_deprecated_api.h:11:2: warning: #warning "Using > deprecated NumPy API, disable it by #defining NPY_NO_DEPRECATED_API" > [-W#warnings] > #warning "Using deprecated NumPy API, disable it by #defining > NPY_NO_DEPRECATED_API" > ?^ > scipy/sparse/linalg/dsolve/_superlumodule.c:268:9: error: non-void function > 'PyInit__superlu' should return a value [-Wreturn-type] > ? ? ? ? return; > ? ? ? ? ^ > 1 warning and 1 error generated. > error: Command "clang -fno-strict-aliasing -fno-common -dynamic -DNDEBUG -g > -O3 -isysroot /Developer/SDKs/MacOSX10.6.sdk -arch i386 -arch x86_64 > -isysroot /Developer/SDKs/MacOSX10.6.sdk -DNO_ATLAS_INFO=3 > -DUSE_VENDOR_BLAS=1 > -I/Library/Frameworks/Python.framework/Versions/3.2/lib/python3.2/site-package > s/numpy/core/include > -I/Library/Frameworks/Python.framework/Versions/3.2/include/python3.2m -c > scipy/sparse/linalg/dsolve/_superlumodule.c -o > build/temp.macosx-10.6-intel-3.2/scipy/sparse/linalg/dsolve/_superlumodule.o > -msse3" failed with exit status 1 The deprecation warning isn't necessarily a problem but the compile error is. Sorry, I have no experience with scipy so I would only be guessing what the problem here is. Suggest you ask on the Scipy-User mailing list (http://www.scipy.org/Mailing_Lists). Good luck! -- Ned Deily, nad at acm.org