This is the mail archive of the
cygwin@cygwin.com
mailing list for the Cygwin project.
Python and PIL and rebase, oh my! (update)
- From: Charles Wilson <cwilson at ece dot gatech dot edu>
- To: cygwin at cygwin dot com
- Date: Mon, 23 Jun 2003 23:06:18 -0400
- Subject: Python and PIL and rebase, oh my! (update)
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
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":
--
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/