[PySide] Deploying a PySide app on OS X
Sean Fisk
sean at seanfisk.com
Mon Nov 4 01:49:30 CET 2013
Hi Jon,
I am successfully deploying a .app bundle with the same versions of OS X,
Python, and PySide using py2app. The file generated by py2applet
--make-setup rarely works as-is. In particular, I had to add PySide.QtCoreand
PySide.QtGui to the list of modules to include, e.g.,
APP = ['...']
DATA_FILES = []
OPTIONS = {
'argv_emulation': True,
'includes': ['PySide.QtCore', 'PySide.QtGui'],
}
setup(
app=APP,
data_files=DATA_FILES,
options={'py2app': OPTIONS},
setup_requires=['py2app'],
)
Include other PySide modules as well if you are using something other than
QtGui.
Hope this helps,
--
Sean Fisk
On Mon, Oct 28, 2013 at 11:07 AM, Jonathan Steele <jsteele at cert.org> wrote:
> I have a PySide application that I'm struggling to build into an
> application (.app) that other OS X users can run, and hoped that someone
> here might have some tips to get me going. I'm running OS X 10.6, python
> 2.7, and PySide 4.8.4. I have very little experience with this side of
> things, but here is what I've tried so far:
>
> 1. Using py2app. I generated a basic setup.py and tried to use it to
> build the app. The dependencies seem to copy fine, but then I get this
> error:
>
> /usr/bin/strip: the __LINKEDIT segment does not cover the end of the file
> (can't be processed) in:
> /Users/jsteele/work/releases/ipfixview-0.1.0/dist/main.app/Contents/Framewo
> rks/QtCore.framework/Versions/4/QtCore
>
> Some googling left me with the impression that there's an architecture
> mismatch between the way the QtCore library is built and what py2app is
> trying to build, but I'm not clear on how to proceed to resolve this.
>
> 2. Ryan Kelly's myppy. This seemed like a promising idea, but after
> installing myppy, I got an error trying to init a workspace:
>
> BUILDING FOR ARCH ppc
> /usr/bin/gcc -Os -arch ppc -mmacosx-version-min=10.4 -isysroot
> /Developer/SDKs/MacOSX10.4u.sdk
> -I/Users/jsteele/work/myppy/ipfixview.app/Contents/Frameworks/Python.framew
> ork/Versions/2.7/include -I. -c -o example.o test/example.c
> In file included from ./zconf.h:427,
> from ./zlib.h:34,
> from test/example.c:8:
> /Developer/SDKs/MacOSX10.4u.sdk/usr/include/stdarg.h:4:25: error:
> stdarg.h: No such file or directory
> In file included from test/example.c:8:
> ./zlib.h:1758: error: expected declaration specifiers or Œ...¹ before
> Œva_list¹
> make: *** [example.o] Error 1
>
>
>
> 3. Using cx_Freeze. I initially had a problem getting the dependencies
> copied correctly because cx_Freeze runs "otool -L" to find them and
> expects an absolute path, but the pyside libraries returned only the
> library name with no path. I fixed that using install_name_tool -change
> to specify the full path, and then seemed to successfully generate the
> .app. It runs correctly on my machine. However, when I gave it to a
> colleague to try, he got this error:
>
> LSOpenURLsWithRole() failed with error -10810
>
> The error code of -10810 translates to "An unknown error has occurred",
> which doesn't exactly help point me towards a resolution!
>
> Recommendations on how to proceed would be gratefully received. Thanks!
>
> --Jon
>
> _______________________________________________
> PySide mailing list
> PySide at qt-project.org
> http://lists.qt-project.org/mailman/listinfo/pyside
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.qt-project.org/pipermail/pyside/attachments/20131103/12536f38/attachment.html>
More information about the PySide
mailing list