Re: [Pythonmac-SIG] [Image-SIG] PIL binaries -- please test

2010-06-06 Thread Christopher Barker

Matthias Baas wrote:

Apparently, your version of libfreetype doesn't
have the same dependencies as my version. Here, the dependencies are as
follows:

$ otool -L /opt/local/lib/libfreetype.6.dylib
/opt/local/lib/libfreetype.6.dylib:
 /opt/local/lib/libfreetype.6.dylib (compatibility version 10.0.0,
current version 10.20.0)
 /System/Library/Frameworks/CoreServices.framework/Versions/A/CoreServices
(compatibility version 1.0.0, current version 18.0.0)
 
/System/Library/Frameworks/ApplicationServices.framework/Versions/A/ApplicationServices
(compatibility version 1.0.0, current version 22.0.0)
 /usr/lib/libgcc_s.1.dylib (compatibility version 1.0.0, current version
1.0.0)
 /usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current
version 88.3.9)


Interesting -- mine are:

$ otool -L  /opt/local/lib/libfreetype.dylib
/opt/local/lib/libfreetype.dylib:
	/opt/local/lib/libfreetype.6.dylib (compatibility version 11.0.0, 
current version 11.0.0)
	/opt/local/lib/libz.1.dylib (compatibility version 1.0.0, current 
version 1.2.5)
	/usr/lib/libgcc_s.1.dylib (compatibility version 1.0.0, current version 
1.0.0)
	/usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current 
version 111.1.5)



so none of the CoreServices stuff - maybe a 10.4 vs. 1.5 difference.



So in the setup script around line 320 where the _imagingft extension
module is defined, I added the following linker args:

  extra_link_args=["-framework", "CoreServices", "-framework",
"ApplicationServices"]

After that I can actually import _imagingft just on its own and your
test script then also works


nice work!


So all the dependencies of the PIL modules are now like this:


those look reasonable.


PIL/_imagingtk.so:
/System/Library/Frameworks/Tcl.framework/Versions/8.4/Tcl
(compatibility version 8.4.0, current version 8.4.0)
/System/Library/Frameworks/Tk.framework/Versions/8.4/Tk
(compatibility version 8.4.0, current version 8.4.0)
/usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current
version 88.3.9)


I'm not sure what the deal is with this -- there are issue with 
different TK versions, but I dont us TK, so I'mve never figured that out.




So do all Python modules compiled on OSX 10.4 automatically work on
newer versions of OSX?


In theory, yes.


Do you want me to send the packages to you for
testing?


Please put them on a publicly accessible site if you can, and sent a 
note tho these lists asking for testing. If you don't have anywhere to 
put them, you can open a Dropbox account, or soemthing else, or send 
them to me and I'll put them on mine.


> By the way, what's generally the preferred distribution format,

zip or dmg?


I suppose dmg is a little better, but either one is fine.

Thanks for all this work!

-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.bar...@noaa.gov
___
Pythonmac-SIG maillist  -  Pythonmac-SIG@python.org
http://mail.python.org/mailman/listinfo/pythonmac-sig
unsubscribe: http://mail.python.org/mailman/options/Pythonmac-SIG


Re: [Pythonmac-SIG] [Image-SIG] PIL binaries -- please test

2010-06-06 Thread Matthias Baas
Christopher Barker wrote:
> import PIL._imagingft
>> Traceback (most recent call last):
>>   File "", line 1, in 
>> ImportError: dlopen(PIL/_imagingft.so, 2): Symbol not found:
>> _FSOpenResFile
>>   Referenced from: PIL/_imagingft.so
>>   Expected in: dynamic lookup
>>
>> This error does not occur if _imagingtk is imported first. So it looks
>> like we would have to link against some system library when building
>> _imagingft.
> 
> could be -- I'm clueless on that one, but if I try in it:
> 
 import PIL._imagingft
