[reportlab-users] Problem on Mac OSX
reed.l.obrien at nasa.gov
Tue Oct 2 09:07:18 EDT 2007
#download and untar the jpeg library
#see here for location http://www.ijg.org/
curl http://path/to/jpegsrc.v6b.tar.gz | tar zxf -
#change directory to
# PIC should be fine even not on 64bit I think
#Run make install
sudo make install
#copy the lib file to lib
cp libjpeg.a /usr/local/lib
#copy headers to include
cp *.h /usr/local/include
#make this your real python
#get and untar the PIL source
curl http://path/to/Imaging-1.1.6.tar.gz | tar zxf -
# copy setup out of it's way
mv setup.py setup.py.tmp
# set up a replacement command
# you can do edit setup.py by hand if you wish
SED_CMD="s|JPEG_ROOT = None|JPEG_ROOT = libinclude(\"/usr/local/lib
\")|; s|ZLIB_ROOT = None|ZLIB_ROOT = libinclude(\"/usr/local/lib\")|;"
#replace the stock jpg locations with the new ones you made
cat setup.py.tmp | sed -e "$SED_CMD" > setup.py
$PYTHON_COMMAND setup.py build_ext -i
sudo $PYTHON_COMMAND setup.py install
Is what I have in my build notes.
On Oct 2, 2007, at 8:50 AM, Y Tu wrote:
> Sorry, I got confused about the code, especially the first part.
> Could you explain it a bit? Thank you very much.
> > From: reed.l.obrien at nasa.gov
> > Date: Mon, 1 Oct 2007 15:57:12 -0400
> > To: reportlab-users at reportlab.com
> > Subject: Re: [reportlab-users] Problem on Mac OSX
> > On Oct 1, 2007, at 3:44 PM, Andy Robinson wrote:
> > > I think this is a problem with the specific copy of the Python
> > > Library you have installed on your Mac OS. On many platforms,
> PIL is
> > > compiled with jpeg support. It seems your PIL isn't. We also had
> > > this from a customer on Mac OS last week.
> > >
> > > Can anyone who knows Mac OS well recommend what versions of PIL to
> > > install, or what options are needed to recompile it with JPEG
> > >
> > > On your second question, we don't normally run scripts from
> within an
> > > interactive prompt.
> > > If you want to, you need to run the same code which is at the
> > > of that script e.g.
> > > CEO/Chief Architect
> > > ReportLab Europe Ltd.
> > > 165 The Broadway, Wimbledon, London SW19 1NE, UK
> > > Tel +44-20-8544-8049
> > > _______________________________________________
> > > reportlab-users mailing list
> > > reportlab-users at reportlab.com
> > > http://two.pairlist.net/mailman/listinfo/reportlab-users
> > cd jpeg-6b
> > ./configure # if 64 bit uncomment => CFLAGS='-fPIC'
> > make
> > make install
> > ranlib libjpeg.a
> > cp libjpeg.a /usr/local/lib
> > cp *.h /usr/local/include
> > PYTHON_COMMAND="/path/to/your/python"
> > cd Imaging-1.1.6
> > mv setup.py setup.py.tmp
> > SED_CMD="s|JPEG_ROOT = None|JPEG_ROOT = libinclude(\"/usr/local/lib
> > \")|; s|ZLIB_ROOT = None|ZLIB_ROOT = libinclude(\"/usr/local/lib
> > cat setup.py.tmp | sed -e "$SED_CMD" > setup.py
> > $PYTHON_COMMAND setup.py build_ext -i
> > $PYTHON_COMMAND selftest.py
> > $PYTHON_COMMAND setup.py install
> > Is what I have in my build notes.
> > ~r
> > _______________________________________________
> > reportlab-users mailing list
> > reportlab-users at reportlab.com
> > http://two.pairlist.net/mailman/listinfo/reportlab-users
> Boo! Scare away worms, viruses and so much more! Try Windows Live
> OneCare! Try now!
> reportlab-users mailing list
> reportlab-users at reportlab.com
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the reportlab-users