On 13 Aug, 2012, at 18:38, Jay L. <jzl5...@psu.edu> wrote:

> List, 
> 
> Using py2app to bundle scripts which depend on GDAL (libgdal.1.dylib).  Gdal, 
> in turn, depends on libpng12.0.dylib.  On my build machine the bundled app 
> works wonderfully.  On another machine I am receiving an "Incompatible 
> library version" error, specifying that libgdal.1.dylib requires 
> libpng12.0.dylib required version 47.0.0 or later.  
> /usr/X11/lib/libpng.12.0.dylib provides version 45.0.0.
> 
> Can I manually include the correct version of libpng12.0.dylib, bundled with 
> my app?

Yes, just link GDAL with a copy of libpng that is not in a system location. 
Py2app won't include files in system locations into the application bundle, and 
uses dependency information in the binaries to locate the libraries it should 
include. That dependency information contains the full path to the required 
shared libraries, just having a copy of libpng12.0.dylib will therefore not 
work but you have to link libgdal to that copy.

Ronald

> 
> Build machine:
> OSX 10.6.8
> Python 2.7 64-bit installed via Homebrew
> 
> Testing Machine:
> OSX 10.6.7
> System Python (not that that should matter, because my 64-bit python should 
> be bundled)
> 
> I tried adding the frameworks option to setup.py, but without success.  I 
> added another libpng12.0.dylib that was on my system.
> 
> My setup.py:
> 
> """
> This is a setup.py script generated by py2applet
> 
> Usage:
>     python setup.py py2app
> """
> 
> from setuptools import setup
> 
> PACKAGES=['osgeo']
> 
> APP = ['PyStretch.py']
> DATA_FILES = []
> OPTIONS = {'compressed':True,
>            'packages': PACKAGES,
>            'frameworks':['/isis3/isis/3rdParty/lib/libpng12.0.dylib']}
> 
> 
> setup(
>     app=APP,
>     data_files=DATA_FILES,
>     options={'py2app': OPTIONS},
>     setup_requires=['py2app'],
> )
> 
> Any insight appreciated, 
> Jay
> _______________________________________________
> Pythonmac-SIG maillist  -  Pythonmac-SIG@python.org
> http://mail.python.org/mailman/listinfo/pythonmac-sig
> unsubscribe: http://mail.python.org/mailman/options/Pythonmac-SIG

Attachment: smime.p7s
Description: S/MIME cryptographic signature

_______________________________________________
Pythonmac-SIG maillist  -  Pythonmac-SIG@python.org
http://mail.python.org/mailman/listinfo/pythonmac-sig
unsubscribe: http://mail.python.org/mailman/options/Pythonmac-SIG

Reply via email to