[Distutils] Buildout and PIL problem
Attila Oláh
attilaolah at gmail.com
Mon Nov 23 16:29:09 CET 2009
Hi,
On Mon, Nov 23, 2009 at 12:26, Restless Being <restless.being at gmail.com> wrote:
> Hi all!
>
>
> 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
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.
> [buildout]
> parts = PIL django
>
> [django]
> recipe = djangorecipe
> version = 1.1
> project = project
> eggs =
> psycopg2
> PIL
> south
> django-reversion
> django-cms
> wsgi = true
> settings = production
>
> [PIL]
> recipe = zc.recipe.egg:custom
> egg = PIL==1.1.6
> find-links = http://dist.repoze.org
With my ugly from above, you can simply define PIL as a dependency in
setup.py or or buildout.cfg, no need for a special recipe.
> and it is something generally recommended by other users. See:
> http://www.stereoplex.com/two-voices/a-django-development-environment-with-zc-buildout
>
> I also tried some other versions of [PIL] like:
> [PIL]
> 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:
Why would you need 1.1.6? 1.1.7 should be a bugfix release anyway...
- Show quoted text -
It's because the files are not in their directory (PIL), so it's not
recognized as a package. After the movearound everything should work
fine.
Bests,
Attila
More information about the Distutils-SIG
mailing list