Re: [Pythonmac-SIG] Building an app with dependencies
Alexandre Quessy wrote: I am trying to build a Python Mac OS X application that has quite a lot of dependencies. We rely on wx, appscript, objc, zope, twisted and more. That can be a challenge, I'm not sure how well all of those are supported by py2app recipes -- but some are! Below I provide my setup.py script. You've included a while bunch of stuff by ahnd. In general, you don't want to do that. Py2app examines your code and tries to include everything you need -- it does fail on dynamically imported modules, however. Try running py2app with no explicit packages or modules included first, then add just those that py2app doesn't pick up by itself. > I am trying to use py2app (version py2app-0.3.6-py2.4.egg) you'll want the latest version. try: $ easy_install -U py2app I am using Tiger, but I would like this to work also on Leopard, If you build on 10.4, it should run fine on 10.5 (I get my cats confused). Make sure you use the python.org Framework build of python. Once you've tried a new py2app and simpler setup.py, then ask here for more help, if you still need it. -Chris -- Christopher Barker, Ph.D. Oceanographer Emergency Response Division NOAA/NOS/OR&R(206) 526-6959 voice 7600 Sand Point Way NE (206) 526-6329 fax Seattle, WA 98115 (206) 526-6317 main reception [EMAIL PROTECTED] ___ Pythonmac-SIG maillist - Pythonmac-SIG@python.org http://mail.python.org/mailman/listinfo/pythonmac-sig
Re: [Pythonmac-SIG] thanks for PyObjC!
I actually haven't used py2app -- I just use Xcode 3 and Interface Builder. Works great! I'd start there, then try these other things like py2app. Bill ___ Pythonmac-SIG maillist - Pythonmac-SIG@python.org http://mail.python.org/mailman/listinfo/pythonmac-sig
[Pythonmac-SIG] Error compiling with py2app
Hi all- I'm having trouble with py2app all of a sudden. It stopped working with 2.5 so I installed 2.6 today, hoping that may work. I'm attaching the text from when the error begins. Any help would be appreciated. Thanks, Dan Traceback (most recent call last): File "/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/py2app-0.3.6-py2.6.egg/py2app/build_app.py", line 548, in _run self.run_normal() File "/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/py2app-0.3.6-py2.6.egg/py2app/build_app.py", line 619, in run_normal self.create_binaries(py_files, pkgdirs, extensions, loader_files) File "/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/py2app-0.3.6-py2.6.egg/py2app/build_app.py", line 723, in create_binaries mm.mm.run_file(runtime) File "build/bdist.macosx-10.3-i386/egg/macholib/MachOGraph.py", line 62, in run_file m = self.findNode(pathname) File "build/bdist.macosx-10.3-i386/egg/macholib/MachOGraph.py", line 55, in findNode newname = self.locate(name) File "build/bdist.macosx-10.3-i386/egg/macholib/MachOStandalone.py", line 30, in locate return self.delegate.locate(newname) File "build/bdist.macosx-10.3-i386/egg/macholib/MachOStandalone.py", line 69, in locate res = self.copy_framework(info) File "/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/py2app-0.3.6-py2.6.egg/py2app/build_app.py", line 56, in copy_framework destfn = self.appbuilder.copy_framework(info, self.dest) File "/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/py2app-0.3.6-py2.6.egg/py2app/build_app.py", line 789, in copy_framework self.copy_python_framework(info, dst) File "/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/py2app-0.3.6-py2.6.egg/py2app/build_app.py", line 817, in copy_python_framework os.path.join(outdir, fn)) File "/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/distutils/cmd.py", line 376, in copy_file dry_run=self.dry_run) File "/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/distutils/file_util.py", line 119, in copy_file "can't copy '%s': doesn't exist or not a regular file" % src DistutilsFileError: can't copy '/Library/Frameworks/Python.framework/Versions/2.6/Resources/version.plist': doesn't exist or not a regular file > /Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/distutils/file_util.py(119)copy_file() -> "can't copy '%s': doesn't exist or not a regular file" % src (Pdb) ___ Pythonmac-SIG maillist - Pythonmac-SIG@python.org http://mail.python.org/mailman/listinfo/pythonmac-sig
Re: [Pythonmac-SIG] Error compiling with py2app
Hello, On Mon, Nov 10, 2008 at 3:45 PM, Dan Ross <[EMAIL PROTECTED]> wrote: > Hi all- > > I'm having trouble with py2app all of a sudden. It stopped working with 2.5 > so I installed 2.6 today, hoping that may work. > > I'm attaching the text from when the error begins. Any help would be > appreciated. > You appear to have a file in your includes/data_files that does not have the correct path specified. Cody ___ Pythonmac-SIG maillist - Pythonmac-SIG@python.org http://mail.python.org/mailman/listinfo/pythonmac-sig
Re: [Pythonmac-SIG] Error compiling with py2app
Dan Ross wrote: I'm having trouble with py2app all of a sudden. It stopped working with 2.5 so I installed 2.6 today, hoping that may work. well, I don't think any changes have been made for 26, so it's actually less likely to work! I'm attaching the text from when the error begins. > DistutilsFileError: can't copy > '/Library/Frameworks/Python.framework/Versions/2.6/Resources/version.plist': doesn't exist or not a regular file well, indeed, it doesn't look like that file exists. There is one in my 2.5 distro: $ cat /Library/Frameworks/Python.framework/Versions/2.5/Resources/version.plist "http://www.apple.com/DTDs/PropertyList-1.0.dtd";> BuildVersion 1 CFBundleShortVersionString 2.5alpha0 CFBundleVersion 2.5alpha0 ProjectName Python ReleaseStatus alfa SourceVersion 2.4a0 I don't know where it came from, what it is used for, or why it is listing the version as "2.5alpha0", but you could try making a copy, changing "2.5" to "2.6", and putting it in your 2.6 distro. I think you'll have better luck with 2.5, though. -Chris -- Christopher Barker, Ph.D. Oceanographer Emergency Response Division NOAA/NOS/OR&R(206) 526-6959 voice 7600 Sand Point Way NE (206) 526-6329 fax Seattle, WA 98115 (206) 526-6317 main reception [EMAIL PROTECTED] ___ Pythonmac-SIG maillist - Pythonmac-SIG@python.org http://mail.python.org/mailman/listinfo/pythonmac-sig
Re: [Pythonmac-SIG] Error compiling with py2app
Hi Cody- Thanks for the reply. I posted the wrong error. I figured out the missing file part. Here's the error after providing the file. Dan On Mon, 10 Nov 2008 15:56:09 -0600, "Cody Precord" wrote: Hello, On Mon, Nov 10, 2008 at 3:45 PM, Dan Ross wrote: Hi all- I'm having trouble with py2app all of a sudden. It stopped working with 2.5 so I installed 2.6 today, hoping that may work. I'm attaching the text from when the error begins. Any help would be appreciated. You appear to have a file in your includes/data_files that does not have the correct path specified. Cody Links: -- [1] mailto:[EMAIL PROTECTED] linking /Users/danr/Projects/pyTunesQT/dist/start.app/Contents/Frameworks/QtCore.framework/Versions/4.0 -> 4 linking /Users/danr/Projects/pyTunesQT/dist/start.app/Contents/Frameworks/QtCore.framework/Versions/Current -> 4 Traceback (most recent call last): File "/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/py2app-0.3.6-py2.6.egg/py2app/build_app.py", line 548, in _run self.run_normal() File "/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/py2app-0.3.6-py2.6.egg/py2app/build_app.py", line 619, in run_normal self.create_binaries(py_files, pkgdirs, extensions, loader_files) File "/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/py2app-0.3.6-py2.6.egg/py2app/build_app.py", line 732, in create_binaries platfiles = mm.run() File "build/bdist.macosx-10.3-i386/egg/macholib/MachOStandalone.py", line 102, in run mm.run_file(fn) File "build/bdist.macosx-10.3-i386/egg/macholib/MachOGraph.py", line 68, in run_file self.scan_node(m) File "build/bdist.macosx-10.3-i386/egg/macholib/MachOGraph.py", line 91, in scan_node m = self.load_file(filename, caller=node) File "build/bdist.macosx-10.3-i386/egg/macholib/MachOGraph.py", line 78, in load_file return self.load_file(newname, caller=caller) File "build/bdist.macosx-10.3-i386/egg/macholib/MachOGraph.py", line 80, in load_file m = self.createNode(MachO, name) File "build/bdist.macosx-10.3-i386/egg/macholib/MachOStandalone.py", line 23, in createNode res = super(FilteredMachOGraph, self).createNode(cls, name) File "build/bdist.macosx-10.3-i386/egg/altgraph/ObjectGraph.py", line 148, in createNode m = cls(name, *args, **kw) File "build/bdist.macosx-10.3-i386/egg/macholib/MachO.py", line 61, in __init__ self.load(file(filename, 'rb')) File "build/bdist.macosx-10.3-i386/egg/macholib/MachO.py", line 71, in load self.load_fat(fh) File "build/bdist.macosx-10.3-i386/egg/macholib/MachO.py", line 82, in load_fat self.load_header(fh, arch.offset, arch.size) File "build/bdist.macosx-10.3-i386/egg/macholib/MachO.py", line 106, in load_header hdr = MachOHeader(self, fh, offset, size, magic, hdr, endian) File "build/bdist.macosx-10.3-i386/egg/macholib/MachO.py", line 146, in __init__ self.load(fh) File "build/bdist.macosx-10.3-i386/egg/macholib/MachO.py", line 178, in load raise ValueError("Unknown load command: %d" % (cmd_load.cmd,)) ValueError: Unknown load command: 27 > /Users/danr/Projects/pyTunesQT/build/bdist.macosx-10.3-i386/egg/macholib/MachO.py(178)load() (Pdb) ___ Pythonmac-SIG maillist - Pythonmac-SIG@python.org http://mail.python.org/mailman/listinfo/pythonmac-sig
Re: [Pythonmac-SIG] Error compiling with py2app
Dan Ross wrote: Hi Cody- Thanks for the reply. I posted the wrong error. I figured out the missing file part. Here's the error after providing the file. File "build/bdist.macosx-10.3-i386/egg/macholib/MachO.py", line 178, in load raise ValueError("Unknown load command: %d" % (cmd_load.cmd,)) ValueError: Unknown load command: 27 > /Users/danr/Projects/pyTunesQT/build/bdist.macosx-10.3-i386/egg/macholib/MachO.py(178)load() You need a newer version of macho lib. Do: easy_install macholib==dev -- Robin Dunn Software Craftsman http://wxPython.org Java give you jitters? Relax with wxPython! ___ Pythonmac-SIG maillist - Pythonmac-SIG@python.org http://mail.python.org/mailman/listinfo/pythonmac-sig
Re: [Pythonmac-SIG] thanks for PyObjC!
Bill Janssen wrote: I actually haven't used py2app -- I just use Xcode 3 and Interface Builder. Works great! I'd start there, then try these other things like py2app. Be aware that Xcode doesn't include any dependencies in your .app bundle as py2app does. Also, the executable links against the first framework it finds on the host system, creating a likely source of problems if you're using one version of Python and your users are using another. HTH has -- Control AppleScriptable applications from Python, Ruby and ObjC: http://appscript.sourceforge.net ___ Pythonmac-SIG maillist - Pythonmac-SIG@python.org http://mail.python.org/mailman/listinfo/pythonmac-sig
Re: [Pythonmac-SIG] Error compiling with py2app
Dan Ross wrote: Here's the error after providing the file. File "build/bdist.macosx-10.3-i386/egg/macholib/MachO.py", line 178, in load raise ValueError("Unknown load command: %d" % (cmd_load.cmd,)) ValueError: Unknown load command: 27 You may be able to fix this with the latest machholib. try: easy_install "macholib==dev" -Chris -- Christopher Barker, Ph.D. Oceanographer Emergency Response Division NOAA/NOS/OR&R(206) 526-6959 voice 7600 Sand Point Way NE (206) 526-6329 fax Seattle, WA 98115 (206) 526-6317 main reception [EMAIL PROTECTED] ___ Pythonmac-SIG maillist - Pythonmac-SIG@python.org http://mail.python.org/mailman/listinfo/pythonmac-sig
Re: [Pythonmac-SIG] Error compiling with py2app
This one did the trick! Thanks Chris. Unfortunately the app launches and crashes. :( It would seem that the system does not like PyQt? Process: start [2935] Path:/Projects/pythonprojects/pyTunesQT/dist/start.app/ Contents/MacOS/start Identifier: org.pythonmac.unspecified.start Version: 0.0.0 (0.0.0) Code Type: X86 (Native) Parent Process: launchd [77] Date/Time: 2008-11-10 17:30:28.208 -0600 OS Version: Mac OS X 10.5.5 (9F33) Report Version: 6 Exception Type: EXC_BAD_ACCESS (SIGBUS) Exception Codes: KERN_PROTECTION_FAILURE at 0x0004 Crashed Thread: 0 Thread 0 Crashed: 0 QtGui 0x17477d76 QPushButton::menu() const + 6 1 libqtaccessiblewidgets.dylib 0x151e8637 AccessibleFactory::create(QString const&, QObject*) + 1109 2 QtGui 0x11e9a785 QAccessible::queryAccessibleInterface(QObject*) + 453 3 QtGui 0x11ea9ece QAccessible::updateAccessibility(QObject*, int, QAccessible::Event) + 398 4 QtGui 0x11a0f394 QWidgetPrivate::show_helper() + 420 5 QtGui 0x11a123f3 QWidget::setVisible(bool) + 1267 6 QtGui.so 0x115ac36a sipQPushButton::setVisible(bool) + 106 7 QtGui 0x11a0f198 QWidgetPrivate::showChildren(bool) + 328 8 QtGui 0x11a0f24f QWidgetPrivate::show_helper() + 95 9 QtGui 0x11a123f3 QWidget::setVisible(bool) + 1267 10 QtGui.so 0x116129c1 sipQWidget::setVisible(bool) + 103 11 QtGui 0x11a0f198 QWidgetPrivate::showChildren(bool) + 328 12 QtGui 0x11a0f24f QWidgetPrivate::show_helper() + 95 13 QtGui 0x11a123f3 QWidget::setVisible(bool) + 1267 14 QtGui.so 0x1142e869 sipQMainWindow::setVisible(bool) + 103 15 QtGui.so 0x1161a9e7 sipQWidget::sipProtectVirt_languageChange(bool) + 25067 On Nov 10, 2008, at 4:25 PM, Christopher Barker wrote: Dan Ross wrote: Here's the error after providing the file. File "build/bdist.macosx-10.3-i386/egg/macholib/MachO.py", line 178, in load raise ValueError("Unknown load command: %d" % (cmd_load.cmd,)) ValueError: Unknown load command: 27 You may be able to fix this with the latest machholib. try: easy_install "macholib==dev" -Chris -- Christopher Barker, Ph.D. Oceanographer Emergency Response Division NOAA/NOS/OR&R(206) 526-6959 voice 7600 Sand Point Way NE (206) 526-6329 fax Seattle, WA 98115 (206) 526-6317 main reception [EMAIL PROTECTED] ___ Pythonmac-SIG maillist - Pythonmac-SIG@python.org http://mail.python.org/mailman/listinfo/pythonmac-sig