To avoid having to import MacOS, I've implemented the MacOS.WMAvailable() 
function in src/_macosx.m. The updated version of backend_macosx.py doesn't 
import MacOS; see revision 8625 in trunk.

--Michiel.

--- On Tue, 8/10/10, Derek Homeier <de...@astro.physik.uni-goettingen.de> wrote:

> From: Derek Homeier <de...@astro.physik.uni-goettingen.de>
> Subject: [matplotlib-devel] backend_macosx framework check fails with 64bit 
> Python
> To: matplotlib-devel@lists.sourceforge.net
> Date: Tuesday, August 10, 2010, 7:41 AM
> Hi again, cc'ing the matplotlib list
> this time,
> 
> for the latter: when building matplotlib against a
> fink-installed python compiled in 64bit mode
> I found the check for a framework-installed Python (rev
> 8365) fails, and matplotlib fails to load,
> because the MacOS module is not available in 64bit.
> Actually Apple seems to have made it
> still available in their system Python, but it's likely to
> be a general problem on 64bit OS X installations,
> and will be for python3 as well.
> 
> >> 
> >> I believe I have fixed the patch file issue that
> came from an accidental edit of
> >> the patch file (off by 1 space character). 
> For the issues below, can you give
> >> me some examples that show the behavior that is
> broken now, but fixed into your
> >> updated patch?  I haven't used matplotlib in
> a long time.
> > 
> > 
> > thanks, the fixed patch in unstable compiles and runs
> now.
> > Sorry for the late reply; I found that the issue that
> my extra patch addressed
> > actually only seems to exist for x86_64 on Snow
> Leopard.
> > It is in fact not directly related to python being
> built as a framework, but the
> > "import MacOS" used to check for the framework version
> fails, since the
> > MacOS module is not available in 64bit. Or so the
> python docs state, but Apple
> > seems to have retrofitted it somehow into their system
> python, so my test for
> > "import MacOS" worked with /usr/bin/python even on
> Snow Leopard.
> > 
> > So the test for MacOS.WMAvailable() that my patch
> removed can obviously stay
> > there for 32bit installations, and it would probably
> be better to just catch the
> > import error on 64bit systems. I'll try to work
> something out along those lines,
> > and probably send it upstream to the matplotlib folks
> as well, since this should
> > be a general problem on 64bit systems; and also the
> MacOS module is going
> > to be removed altogether in python3.x. I'll keep you
> posted.
> > 
> I've put the import inside the check now and have it print
> the warning in both cases
> (assuming Python is not a framework installation if it
> lacks the MacOS module).
> I don't know if there might be an alternative way to check
> for the framework property
> for later, and I just picked an error to raise that seemed
> sensible - feel free to change
> that as necessary.
> 
> Cheers,
>            
>            
>     Derek
> 
> 
> -----Inline Attachment Follows-----
> 
> ------------------------------------------------------------------------------
> This SF.net email is sponsored by 
> 
> Make an app they can't live without
> Enter the BlackBerry Developer Challenge
> http://p.sf.net/sfu/RIM-dev2dev 
> -----Inline Attachment Follows-----
> 
> _______________________________________________
> Matplotlib-devel mailing list
> Matplotlib-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/matplotlib-devel
> 


      

------------------------------------------------------------------------------
This SF.net email is sponsored by 

Make an app they can't live without
Enter the BlackBerry Developer Challenge
http://p.sf.net/sfu/RIM-dev2dev 
_______________________________________________
Matplotlib-devel mailing list
Matplotlib-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-devel

Reply via email to