Yury V. Zaytsev wrote:
On Tue, 2010-05-25 at 12:57 -0700, Christopher Barker wrote:
If these work well, I think Fredrik will put them on the PIL site.
If you need a permanent mirror in the States, here you go:
http://packages.zaytsev.net/python/
Thanks, though ideally these would be available in a place everyone
would know to look -- i.e. the PIL site.
What I would want to comment is that it would be nice for you to post
the history script / walk-through / whatever on how you created them, so
that other people would be able to reproduce this if you are busy /
unavailable etc.
For instance, I have a whole bunch of Macs out there...
great -- are any of them running 10.4?
I have little time, but here is the short version:
The goal is to get a PIL binary that is statically linked to all of its
dependencies, and those dependencies are all universal (32 bit PPC and
Intel) and linked against the 10.4 sdk (or even the 10.3 one...)
I achieved all of this except for the 10.4 part...
= Building the dependencies: =
This ended up being trivial with macports:
sudo port install jpeg +universal
sudo port install lcms +universal
sudo port install freetype +universal
= Statically linking them when building PIL: =
This is trickier -- it turns out that the PIL setup.py already looks in
the macports tree for libs. However, gcc prefers dynamic linking, so out
of the box, it will dynamically link the dependencies -- fine on your
machine, but not re-distributable.
I THINK there may be a way to tell gcc, through distutils, to statically
link, but it's hard to find. However, if gcc only finds static libs,
then it will link those.
In this case, I wasn't using macports for anything else on that machine,
so what I did is re-name /opt/local/lib, and then create a new one that
had only static libs in it. then I just ran setup,py build and presto:
all was well.
The better way to do this would be to edit the setup.py to point to a
place where the static libs are instead of mangling your macports install.
One other note about 10.4 -- the last time I tried to build teh deps n a
10.4 machine, I had trouble -- I don't think there are a lot of macports
devs on 10.4 any more, so it tends to be buggier.
To create the package, run bdist_mpkg, you can get that with easy-install
-Chris
--
Christopher Barker, Ph.D.
Oceanographer
Emergency Response Division
NOAA/NOS/OR&R (206) 526-6959 voice
7600 Sand Point Way NE (206) 526-6329 fax
Seattle, WA 98115 (206) 526-6317 main reception
chris.bar...@noaa.gov
_______________________________________________
Pythonmac-SIG maillist - Pythonmac-SIG@python.org
http://mail.python.org/mailman/listinfo/pythonmac-sig
unsubscribe: http://mail.python.org/mailman/options/Pythonmac-SIG