setup.py syntax error building python-imaging

Fredrik Lundh fredrik at pythonware.com
Sun May 11 04:11:28 EDT 2003


Sherwin J. Singer wrote:

> I am trying to build python-imaging on RH7.3 (so I can use Sketch).  After
> successfully compiling libImaging.a, I get a syntax error trying to execute
> the setup.py program:
>
> > python setup.py build
>   File "setup.py", line 191
>     for fw in 'Tcl', 'Tk'
>       ^
> SyntaxError: invalid syntax

there's a list comprehension in the mac os x build fork that
wasn't supposed to be there.

workarounds:

- make sure you're building with Python 2.1 or later (see
  David's reply)

- edit setup.py, and replace the code inside the
  <if sys.platform == "darwin"> clause with a single
  "pass"

- downgrade to PIL 1.1.3

- change "Python 2.0" to "Python 2.1" in PIL's README file

I'll fix this in 1.1.5.

thanks /F








More information about the Python-list mailing list