[issue277] py2exe fail, "No module named mercurial/hgweb"
Shun-ichi Goto
mercurial-bugs at selenic.com
Wed May 31 20:55:42 CDT 2006
New submission from Shun-ichi Goto <shunichi.goto at gmail.com>:
I pulled recent code from crew (cs:4a7bdb1e8dc1)
and got error while building .exe file by py2exe -b 1 with python 2.3.
# It also failed with python 2.4
The error output from setup.py is here:
{{{
[c:\develop\hg\cc] python setup.py py2exe -b 1
running py2exe
running build_py
running build_ext
running build_scripts
*** searching for required modules ***
Traceback (most recent call last):
File "C:\develop\hg\cc\setup.py", line 103, in ?
welcome='contrib/macosx/Welcome.html')),
File "C:\Python23\lib\distutils\core.py", line 149, in setup
dist.run_commands()
File "C:\Python23\lib\distutils\dist.py", line 907, in run_commands
self.run_command(cmd)
File "C:\Python23\lib\distutils\dist.py", line 927, in run_command
cmd_obj.run()
File "C:\Python23\Lib\site-packages\py2exe\build_exe.py", line 218, in run
self._run()
File "C:\Python23\Lib\site-packages\py2exe\build_exe.py", line 269, in _run
self.find_needed_modules(mf, required_files, required_modules)
File "C:\Python23\Lib\site-packages\py2exe\build_exe.py", line 1172, in
find_needed_modules
mf.import_hook(mod)
File "C:\Python23\Lib\site-packages\py2exe\mf.py", line 649, in import_hook
return Base.import_hook(self,name,caller,fromlist)
File "C:\Python23\Lib\site-packages\py2exe\mf.py", line 130, in import_hook
q, tail = self.find_head_package(parent, name)
File "C:\Python23\Lib\site-packages\py2exe\mf.py", line 184, in find_head_package
raise ImportError, "No module named " + qname
ImportError: No module named mercurial/hgweb
}}}
I don't know how to fix, but I succeeded building exe by removing
a line of package scan for 'mercurial/hgweb'.
{{{
diff -r 4a7bdb1e8dc1 setup.py
--- a/setup.py Wed May 31 14:16:21 2006 -0700
+++ b/setup.py Thu Jun 01 10:55:23 2006 +0900
@@ -56,7 +56,6 @@ try:
else:
self.includes = self.includes.split(',')
mercurial.packagescan.scan(self.build_lib,'mercurial')
- mercurial.packagescan.scan(self.build_lib,'mercurial/hgweb')
mercurial.packagescan.scan(self.build_lib,'hgext')
self.includes += mercurial.packagescan.getmodules()
build_exe.finalize_options(self)
}}}
----------
messages: 1450
nosy: gotoh
priority: bug
status: unread
title: py2exe fail, "No module named mercurial/hgweb"
____________________________________________________
Mercurial issue tracker <mercurial-bugs at selenic.com>
<http://www.selenic.com/mercurial/bts/issue277>
____________________________________________________
More information about the Mercurial
mailing list