Compiling a py2app working build for Leopard and Snow Leopard?

I am currently building a PyObjC application for Snow Leopard, and I have successfully compiled a standalone application. My question is: how to make the assembly compatible with Leopard, given these errors?

dyld: lazy symbol binding failed: Symbol not found: _fopen$UNIX2003 Referenced from: /Applications/MyApp.app/Contents/MacOS/MyApp Expected in: /usr/lib/libSystem.B.dylib dyld: Symbol not found: _fopen$UNIX2003 Referenced from: /Applications/MyApp.app/Contents/MacOS/MyApp Expected in: /usr/lib/libSystem.B.dylib 

This is an application written using Snow Leopard py2app. Also, when I compile on Leopard, on the other hand, this error occurs:

 Traceback (most recent call last): File "/Users/jofell/client/dist/MyApp.app/Contents/Resources/__boot__.py", line 31, in <module> _run('main.py') File "/Users/jofell/client/dist/MyApp.app/Contents/Resources/__boot__.py", line 28, in _run execfile(path, globals(), globals()) File "/Users/jofell/client/dist/MyApp.app/Contents/Resources/main.py", line 17, in <module> from AppKit import * File "AppKit/__init__.pyc", line 10, in <module> File "Foundation/__init__.pyc", line 10, in <module> File "CoreFoundation/__init__.pyc", line 17, in <module> File "objc/_bridgesupport.pyc", line 129, in initFrameworkWrapper File "objc/_bridgesupport.pyc", line 53, in _parseBridgeSupport ValueError: Unknown typestr 2009-08-29 19:30:14.530 MyApp[445:903] MyApp Error 2009-08-29 19:30:14.534 MyApp[445:903] MyApp Error An unexpected error has occurred during execution of the main script 

Any help would be greatly appreciated. Thanks in advance.

+6
python osx-leopard osx-snow-leopard py2app
source share
3 answers

I did this recently, and the trick was to create a standalone version on Leopard .

By default, if you have an open source version of Python installed, py2app creates a semi-autonomous application that has symbolic links to OS files.

If instead you create a standalone version of the application, then the interpreter and supporting files are built into your application and are therefore compatible on all the machines running your application. Instructions for creating a fully self-contained application are available here , but pay attention to the comments on the blog, as some things have changed after the blog post was written.

If you have specific libraries that you need, you can link to them in the setup.py file or, alternatively, you can always add them manually to the dylib directory (which was easier for me since I needed to change the startup scripts and didn don't want to regenerate), but make sure you use 32-bit libraries (which will be on Leopard).

+3
source share

Since both are on a separate architecture (32 bits and 64 bits respectively), I think you need to create 2 different compilations.

0
source share

All Articles