> Traceback (most recent call last):
>   File "", line 1, in 
> ImportError:
> dlopen(/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/PIL/_imagingft.so,
> 2): Symbol not found: _inflateEnd
>   Referenced from:
> /Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/PIL/_imagingft.so
> 
>   Expected in: dynamic lookup
> 
> What I don't know is if we should expect -imagingft to b importable all
> by itself, first. Though I wouldn't think it should depend on TK.
> 
> If I do:
> 
 import PIL._imaging
 import PIL._imagingft

The second import still fails for me. But in your case, it was the
symbol _inflateEnd that was missing which is from zlib. _imaging also
depends on zlib, so that explains why importing _imaging first fixes the
second import for you. Apparently, your version of libfreetype doesn't
have the same dependencies as my version. Here, the dependencies are as
follows:

$ otool -L /opt/local/lib/libfreetype.6.dylib
/opt/local/lib/libfreetype.6.dylib:
 /opt/local/lib/libfreetype.6.dylib (compatibility version 10.0.0,
current version 10.20.0)
 /System/Library/Frameworks/CoreServices.framework/Versions/A/CoreServices
(compatibility version 1.0.0, current version 18.0.0)
 
/System/Library/Frameworks/ApplicationServices.framework/Versions/A/ApplicationServices
(compatibility version 1.0.0, current version 22.0.0)
 /usr/lib/libgcc_s.1.dylib (compatibility version 1.0.0, current version
1.0.0)
 /usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current
version 88.3.9)

So in the setup script around line 320 where the _imagingft extension
module is defined, I added the following linker args:

  extra_link_args=["-framework", "CoreServices", "-framework",
"ApplicationServices"]

After that I can actually import _imagingft just on its own and your
test script then also works (after changing the font as the one in the
script doesn't exist on my system). Without the above modification, your
script would still fail unless I import _imagingtk first.

So all the dependencies of the PIL modules are now like this:

$ otool -L PIL/*.so
PIL/_imaging.so:
/usr/lib/libz.1.dylib (compatibility version 1.0.0, current
version 1.2.3)
/usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current
version 88.3.9)
PIL/_imagingcms.so:
/usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current
version 88.3.9)
PIL/_imagingft.so:

/System/Library/Frameworks/CoreServices.framework/Versions/A/CoreServices
(compatibility version 1.0.0, current version 18.0.0)

/System/Library/Frameworks/ApplicationServices.framework/Versions/A/ApplicationServices
(compatibility version 1.0.0, current version 22.0.0)
/usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current
version 88.3.9)
PIL/_imagingmath.so:
/usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current
version 88.3.9)
PIL/_imagingtk.so:
/System/Library/Frameworks/Tcl.framework/Versions/8.4/Tcl
(compatibility version 8.4.0, current version 8.4.0)
/System/Library/Frameworks/Tk.framework/Versions/8.4/Tk
(compatibility version 8.4.0, current version 8.4.0)
/usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current
version 88.3.9)


So do all Python modules compiled on OSX 10.4 automatically work on
newer versions of OSX? Do you want me to send the packages to you for
testing? By the way, what's generally the preferred distribution format,
zip or dmg?

- Matthias -

___
Pythonmac-SIG maillist  -  Pythonmac-SIG@python.org
http://mail.python.org/mailman/listinfo/pythonmac-sig
unsubscribe: http://mail.python.org/mailman/options/Pythonmac-SIG


Re: [Pythonmac-SIG] Subject:, Could py2app bundle all the requirements of my package?

2010-06-06 Thread cool-RR
On Fri, May 21, 2010 at 12:56 PM, Brendan Simon (eTRIX) <
brendan.si...@etrix.com.au> wrote:

>  I think the short answer is yes.
> I've had no trouble with py2app getting all my dependencies.
> You have a bigger app so it may need some extra tweaking, but py2app has
> lots of commands to include and exclude stuff.  It is similar to py2exe from
> what I can tell.
>
> Cheers, Brendan.
>


Thanks for the advice Brendan.

Ram.
___
Pythonmac-SIG maillist  -  Pythonmac-SIG@python.org
http://mail.python.org/mailman/listinfo/pythonmac-sig
unsubscribe: http://mail.python.org/mailman/options/Pythonmac-SIG