From: Zwicky,
William R ERDC-CERL-IL C. <Wil...@us...> - 2009-04-23 02:53:12
|
It's conceivable, but perhaps you're not explaining it well. 'packages' and 'package_dir' are standardized precisely so that bdist, sdist, and py2exe will all produce the same program. I can understand having the py2exe 'packages' keyword supplement the distutils one, but by ignoring the main one you've broken distutils. Not to mention, your proposed solution still doesn't work. This is from the zip file I sent out. I've placed 'packages' down there at the bottom. setup_opts = { "py2exe": { "dist_dir": DIST_EXE, "compressed": True, "bundle_files": 1, "dll_excludes": [ # stop complaining about windows system DLLs "KERNEL32.dll", "SHELL32.dll", "ADVAPI32.dll", "USER32.dll", "WSOCK32.dll", "OLEAUT32.dll", "RPCRT4.dll", "COMDLG32.dll", "gdiplus.dll", "COMCTL32.dll", "WS2_32.dll", "GDI32.dll", "WINMM.dll", "ole32.dll", "MSVCP90.dll"], "excludes": [ # stop complaining about unused modules 'dummy.Process', 'email', 'email.utils', 'win32api', 'win32con', 'win32pipe', # remove other unused modules "_ssl"], "packages": "bnoise", } } When I build, I still get: The following modules appear to be missing ['Utils'] When run, I still get: ImportError: No module named Utils -Bill // William R. Zwicky // USA-CERL, Champaign, IL // (800) USA-CERL xPLSR > -----Original Message----- > From: Thomas Heller [mailto:th...@ct...] > Sent: Wednesday, April 22, 2009 1:25 PM > To: py2...@li... > Subject: Re: [Py2exe-users] Py2exe ignores "packages" and > standard searchalgorithm > > The 'packages' and 'package_dir' keyword arguments are indeed > ignored by py2exe. > This is intentional: You have to use the py2exe-specific > options / keywords to force inclusion of packages into the > exe. These keywords are there and are used for other > distutils commands, like 'bdist_wininst' for example. So you > could use the same setup script to build an installer for > your python package with 'python setup.py bdist_wininst', and > you could also build some exe files with 'python setup.py > py2exe'. Maybe this idea sounds (or is) strange, but that > was the idea from the beginning. |