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

* Re: Python and PIL and rebase, oh my! (update)
  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-26 15:09 ` Python and PIL and rebase, oh my! (update) Jason Tishler
  1 sibling, 1 reply; 6+ messages in thread
From: S. L. @ 2003-06-24 11:37 UTC (permalink / raw)
  To: Charles Wilson; +Cc: cygwin

Chuck,
> Similar to my message of 9-May-2002, but updated with regards to 
[...]

LONGING, for the same 'bout gtk2 suite. Especially now, when tml advertises 

http://web.sfc.keio.ac.jp/~s01397ms/cygwin/

where it's quite a patch suite, nice organized with win32/cyg-xfree86
backends. Except a minimal howto on how to use the patches.

SLao

-- 
+++ GMX - Mail, Messaging & more  http://www.gmx.net +++
Bitte lächeln! Fotogalerie online mit GMX ohne eigene Homepage!


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

* gtk on cygwin [was: Re: Python and PIL and rebase, oh my! (update)]
  2003-06-24 11:37 ` S. L.
@ 2003-06-25  7:14   ` Charles Wilson
  2003-06-25 15:15     ` S. L.
  0 siblings, 1 reply; 6+ messages in thread
From: Charles Wilson @ 2003-06-25  7:14 UTC (permalink / raw)
  Cc: cygwin

S. L. wrote:

> Chuck,
> 
>>Similar to my message of 9-May-2002, but updated with regards to 
> 
> [...]
> 
> LONGING, for the same 'bout gtk2 suite. Especially now, when tml advertises 
> 
> http://web.sfc.keio.ac.jp/~s01397ms/cygwin/
> 
> where it's quite a patch suite, nice organized with win32/cyg-xfree86

I have no idea why you replied personally to me.  I have no idea why you 
felt this topic had ANYTHING to do with python, PIL, and rebase.  I 
short, the point of your message escapes me.

However, you'd probably be better off looking here

http://cygnome.sourceforge.net/

for gtk, gnome, etc on cygwin.

--
Chuck



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

* Re: gtk on cygwin [was: Re: Python and PIL and rebase, oh my! (update)]
  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.
  0 siblings, 0 replies; 6+ messages in thread
From: S. L. @ 2003-06-25 15:15 UTC (permalink / raw)
  To: cygwin

Chuck,

[...]
> I have no idea why you replied personally to me. 
[...]

Apologies for the annoyance.


SLao

-- 
+++ GMX - Mail, Messaging & more  http://www.gmx.net +++
Bitte lächeln! Fotogalerie online mit GMX ohne eigene Homepage!


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

* Re: Python and PIL and rebase, oh my! (update)
  2003-06-24  5:42 Python and PIL and rebase, oh my! (update) Charles Wilson
  2003-06-24 11:37 ` S. L.
@ 2003-06-26 15:09 ` Jason Tishler
  2003-06-26 15:18   ` Norman Vine
  1 sibling, 1 reply; 6+ messages in thread
From: Jason Tishler @ 2003-06-26 15:09 UTC (permalink / raw)
  To: cygwin

On Mon, Jun 23, 2003 at 11:06:18PM -0400, Charles Wilson wrote:
> 7) rebase, but this time including the PIL dll's
> 
> first, set things up to 'trick' rebaseall

My intention is to enhance rebaseall (and in turn rebase) to support an
option to specify additional DLLs so it won't be necessary to "trick"
rebaseall.

Jason

-- 
PGP/GPG Key: http://www.tishler.net/jason/pubkey.asc or key servers
Fingerprint: 7A73 1405 7F2B E669 C19D  8784 1AFD E4CC ECF4 8EF6

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

* RE: Python and PIL and rebase, oh my! (update)
  2003-06-26 15:09 ` Python and PIL and rebase, oh my! (update) Jason Tishler
@ 2003-06-26 15:18   ` Norman Vine
  0 siblings, 0 replies; 6+ messages in thread
From: Norman Vine @ 2003-06-26 15:18 UTC (permalink / raw)
  To: cygwin

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

Jason Tishler writes:
> 
> On Mon, Jun 23, 2003 at 11:06:18PM -0400, Charles Wilson wrote:
> > 7) rebase, but this time including the PIL dll's
> > 
> > first, set things up to 'trick' rebaseall
> 
> My intention is to enhance rebaseall (and in turn rebase) to support an
> option to specify additional DLLs so it won't be necessary to "trick"
> rebaseall.

attached find my local copy of rebaseall that is modified to
make adding Python extension modules easier

Cheers

Norman


[-- Attachment #2: rebaseall --]
[-- Type: application/octet-stream, Size: 2183 bytes --]

#!/bin/bash

#
# Copyright (c) 2003 Jason Tishler
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
#
# A copy of the GNU General Public License can be found at
# http://www.gnu.org/
#
# Written by Jason Tishler <jason@tishler.net>
#
# Modified by Norman Vine <nhv@cape.com> 2003/06/25
#  to include /usr/lib/python$VER/site-dir/*.dll
#         and /usr/local/bin/*.dll
#
# $Id: rebaseall,v 1.3 2003/02/07 19:39:33 jt Exp $
#

# Define constants
ProgramName=$(basename $0)
ProgramOptions='b:o:v'
DefaultBaseAddress=0x70000000
DefaultOffset=0x10000
DefaultVerbose=

# Define functions
usage()
{
    echo "usage: $ProgramName [-b BaseAddress] [-o Offset] [-v]"
    exit 1
}

cleanup()
{
    rm -f $TmpFile
    exit 0
}

# Set traps
trap cleanup HUP INT TERM

# Set defaults
BaseAddress=$DefaultBaseAddress
Offset=$DefaultOffset
Verbose=$DefaultVerbose

# Parse command line arguments
while getopts $ProgramOptions Option $*
do
    case $Option in
    b)
	BaseAddress=$OPTARG;;
    o)
	Offset=$OPTARG;;
    v)
	Verbose=-v;;
    \?)
	usage;;
    esac
done

# Set temp directory
TmpDir=${TMP:-${TEMP:-/tmp}}

# Validate temp directory
if [ ! -d $TmpDir ]
then
    echo "$ProgramName: $TmpDir is not a directory"
    exit 2
fi
if [ ! -w $TmpDir ]
then
    echo "$ProgramName: $TmpDir is not writable"
    exit 2
fi

# Set temp file
TmpFile=$TmpDir/rebase.lst
SortFile=$TmpDir/rebase.sort

# Create rebase list
# FIXME: Remove ugly Apache hack ASAP
zcat /etc/setup/*.lst.gz | grep 'dll$' |
    sed -e '/cygwin1.dll$/d' -e 's/^/\//' -e 's/apache\/new/apache/' >$TmpFile

find /usr/local/bin/ -name '*.dll' >> $TmpFile

_py_version=`PYTHON -c 'import sys; print sys.version[0:3]'`
find /usr/lib/python$_py_version/site-packages -name '*.dll' >> $TmpFile

sort -u --output=$SortFile $TmpFile

# Rebase files
rebase -v $Verbose -d -b $BaseAddress -o $Offset -T $SortFile

# Clean up
cleanup


[-- 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).