Using cx_Freeze 4.0.1 with Python 2.5.4 on Windows XP.
I have tried
cxfreeze --include-modules=encodings.ascii,encodings.cp437
script.py
with the same error as an earlier poster:
Usage: cxfreeze [options] [SCRIPT]
Freeze a Python script and all of its referenced modules to a
base
executable which can then be distributed without requiring a
Python
installation.
cxfreeze: error: only one script can be specified
As you can see, there are no spaces in my command line. I also tried
doing this with a setup script:
from cx_Freeze import setup, Executable
setup(executables = [Executable('script.py',
includes=['encodings.ascii', 'encodings.cp437'])])
using
python setup.py build
but the listing does not show either of them included:
Name File
---- ----
m BUILD_CONSTANTS
m UserDict C:\Python25\lib\UserDict.py
m __builtin__
m _codecs
m _sre
m _types
m array
m codecs C:\Python25\lib\codecs.py
m copy C:\Python25\lib\copy.py
m copy_reg C:\Python25\lib\copy_reg.py
m cx_Freeze__init__
C:\Python25\lib\site-packages\cx_Freeze\initscripts\
Console.py
P encodings C:\Python25\lib\encodings\__init__.py
m encodings.aliases C:\Python25\lib\encodings\aliases.py
m errno
m imp
m itertools
m linecache C:\Python25\lib\linecache.py
m nt
m ntpath C:\Python25\lib\ntpath.py
m os C:\Python25\lib\os.py
m popen2 C:\Python25\lib\popen2.py
m posixpath C:\Python25\lib\posixpath.py
m re C:\Python25\lib\re.py
m repr C:\Python25\lib\repr.py
m script__main__ script.py
m sre_compile C:\Python25\lib\sre_compile.py
m sre_constants C:\Python25\lib\sre_constants.py
m sre_parse C:\Python25\lib\sre_parse.py
m stat C:\Python25\lib\stat.py
m string C:\Python25\lib\string.py
m strop
m sys
m types C:\Python25\lib\types.py
m warnings C:\Python25\lib\warnings.py
m zipimport
m zlib
Finally I tried a simpler setup script:
from cx_Freeze import setup, Executable
setup(executables = [Executable('script.py')])
and the command line
python setup.py build_exe
--includes=encodings.ascii,encodings.cp437
which errors out with
running build_exe
Traceback (most recent call last):
File "setup.py", line 4, in <module>
setup(executables = [Executable('script.py')])
File "c:\Python25\lib\site-packages\cx_Freeze\dist.py", line 278, in
setup
distutils.core.setup(**attrs)
File "C:\Python25\Lib\distutils\core.py", line 151, in setup
dist.run_commands()
File "C:\Python25\Lib\distutils\dist.py", line 974, in run_commands
self.run_command(cmd)
File "C:\Python25\Lib\distutils\dist.py", line 994, in run_command
cmd_obj.run()
File "c:\Python25\lib\site-packages\cx_Freeze\dist.py", line 165, in
run
freezer.Freeze()
File "c:\Python25\lib\site-packages\cx_Freeze\freezer.py", line 403,
in Freeze
self.finder = self._GetModuleFinder()
File "c:\Python25\lib\site-packages\cx_Freeze\freezer.py", line 251,
in _GetMo
duleFinder
finder.IncludeModule(name)
File "c:\Python25\lib\site-packages\cx_Freeze\finder.py", line 397, in
Include
Module
module = self._ImportModule(name, deferredImports)
File "c:\Python25\lib\site-packages\cx_Freeze\finder.py", line 201, in
_Import
Module
raise ImportError, "No module named %s" % name
ImportError: No module named encodings.ascii,encodings.cp437
Is it actually possible to import two encodings this way? What have
people done successfully. Maybe something is going wrong in the install
of cx_Freeze itself to generate these problems.
Jeffery G. Smith
MedPlus, A Quest Diagnostics Company | Senior SCM Specialist | 4690
Parkway Drive | Mason, OH 45040 USA | phone +1.513.204.2601 | fax
+1.513.229.5505 | mobile +1.513.335.1517 | [email protected] |
www.MedPlus.com <http://www.medplus.com/>
Please think about resource conservation before you print this message
Confidentiality Notice: The information contained in this electronic
transmission is confidential and may be legally privileged. It is intended only
for the addressee(s) named above. If you are not an intended recipient, be
aware that any disclosure, copying, distribution or use of the information
contained in this transmission is prohibited and may be unlawful. If you have
received this transmission in error, please notify us by telephone (513)
229-5500 or by email ([email protected]). After replying, please erase it
from your computer system.
------------------------------------------------------------------------------
This SF.net email is sponsored by:
High Quality Requirements in a Collaborative Environment.
Download a free trial of Rational Requirements Composer Now!
http://p.sf.net/sfu/www-ibm-com
_______________________________________________
cx-freeze-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/cx-freeze-users