[Distutils] Buildout and PIL problem

Restless Being restless.being at gmail.com
Mon Nov 23 12:02:47 CET 2009


  I have a virtualenv created with --no-site-packages option and I'm going
to install there Django and some required libs using buildout. The
problematic library is PIL. Here is my buildout.cfg

parts = PIL django

recipe = djangorecipe
version = 1.1
project = project
eggs =
wsgi = true
settings = production

recipe = zc.recipe.egg:custom
egg = PIL==1.1.6
find-links = http://dist.repoze.org

and it is something generally recommended by other users. See:

I also tried some other versions of [PIL] like:
recipe = zc.recipe.egg:custom
egg = PIL==1.1.6
find-links = http://dist.repoze.org/PIL-1.1.6.tar.gz
index = http://dist.repoze.org/index

The first problem is that the above recipe installs PIL 1.1.7 instead of
1.1.6. Here is install log:

python bin/buildout -c devel.cfg
Updating django.
Getting distribution for 'PIL'.
WARNING: '' not a valid package name; please use only.-separated package
names in setup.py
In file included from /usr/include/python2.6/Python.h:8,
from libImaging/ImPlatform.h:10,
from libImaging/Imaging.h:14,
from Tk/tkImaging.c:53:
/usr/include/python2.6/pyconfig.h:1028:1: warning: "_POSIX_C_SOURCE"
In file included from /usr/include/stdio.h:28,
from /usr/include/tcl.h:141,
from /usr/include/tk.h:21,
from Tk/tkImaging.c:51:
/usr/include/features.h:210:1: warning: this is the location of the previous
version 1.1.7
platform linux2 2.6.4 (r264:75706, Oct 27 2009, 06:16:59)
[GCC 4.4.1]
--- TKINTER support available
--- JPEG support available
--- ZLIB (PNG/ZIP) support available
--- FREETYPE2 support available
--- LITTLECMS support available
To check the build, run the selftest.py script.
zip_safe flag not set; analyzing archive contents...
Image: module references __file__
Got PIL 1.1.7.

Second problem is that the above PIL installation doesn't work with Django:

bin/django validate
Error: One or more models did not validate:
picture.picture: "image": To use ImageFields, you need to install the Python
Imaging Library. Get it at http://www.pythonware.com/products/pil/ .

At the same time, everything is ok when I manually install PIL using: pip
install http://effbot.org/downloads/Imaging-1.1.6.tar.gz

Any hints?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/distutils-sig/attachments/20091123/a547dfca/attachment.htm>

More information about the Distutils-SIG mailing list