Great, it works in Windows, thanks for your explanation !

But when I run "python setup.py build" in Linux, another error was raised,
below is the traceback:

running build
running build_exe
Traceback (most recent call last):
  File "setup.py", line 22, in <module>
    executables = [Executable('main.py')]
  File "/usr/lib/python2.6/site-packages/cx_Freeze/dist.py", line 340, in
setup
    distutils.core.setup(**attrs)
  File "/usr/lib/python2.6/distutils/core.py", line 152, in setup
    dist.run_commands()
  File "/usr/lib/python2.6/distutils/dist.py", line 975, in run_commands
    self.run_command(cmd)
  File "/usr/lib/python2.6/distutils/dist.py", line 995, in run_command
    cmd_obj.run()
  File "/usr/lib/python2.6/distutils/command/build.py", line 134, in run
    self.run_command(cmd_name)
  File "/usr/lib/python2.6/distutils/cmd.py", line 333, in run_command
    self.distribution.run_command(command)
  File "/usr/lib/python2.6/distutils/dist.py", line 995, in run_command
    cmd_obj.run()
  File "/usr/lib/python2.6/site-packages/cx_Freeze/dist.py", line 214, in
run
    silent = self.silent)
  File "/usr/lib/python2.6/site-packages/cx_Freeze/freezer.py", line 85, in
__init__
    self._VerifyConfiguration()
  File "/usr/lib/python2.6/site-packages/cx_Freeze/freezer.py", line 331, in
_VerifyConfiguration
    for sourceFileName, targetFileName in self.includeFiles:
ValueError: too many values to unpack

Why is that ?

2010/3/3 Anthony Tuininga <[email protected]>

> Hi,
>
> You're on the right track. You just need to change the dash to an
> underscore and you should be good to go. The dashes are for the
> command line but within Python code you must use an underscore instead
> since dash would represent a subtraction operation. Make sense?
>
> Anthony
>
> On Tue, Mar 2, 2010 at 9:47 PM, Lenin Lee <[email protected]> wrote:
> > Hi,
> > I'm new to cx_freeze, below is the content of my setup.py:
> > #!/usr/bin/python
> > # -*- coding: utf-8 -*-
> > from cx_Freeze import setup,Executable
> > includefiles = ['settings.ini']
> > includes = []
> > excludes = ['Tkinter']
> > packages = ['do','khh']
> > setup(
> >     name = 'myapp',
> >     version = '0.1',
> >     description = 'A general enhancement utility',
> >     author = 'lenin',
> >     author_email = '[email protected]',
> >     options =
> >
> {'build_exe':{'excludes':excludes,'packages':packages,'include-files':includefiles}},
> >     executables = [Executable('main.py')]
> > )
> > There is a file named 'settings.ini', which is a configuration file of my
> > application, I just want to let cx_freeze copy it to the directory of the
> > executables, but when I used the command:
> > python setup.py build
> > An error was raised:
> > error: error in setup script: command 'build_exe' has no such option
> > 'include-files'
> > I used the command below :
> > python setup.py build_exe --help
> > And it appears that the option include-files exists.
> > I wonder what's wrong.
> >
> ------------------------------------------------------------------------------
> > Download Intel&#174; Parallel Studio Eval
> > Try the new software tools for yourself. Speed compiling, find bugs
> > proactively, and fine-tune applications for parallel performance.
> > See why Intel Parallel Studio got high marks during beta.
> > http://p.sf.net/sfu/intel-sw-dev
> > _______________________________________________
> > cx-freeze-users mailing list
> > [email protected]
> > https://lists.sourceforge.net/lists/listinfo/cx-freeze-users
> >
> >
>
>
> ------------------------------------------------------------------------------
> Download Intel&#174; Parallel Studio Eval
> Try the new software tools for yourself. Speed compiling, find bugs
> proactively, and fine-tune applications for parallel performance.
> See why Intel Parallel Studio got high marks during beta.
> http://p.sf.net/sfu/intel-sw-dev
> _______________________________________________
> cx-freeze-users mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/cx-freeze-users
>



-- 
初从文,三年不第。遂习武,校场发一矢,中鼓吏,逐之出。后学医,有所成,自撰一良方,服之,卒。
------------------------------------------------------------------------------
Download Intel&#174; Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
_______________________________________________
cx-freeze-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/cx-freeze-users

Reply via email to