From: Fleblanc <fra...@ce...> - 2009-02-25 08:33:34
|
I don't know about ZSI but when you build your .exe you can add in options "includes": [ 'ZSI.client'] this force to include modules ZSI.client. If you don't see where to put this send me your setup.py ... Regards. Sebastian Schmidt a écrit : > Currently having a problem using ZSI in an application build with py2exe, when I want to run the exe-file I get the error "ImportError: No module named ZSI.client", this seems to result from the fact that py2exe can't handle egg-files like ZSI yet. So I tried the hack described here, to include the egg-file in the dist-directory: http://www.py2exe.org/index.cgi/ExeWithEggs - with eggs = pkg_resources.require("ZSI") instead of eggs = pkg_resources.require("TurboGears") > > > When using this fix, I get the following error, when building with py2exe: > > Traceback (most recent call last): > > File "Tribler\Main\Build\Win32\setuptribler.py", line 53, in ? > > import setuptools > > File "C:\Python24\Lib\site-packages\setuptools\__init__.py", line 2, in ? > > from setuptools.extension import Extension, Library > > File "C:\Python24\Lib\site-packages\setuptools\extension.py", line 2, in ? > > from dist import _get_unpatched > > File "C:\Python24\Lib\site-packages\setuptools\dist.py", line 27, in ? > > _Distribution = _get_unpatched(_Distribution) > > File "C:\Python24\Lib\site-packages\setuptools\dist.py", line 22, in _get_unpatched > > raise AssertionError( > > AssertionError: distutils has already been patched by <class py2exe.Distribution at 0x00A7E2A0> > > Do you have any suggestions? > Did anybody else already tried using ZSI in an application build with py2exe? > Thanks in advance > > Sebastian > > |