Ah- I think we are getting somewhere...
The ZipEncode and ZipDecode files were not in the build branch at all. I
rmvd the build directory and rebuilt again according to your
instructions. I got the all-is-well summary but still no
ZipEncode/ZipDecode files created in the build directory. In fact, the
build directory did not return. I then ran selftest.py and all 57 tests
passed!
The build and the selftest ran suspiciously quick, though:
[r...@mc2 Imaging-1.1.7]# ls -al build
ls: build: No such file or directory
[r...@mc2 Imaging-1.1.7]# python2.7 setup.py build_ext -i
running build_ext
--------------------------------------------------------------------
PIL 1.1.7 SETUP SUMMARY
--------------------------------------------------------------------
version 1.1.7
platform linux2 2.7.1 (r271:86832, Dec 9 2010, 10:13:10)
[GCC 4.1.2 20080704 (Red Hat 4.1.2-48)]
--------------------------------------------------------------------
*** TKINTER support not available
--- JPEG support available
--- ZLIB (PNG/ZIP) support available
--- FREETYPE2 support available
--- LITTLECMS support available
--------------------------------------------------------------------
To add a missing option, make sure you have the required
library, and set the corresponding ROOT variable in the
setup.py script.
To check the build, run the selftest.py script.
[r...@mc2 Imaging-1.1.7]# python2.7 selftest.py
--------------------------------------------------------------------
PIL 1.1.7 TEST SUMMARY
--------------------------------------------------------------------
Python modules loaded from ./PIL
Binary modules loaded from ./PIL
--------------------------------------------------------------------
--- PIL CORE support ok
*** TKINTER support not installed
--- JPEG support ok
--- ZLIB (PNG/ZIP) support ok
--- FREETYPE2 support ok
--- LITTLECMS support ok
--------------------------------------------------------------------
Running selftest:
--- 57 tests passed.
Also, it does look like the built imaging library is not the same as the
one installed in the PIL branch under ...python2.7/site-packages.
Do you think if I:
rm -rf /usr/local/lib/python2.7/site-packages/PIL*
..and then restore the original source package and start the build from
scratch, it will clear things up? (Actually, I am pretty sure I have
already done this but who knows what might have transpired in-between
last time.)
Thanks!
Adam
On 1/7/2011 8:54 PM, Fredrik Lundh wrote:
Oh, I just noticed that your mail included the "SETUP SUMMARY" but not
the selftest summary. Did you install the missing libraries after an
initial failed build? It could be that distutils didn't rebuild the
necessary files for you...
For a quick sanity check, in your build directory, do:
$ ls -l build/*/libImaging/*.o
and check that the ZipEncode and ZipDecode object files aren't
suspiciously tiny compared to the rest of the modules (they're still
built if zip support is disabled, but are mostly empty in that case).
If this seems to be the case, or if you just want to be sure, nuke the
build directory and run setup again. You can use build_ext -i to
build just the extensions in the current directory:
$ rm -rf build
$ python2.7 setup.py build_ext -i
$ python2.7
import _imaging
dir(_imaging)
... look for zip functions ... or do:
[(k, v) for k, v in vars(_imaging).items() if k[0] == 'z']
[('zip_decoder',<built-in function zip_decoder>), ('zlib_version',
'1.2.3.3'), ('zip_encoder',<built-in function zip_encoder>)]
If your result matches the sample output above, run setup.py install
and make sure that the _imaging.so module installed under
site-packages matches the one that was built locally.
</F>
2011/1/8 Adam M. Johnson<[email protected]>:
Thank you for the troubleshooting technique! I am still getting oriented
with Python. Sadly, this did not reveal anything telling. I ran this command
as root and as the user who will be running it. I ran from the Imaging build
directory, from the directory in which the script is located and from the
user's home directory. All came back with the same path to the library file:
/usr/local/lib/python2.7/site-packages/PIL/_imaging.so
This is what I would expect when things are working correctly.
Is there anything else I can check?
Thanks for your help.
Adam
On 1/7/2011 3:33 PM, Fredrik Lundh wrote:
python -c "import _imaging; print _imaging.__file__"
_______________________________________________
Image-SIG maillist - [email protected]
http://mail.python.org/mailman/listinfo/image-sig