delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2003/06/23/23:08:31

Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sources.redhat.com/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sources.redhat.com/ml/#faqs>
Sender: cygwin-owner AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
Delivered-To: mailing list cygwin AT cygwin DOT com
Message-ID: <3EF7C02A.80000@ece.gatech.edu>
Date: Mon, 23 Jun 2003 23:06:18 -0400
From: Charles Wilson <cwilson AT ece DOT gatech DOT edu>
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.4) Gecko/20030612
X-Accept-Language: en-us, en
MIME-Version: 1.0
To: cygwin AT cygwin DOT com
Subject: Python and PIL and rebase, oh my! (update)

--------------080508080001030804000708
Content-Type: text/plain; charset=us-ascii; format=flowed
Content-Transfer-Encoding: 7bit

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


--------------080508080001030804000708
Content-Type: text/plain;
 name="Imaging-1.1.4.patch"
Content-Transfer-Encoding: 7bit
Content-Disposition: inline;
 filename="Imaging-1.1.4.patch"

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":


--------------080508080001030804000708
Content-Type: text/plain; charset=us-ascii

--
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/
--------------080508080001030804000708--

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019