Even more investigation shows that the finder in cx_Freeze is unable to see
into the smmap egg file on Windows. If I unpack the file and just put the smmap
module in the site-packages directory, everything works fine.
What might prevent cx_Freeze from working with this egg file on Windows but not
Linux?
From: jeffery.sm...@l-3com.com [mailto:jeffery.sm...@l-3com.com]
Sent: Thursday, March 19, 2015 10:38 AM
To: cx-freeze-users@lists.sourceforge.net
Subject: Re: [cx-freeze-users] Unable to freeze GitPython
I've narrowed this to the smmap module used by GitPython. Note that all this
works on Linux but not Windows.
If I use a simple script like:
import smmap
print('hello')
it works fine at the command line, but when frozen I get
Traceback (most recent call last):
File "C:\BaRT\Python34\lib\site-packages\cx_Freeze\initscripts\Console.py", li
ne 27, in <module>
exec(code, m.__dict__)
File "tester.py", line 1, in <module>
import smmap
File "c:\python\32-bit\3.4\lib\importlib\_bootstrap.py", line 2237, in _find_a
nd_load
File "c:\python\32-bit\3.4\lib\importlib\_bootstrap.py", line 2224, in _find_a
nd_load_unlocked
ImportError: No module named 'smmap'
If I try to force it with
cxfreeze tester.py --include-module=smmap
I get
Traceback (most recent call last):
File "C:\BaRT\Python34\scripts\cxfreeze", line 5, in <module>
main()
File "C:\BaRT\Python34\lib\site-packages\cx_Freeze\main.py", line 188, in main
freezer.Freeze()
File "C:\BaRT\Python34\lib\site-packages\cx_Freeze\freezer.py", line 621, in
Freeze
self._FreezeExecutable(executable)
File "C:\BaRT\Python34\lib\site-packages\cx_Freeze\freezer.py", line 185, in
_FreezeExecutable
finder = self._GetModuleFinder(exe)
File "C:\BaRT\Python34\lib\site-packages\cx_Freeze\freezer.py", line 376, in
_GetModuleFinder
finder.IncludeModule(name)
File "C:\BaRT\Python34\lib\site-packages\cx_Freeze\finder.py", line 678, in
IncludeModule
namespace = namespace)
File "C:\BaRT\Python34\lib\site-packages\cx_Freeze\finder.py", line 386, in
_ImportModule
raise ImportError("No module named %r" % name)
ImportError: No module named 'smmap'
From: jeffery.sm...@l-3com.com<mailto:jeffery.sm...@l-3com.com>
[mailto:jeffery.sm...@l-3com.com]
Sent: Wednesday, March 18, 2015 5:39 PM
To:
cx-freeze-users@lists.sourceforge.net<mailto:cx-freeze-users@lists.sourceforge.net>
Subject: [cx-freeze-users] Unable to freeze GitPython
I've tried freezing an application that uses the GitPython package but every
time I run the frozen executable I get the error
ImportError: 'gitdb' could not be found in your PYTHONPATH
I have tried importing gitdb and using the -packages and a setup script with
'packages' and 'includes' options but I still get the error.
Is there anything else that can be tried?
OS: Windows 7
cx_Freeze: 4.3.4
GitPython: 0.3.6
------------------------------------------------------------------------------
Dive into the World of Parallel Programming The Go Parallel Website, sponsored
by Intel and developed in partnership with Slashdot Media, is your hub for all
things parallel software development, from weekly thought leadership blogs to
news, videos, case studies, tutorials and more. Take a look and join the
conversation now. http://goparallel.sourceforge.net/
_______________________________________________
cx-freeze-users mailing list
cx-freeze-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/cx-freeze-users