public inbox for cygwin@cygwin.com
 help / color / mirror / Atom feed
* Python and PIL and rebase, oh my! (update)
@ 2003-06-24  5:42 Charles Wilson
  2003-06-24 11:37 ` S. L.
  2003-06-26 15:09 ` Python and PIL and rebase, oh my! (update) Jason Tishler
  0 siblings, 2 replies; 6+ messages in thread
From: Charles Wilson @ 2003-06-24  5:42 UTC (permalink / raw)
  To: cygwin

[-- Attachment #1: Type: text/plain, Size: 1773 bytes --]

Similar to my message of 9-May-2002, but updated with regards to 
python-2.2.3-2, the official rebase-2.2-2 package which was not 
available last May, and the recent tk-8.4 release (tcltk-20030214-1).

To compile PIL on cygwin, you need:
   gcc/binutils
   python-2.2.3-2
   rebase-2.2-2
   tcltk-20030214-1
   ( special: tk-includes-8.4.tar.bz2 ; see below )

1) grabbed the various include files from the naked-tk CVS repo on
    sourceware, and put them into /usr/include/tk/* and 
/usr/include/tk/X11/*.
    You can (temporarily) get them here:
      http://www.neuro.gatech.edu/users/cwilson/cygutils/testing/
        tk-includes-8.4.tar.bz2

2) downloaded the PIL 1.1.4 archive, unpacked it

3) applied the attached patch

4) fixed up some symlinks
   cd  /usr/lib
   ln -s libtk84.a libtk8.4.a
   ln -s libtcl84.a libtcl8.4.a

5) rebased a bunch of DLLs using Jason's rebase tool:

close all cygwin processes, including rxvt windows
start a DOS-box bash shell
run rebaseall -v

6) Followed the instructions to build and install PIL

cd Imaging-1.1.4/libImaging
./configure
make
cd ..
python setup.py build
python setup.py install

7) rebase, but this time including the PIL dll's

first, set things up to 'trick' rebaseall
   cd /
   find /usr/lib/python2.2/site-packages -name "*.dll" > \
     /etc/setup/python-site-packages.lst
   gzip /etc/setup/python-site-packages.lst
then, close all cygwin processes, including rxvt windows
start a DOS-box bash shell
run rebaseall -v

8) ran the self-tests, it worked.  viewer.py also worked...very impressive.

    python selftest.py
    python Scripts/viewer.py <an image file>

9) Also, you might want to install the following files into
     /usr/include/python2.2/Extensions/
      ImConfig.h  ImPlatform.h  Imaging.h


[-- Attachment #2: Imaging-1.1.4.patch --]
[-- Type: text/plain, Size: 617 bytes --]

diff -urN -x build Imaging-1.1.4-orig/setup.py Imaging-1.1.4/setup.py
--- Imaging-1.1.4-orig/setup.py	Thu Mar 14 14:55:04 2002
+++ Imaging-1.1.4/setup.py	Thu May  9 17:36:17 2002
@@ -40,7 +40,7 @@
 
 MODULES = []
 
-INCLUDE_DIRS = ["libImaging"]
+INCLUDE_DIRS = ["libImaging", "/usr/include/tk"]
 LIBRARY_DIRS = ["libImaging"]
 LIBRARIES = ["Imaging"]
 
@@ -117,7 +117,7 @@
 except (ImportError, AttributeError):
     pass
 else:
-    INCLUDE_DIRS = ["libImaging"]
+    INCLUDE_DIRS = ["libImaging", "/usr/include/tk"]
     LIBRARY_DIRS = ["libImaging"]
     LIBRARIES = ["Imaging"]
     if sys.platform == "win32":


[-- Attachment #3: Type: text/plain, Size: 218 bytes --]

--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2003-06-26 13:01 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-06-24  5:42 Python and PIL and rebase, oh my! (update) Charles Wilson
2003-06-24 11:37 ` S. L.
2003-06-25  7:14   ` gtk on cygwin [was: Re: Python and PIL and rebase, oh my! (update)] Charles Wilson
2003-06-25 15:15     ` S. L.
2003-06-26 15:09 ` Python and PIL and rebase, oh my! (update) Jason Tishler
2003-06-26 15:18   ` Norman Vine

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).