On 5/23/11 4:59 PM, Paul McNett wrote: >> On 5/23/11 4:40 PM, Paul McNett wrote: >>> On 5/23/11 2:20 PM, Rand Batchelder wrote: >>>>> Does anyone have an example of a PyInstaller spec file for a simple dabo >>>> application. >>> I have one, but no time to send right now. I'll try to do it later tonight. Rest >>> assured, it works fine! >> >> Here you go. If I forgot a file or you have a specific question, ask away! >> >> http://trac.dabodev.com/wiki/PyInstaller >>I had forgotten setup_util.py, which contains the code for adding the locale >directory, which is one of the things you had needed. >It is added to the above wiki page. >Paul
Thanks for your replies. I looked at the scripts at http://trac.dabodev.com/wiki/PyInstaller and they seem rather complex. I am trying to understand them. I built a simple appwizard app with one table and tried to build a onefile exe with PyInstaller. I used the makespec.py script with the onefile option. the generated spec file was: # -*- mode: python -*- a = Analysis([os.path.join(HOMEPATH,'support\\_mountzlib.py'), os.path.join(HOMEPATH,'support\\useUnicode.py'), 'C:\Python27\Lib\site-packages\wx-2.8-msw-unicode\wxPython\gizmos.py','C:\\data\\dabo\\Q2\\Q2.py'], pathex=['C:\\pyinstaller-1.5', r'C:\Python27\Lib\site-packages']) pyz = PYZ(a.pure) exe = EXE( pyz, a.scripts, a.binaries, a.zipfiles, a.datas, name=os.path.join('dist', 'Q2.exe'), debug=False, strip=False, upx=True, console=True ) I got these errors when I ran the exe: """ C:\pyinstaller-1.5\Q2\dist>q2 ui.loadUI failed: No module named wx.lib.calendar Traceback (most recent call last): File ".\q2\build\pyi.win32\q2\outPYZ1.pyz/dabo.ui", line 60, in loadUI File "<string>", line 1, in <module> File "C:\pyinstaller-1.5\iu.py", line 436, in importHook mod = _self_doimport(nm, ctx, fqname) File "C:\pyinstaller-1.5\iu.py", line 521, in doimport exec co in mod.__dict__ File ".\q2\build\pyi.win32\q2\outPYZ1.pyz/dabo.ui.uiwx", line 38, in <module> File "C:\pyinstaller-1.5\iu.py", line 455, in importHook raise ImportError, "No module named %s" % fqname ImportError: No module named wx.lib.calendar Traceback (most recent call last): File "<string>", line 18, in <module> File "C:\pyinstaller-1.5\iu.py", line 436, in importHook mod = _self_doimport(nm, ctx, fqname) File "C:\pyinstaller-1.5\iu.py", line 521, in doimport exec co in mod.__dict__ File ".\q2\build\pyi.win32\q2\outPYZ1.pyz/biz", line 6, in <module> File "C:\pyinstaller-1.5\iu.py", line 436, in importHook mod = _self_doimport(nm, ctx, fqname) File "C:\pyinstaller-1.5\iu.py", line 521, in doimport exec co in mod.__dict__ File ".\q2\build\pyi.win32\q2\outPYZ1.pyz/biz.Q2", line 4, in <module> File "C:\pyinstaller-1.5\iu.py", line 436, in importHook mod = _self_doimport(nm, ctx, fqname) File "C:\pyinstaller-1.5\iu.py", line 521, in doimport exec co in mod.__dict__ File ".\q2\build\pyi.win32\q2\outPYZ1.pyz/biz.Base", line 3, in <module> File "C:\pyinstaller-1.5\iu.py", line 436, in importHook mod = _self_doimport(nm, ctx, fqname) File "C:\pyinstaller-1.5\iu.py", line 521, in doimport exec co in mod.__dict__ File ".\q2\build\pyi.win32\q2\outPYZ1.pyz/dabo.lib.datanav", line 2, in <modu e> File "C:\pyinstaller-1.5\iu.py", line 436, in importHook mod = _self_doimport(nm, ctx, fqname) File "C:\pyinstaller-1.5\iu.py", line 521, in doimport exec co in mod.__dict__ File ".\q2\build\pyi.win32\q2\outPYZ1.pyz/dabo.lib.datanav.Form", line 10, in <module> File "C:\pyinstaller-1.5\iu.py", line 436, in importHook mod = _self_doimport(nm, ctx, fqname) File "C:\pyinstaller-1.5\iu.py", line 521, in doimport exec co in mod.__dict__ File ".\q2\build\pyi.win32\q2\outPYZ1.pyz/dabo.lib.datanav.PageFrame", line 4 in <module> File "C:\pyinstaller-1.5\iu.py", line 436, in importHook mod = _self_doimport(nm, ctx, fqname) File "C:\pyinstaller-1.5\iu.py", line 521, in doimport exec co in mod.__dict__ File ".\q2\build\pyi.win32\q2\outPYZ1.pyz/dabo.lib.datanav.Page", line 11, in <module> ImportError: cannot import name dPanel C:\pyinstaller-1.5\Q2\dist> """ I need to specify the missing modules in the spec file, but I am not sure how. >From my understanding, PyInstaller analyzes the python script to determine which modules need to be included in the exe. Any advice ? --- StripMime Report -- processed MIME parts --- multipart/alternative text/plain (text body -- kept) text/html --- _______________________________________________ Post Messages to: [email protected] Subscription Maintenance: http://leafe.com/mailman/listinfo/dabo-users Searchable Archives: http://leafe.com/archives/search/dabo-users This message: http://leafe.com/archives/byMID/[email protected]
