Re: [Pythonmac-SIG] (PyQt and py2app) Gui starts in IDLE but not as app ...
On 4 May, 2012, at 7:18, Jonathan Kossick wrote: Thanks a lot! Until now I just used the console. I'm new to python on OS X so I need some time to work me into. There are some interesting error messages: Class QCocoaColorPanelDelegate is implemented in both /Users/User/Desktop/Vokabelprogramm/Mac-Werkstatt/Programm-Ordner/voc2brain.app/Contents/MacOS/../Frameworks/QtGui.framework/Versions/4/QtGui and /Library/Frameworks/QtGui.framework/Versions/4/QtGui. One of the two will be used. Which one is undefined. This message is repeating several times because of different classes. Seemingly the application can't decide if it should use the installed Qt version or the version includet in the application file. While research I read something about install_name_tool but I'm still not sure how to fix the problem. Hope you can help me ... I'm not sure what is causing this problem. As you noticed the application seems to load both the embedded copy of Qt (as it should) and the system-wide install (which shouldn't be used). This could explain why your program won't start. The py2app respository contains an example that uses PyQt, you can download the two files for this example at https://bitbucket.org/ronaldoussoren/py2app/src/tip/examples/PyQt. Does this example also fail? And something I completely forgot to ask: which version of Python, PyQt, Qt and Py2app do you use? Is the python version the system installed one or a custom install (and if so, how did you install)? Ronald Am Donnerstag, 3. Mai 2012 schrieb Ronald Oussoren : On 3 May, 2012, at 14:28, Jonathan Kossick wrote: Hello, my problem is kind of weird. As long as I run my PyQt application in IDLE everything works great but when I build an app by using py2app the gui doesn' t start. I already did a little bit debugging but apparently the application crashes when I want do show the gui (main.show()). The application just stops and there is no useful message ... If i make a really short application which just starts the gui then everything works fine. My application is really big wherefore I dont know where to search the problem first. Why does the problem just appeal if I build the app and not if i start it in IDLE? Where can I start to search the problem? Any ideas? Unfortunately I cant give more informations ... You can start the application from the command line and that might give you some more clues. The way to do that for HelloWorld.app is to run HelloWorld.app/Contents/MacOS/HelloWorld as a normal shell command in the terminal application. Any error messages that get printed during startup are now shown in the terminal window. Ronald ___ Pythonmac-SIG maillist - Pythonmac-SIG@python.org http://mail.python.org/mailman/listinfo/pythonmac-sig unsubscribe: http://mail.python.org/mailman/options/Pythonmac-SIG 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
Re: [Pythonmac-SIG] py2app, system Python, and Mac App Store
On 4 May, 2012, at 0:53, Kevin Walzer wrote: My recent difficulties getting a Python app uploaded to the Mac App Store (owing to apparent issues with Apple's uploader, which seems to strip out symlinks in the embedded framework) That sucks. have prompted me to look at deploying a version of my app linked to the system Python. I've never deployed a semi-standalone app, so I'm not sure what issues to be aware of. How does backward and forward compatibility work? (I'm on Lion.) If I have any extensions that I want wrapped (currently they are in my site-packages dir in /Library/Frameworks/Python), do I need to move them? --semi-standalone without --site-packages should result in a build that doesn't access your site-packages directory (and that includes /Library/Frameworks/Python). The Apple provided bits are considered part of the stdlib for this (twisted, pyobjc, ...) because they cannot be copied into the application bundle. Apple tends to be fairly careful w.r.t. backward compatibility, but when you create a semi-standalone on Lion it will not necessarily run on Snow Leopard. On a related note, does anyone else have a Python app in the Mac App Store? I don't. Ronald 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
Re: [Pythonmac-SIG] py2app, system Python, and Mac App Store
On 5/4/12 3:32 AM, Ronald Oussoren wrote: --semi-standalone without --site-packages should result in a build that doesn't access your site-packages directory (and that includes /Library/Frameworks/Python). The Apple provided bits are considered part of the stdlib for this (twisted, pyobjc, ...) because they cannot be copied into the application bundle. How do I make sure that binary packages from my site-packages directory are copied into (and found) in the app bundle, in lib-dyload? When I try a semi-standalone build and use the --site-packages flag, my app looks in /System/Library/Frameworks/Python.framework for the modules, and the app crashes. Poking around in the list archives, it seems that this type of configuration for py2app (semi-standalone but using some packages from the site-packages dir) is a bit delicate, though my research hasn't been comprehensive. What are the best practices here? I'm getting quite frustrated with the app store's brain dead auto-scan tool that doesn't see proper symlinks in the framework, and I'm getting to the point where I am going to investigate other packaging tools that don't set up a framework structure--cx_freeze and/or pyinstaller. No blame to py2app here, of course. I appreciate your advice and support. --Kevin -- Kevin Walzer Code by Kevin http://www.codebykevin.com ___ Pythonmac-SIG maillist - Pythonmac-SIG@python.org http://mail.python.org/mailman/listinfo/pythonmac-sig unsubscribe: http://mail.python.org/mailman/options/Pythonmac-SIG