From: fredrik at pythonware.com (Fredrik Lundh)
Date: Wed, 14 Apr 1999 15:23:19 GMT
Subject: Help! PIL compiled into Tkinter in 1.5.2 (Tricky Bits!)
References: <frank-1404991647170001@dora.ned.dem.csiro.au>
Message-ID: <00b501be868a$bbc6a840$f29b12c2@pythonware.com>
Content-Length: 1682
X-UID: 417                                                  

frank <frank at ned.dem.csiro.au> wrote:
> The Setup.in file lists the following 2 lines:
> # *** Uncomment and edit for PIL (TkImaging) extension only:
> #  -DWITH_PIL -I../Extensions/Imaging/libImaging tkImaging.c \

1. unpack Imaging-1.0b1.tar.gz on the same level as
you unpacked Python.

$ ls -l
drwxr-xr-x   8 eff      effie       1024 Mar 29 11:11 Imaging-1.0b1
drwxr-xr-x  15 eff      effie       1024 Mar 25 12:54 Python-1.5.2b2
drwxr-xr-x  14 eff      effie        512 Mar 25 10:32 tcl8.0.5
drwxr-xr-x  16 eff      effie        512 Mar 25 10:40 tk8.0.5

2. build a standard version of Python (preferrably with dynamically
loaded extensions)

3. build PIL according to the instructions in Imaging-1.0b1/README.

4. in Python-1.5.2/Modules/Setup, change the Tkinter
section to something like (this assumes that you've 

# *** Always uncomment this (leave the leading underscore in!):
_tkinter _tkinter.c tkappinit.c -DWITH_APPINIT \
# *** Uncomment and edit to reflect where your Tcl/Tk headers are:
        -I/usr/local/include \
# *** Uncomment and edit to reflect where your X11 header files are:
        -I/usr/include/X11 \
# *** Uncomment and edit for PIL (TkImaging) extension only:
        -DWITH_PIL -I../../Imaging-1.0b1/libImaging ../../Imaging-1.0b1/Tk/tkImaging.c \
# *** Uncomment and edit to reflect where your Tcl/Tk libraries are:
        -L/usr/local/lib \
# *** Uncomment and edit to reflect your Tcl/Tk versions:
        -ltk8.0 -ltcl8.0 \
# *** Uncomment and edit to reflect where your X11 libraries are:
        -L/usr/lib \
# *** Always uncomment this; X11 libraries to link with:
        -lX11

5. rebuild Python.

(works for me, at least)

</F>





