Hi there, Per the discussion copied below, as Hartmut have suggested I have split the app into two self-sufficient pieces, and packaged them separately, and voila, it works!
Though, I am having an interesting problem packaging the final executable. When I package, the resulting Mac OS bundle immediately quits with this console error: 6/8/14 5:03:07.051 PM com.apple.launchd.peruser.501[267]: ([0x0-0x42d42d].Aether[16525]) Exited with code: 255 This is also not local to this particular app. I created a test case, which you can find below. I cannot package this test case into a bundle: or rather, I cannot produce a working bundle. When I go into the bundle, find the executable and run it, it works perfectly. It doesn’t work when clicked on the bundle however, resulting in the console log given above. The test code is below. You need Twisted and PyQt5, but otherwise it’s dependency-free. My impression is that this console log happens when the process crashes very early in the startup, but I do not know of any environment differences between launching an app directly from the executable (test-case) deep in the bundle, or outside the bundle by clicking onto it (test.case.app) Can someone tell me whether this works for them? Is this a known bug, am I making a mistake? Or do I have a system-wide issue? Here is the package with spec file and qt5reactor.py. Spec file is pretty vanilla, exactly as generated by Pyinstaller with the bundling request added to the bottom. https://dl.dropboxusercontent.com/u/5815330/test-pyqt.zip Here is the entire code of test-pyqt.py only: from PyQt5.QtWidgets import QApplication, QMainWindow, QFileDialog, QWidget, QLabel from PyQt5 import QtCore import sys, datetime class Example(QWidget): def __init__(self): super(Example, self).__init__() lbl1 = QLabel('Test Label', self) lbl1.move(15, 10) self.setGeometry(300, 300, 250, 150) self.show() def main(): app = QApplication(sys.argv) w = Example() w.setWindowTitle(str(datetime.datetime.now())) w.show() import qt5reactor qt5reactor.install() from twisted.internet import reactor sys.exit(reactor.run()) if __name__ == '__main__': main() Respectfully, Burak On Apr 9, 2014, at 6:04 AM, Hartmut Goebel <[email protected]> wrote: > Am 08.04.2014 07:54, schrieb Burak Nehbit: >>> Have you bundled it using PyInstaller, too? Are you using MERGE? >> >> No, I haven’t. I haven’t had taken a look at Merge—up until now my belief >> was that multiprocessing did not need such tools. I can run Twisted’s own >> spawnProcess without bundling the subprocess or without merge, so I would >> think Ampoule would not change anything. It’s nothing but a wrapper over >> spawnProcess. >> > > Did I understand right? You haven't bundled the second program using > PyInstaller at all? > > If you second program is a Python-Program, and you are *not* shipping the > Python interpreter and you are *not* bundling that program, how should this > program run? > >>> Well, I'd prefer having a requirements.txt and a PyInstaller .spec-file, so >>> I can immediately start looking into the problem. :-) >> >> My apologies, here’s the last working spec file I had. >> >> https://dl.dropboxusercontent.com/u/5815330/aether.spec > > This should be something like: > > a1 = Analysis(['/Volumes/Sky/Repos/aether/Code/aether/main.py']) > pyz1 = PYZ(a1.pure) > exe1 = EXE(pyz1, a1.scripts, ...) > > a2 = Analysis(['/Volumes/Sky/Repos/aether/second-program.py']) > pyz2 = PYZ(a2.pure) > exe2 = EXE(pyz2, a2.scripts, ...) > > coll = COLLECT(exe1, exe2 > a1.binaries, a1.zipfiles, a1.datas, > a2.binaries, a2.zipfiles, a2.datas, > strip=None, > upx=True, > name='Aether' > ) > I strongly suggest testing this with two very simple applications, both of > which only printing some text. > >> Should I be packaging the second process on its own? Can Merge handle this? > > Yes. No, Merge is the advanced usage. You should first get an simple app > running, then your app, them you may try merge. > > -- > Schönen Gruß > Hartmut Goebel > Dipl.-Informatiker (univ), CISSP, CSSLP > Information Security Management, Security Governance, Secure Software > Development > Goebel Consult, Landshut > http://www.goebel-consult.de > > Blog: http://www.goebel-consult.de/blog/sag-nein-zum-routerzwang > Kolumne: http://www.cissp-gefluester.de/2010-09-mut-zur-beschraenkung > > Goebel Consult ist Mitglied bei http://www.7-it.de/ >
smime.p7s
Description: S/MIME cryptographic signature
