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

Christopher Barker Chris.Barker at noaa.gov
Sat Jun 5 21:48:08 CEST 2010

Matthias Baas wrote:
> Christopher Barker wrote:
> Ha! I haven't had a look at selftest.py before. That script requires an
> inplace build which I didn't do. Instead, I was pointing PYTHONPATH
> inside the build directory

yup -- that will confuse things.

> But when I link
> against the static lib, the test script only runs fine because it
> imports the tk module before the freetype one. Whereas when I just
> import _imagingft, I get this:
>>>> import PIL._imagingft
> Traceback (most recent call last):
>   File "<stdin>", line 1, in <module>
> 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 "<stdin>", line 1, in <module>
2): Symbol not found: _inflateEnd
   Referenced from: 
   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

it works fine -- which makes sense --you'd never need to import 
_imagingft without importing _imaging first.

> By the way, _imaging.so still depends on /usr/lib/libz.1.dylib, but I
> suppose as this is a library that ships with OSX, this should be
> available on all systems and so it should be fine. Is this correct?

yes -- that's correct.

I'd say if all the self-tests run, you're in pretty good shape.

Try the enclosed test, too -- it uses freetype, without TK (at least not 


Christopher Barker, Ph.D.

Emergency Response Division
NOAA/NOS/OR&R            (206) 526-6959   voice
7600 Sand Point Way NE   (206) 526-6329   fax
Seattle, WA  98115       (206) 526-6317   main reception

Chris.Barker at noaa.gov
-------------- next part --------------
A non-text attachment was scrubbed...
Name: SimplePILTest.py
Type: application/x-python
Size: 614 bytes
Desc: not available
URL: <http://mail.python.org/pipermail/image-sig/attachments/20100605/84e97b6d/attachment.bin>

More information about the Image-SIG mailing list