[GRASS-dev] PIL needs to be a GRASS dependency

Glynn Clements glynn at gclements.plus.com
Wed Nov 23 14:31:03 EST 2011


Michael Barton wrote:

> Since the Python Imaging Library (PIL) is needed to fully use the
> cartographic composer, this needs to be a dependency of GRASS, just like
> numpy. Since both of these packages do not come with the standard Python
> distribution, it would be good if we could package/bundle them in binary
> distributions. Otherwise, stuff will not work. This is needed for GRASS
> 6.4 as well as GRASS 7. I'm not sure what is needed for this to happen,
> but it will be helpful to users (and very frustrating to them if not
> there).

We should not be trying to bundle either Python or any of its
libraries.

If the user already has a suitable version of Python on their system,
GRASS should use it (in 7.0, there isn't really any choice, as Windows
will have associated the .py extension with the installed version),
and any libraries will need to be compatible with that version (i.e. 
if the user has Python 2.7, 64-bit, providing libararies for 2.6 or
32-bit won't work).

Also, GUI components should fail gracefully in the absence of required
libraries, i.e. a lack of PIL should result in the cartographic
composer not working (at worst), not the GUI not working.

BTW: what does PIL offer that wxImage doesn't? wxPython is already a
required dependency, so PIL seems a bit gratuitous. Apart from its
image format readers and writers, most of PIL'S other functionality is
easily (and often better) performed using NumPy.

-- 
Glynn Clements <glynn at gclements.plus.com>


More information about the grass-dev mailing list