[Distutils] Buildout and PIL problem

Attila Oláh attilaolah at gmail.com
Mon Nov 23 20:05:03 CET 2009


Hi,

On Mon, Nov 23, 2009 at 19:36, Restless Being <restless.being at gmail.com> wrote:
> 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

Ah, I missed that. Of course, djangorecipe thought it'd be a good idea
to update PIL.

> 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

No idea; psycopg2 used to work for my buildout-based projects, but I
haven't tried it with djangorecipe before, but I've just tried it now:
it is working for me. How does your buildout.cfg look like? Do you
depend on psycopg2 in your setup.py (or is it in an extra)?

Cheers,
Attila


More information about the Distutils-SIG mailing list