[Distutils] Buildout and PIL problem

Restless Being restless.being at gmail.com
Mon Nov 23 19:36:51 CET 2009


2009/11/23 Attila Oláh <attilaolah at gmail.com>

> PIL is known to have issues with buildout. Your problem is that it
> puts it's files in <buildout>/eggs/PIL-#.#.#-py#.#-##.egg/, whereas it
> should put them in <buildout>/eggs/PIL-#.#.#-py#.#-##.egg/PIL/.
>
> As a workaround, you could run buildout like this (or put this in a
> shell script):
>
> ./bin/buildout -N && mkdir `find eggs -iname PIL*.egg`/PIL && mv `find
> eggs -iname PIL*.egg`/*.* `find eggs -iname PIL*.egg`/PIL
>
> I know it looks rather ugly. I don't know if there's a better solution
> though.
>
It's ugly but the problem is rather that I'd like to use buildout to avoid
such things (it's my first buildout config). But thanks.


>
> Why would you need 1.1.6? 1.1.7 should be a bugfix release anyway...
>
Because 1.1.6 from repoze has correct structure. It has PIL in its egg.

This config installs both PILs 1.1.6 and 1.1.7:

[buildout]
parts = PIL django omlette cms-media

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

[django]
recipe = djangorecipe
version = 1.1
project = project
eggs =
PIL
psycopg2
south
django-reversion
django-cms
wsgi = true
settings = production

[omlette]
recipe = collective.recipe.omelette
eggs = ${django:eggs}

[cms-media]
recipe = svetlyak40wt.recipe.symlinks
path = project/media
files =
${buildout:parts-directory}/omlette/cms/media/cms cms


but this work as expected:

[buildout]
parts = PIL django omlette cms-media

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

[django]
recipe = djangorecipe
version = 1.1
project = project
eggs =
PIL == 1.1.6
psycopg2
south
django-reversion
django-cms
wsgi = true
settings = production

[omlette]
recipe = collective.recipe.omelette
eggs = ${django:eggs}

[cms-media]
recipe = svetlyak40wt.recipe.symlinks
path = project/media
files =
${buildout:parts-directory}/omlette/cms/media/cms cms

So it's solved. Buildout was installing two different versions of PIL, one
for PIL part (1.1.6) and another one for django part (1.1.7). After I added
specific version to PIL in django it works :D

One more question. Why after I added eggs = psycopg2 just after [buildout]
buildout reported that it is omitting unused eggs in [buildout]? I had to
move psycopg2 to eggs in djangopart.

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


More information about the Distutils-SIG mailing list