Python论坛  - 讨论区

标题:[python-chinese] 帮忙看看,急啊,limodou及各位高手,公司在用python做服务器,用py2exe打包时遇到问题,谢谢!

2006年11月07日 星期二 21:10

王明 mingwang在iflytek.com
星期二 十一月 7 21:10:27 HKT 2006

ÔÚwindows»·¾³Ï£º

ÎÒ¸Õ¿ªÊ¼Ð´µÄʱºò£¬ÀÏÊDZ¨Ä³¸öÎļþÕÒ²»µ½£¬½á¹û¾ÍÓñȽϳóµÄ°ì·¨°ÑȱµÄÓ²¼Ó½øÈ¥£¬ÒòΪ×öÁËxml½âÎö£¬ÒªÓõ½ÏÂÃæÕâ¸ö¿â $PYTHON_PATH\libs\pyexpat.lib£¬¸ÃÈçºÎ

¼Ó½øÈ¥£¬Áí¸½ÉÏÎÒµÄsetup.py, дµÄ²»¶ÔµÄµØ·½£¬Çë¶à¶àÖ¸³ö£¬Ð»ÁË£¡

 

from distutils.core import setup

import py2exe

 

tup(    

    version = "0.5.0",

    description = "py2exe sample script",

    name = "py2exe samples",

 

    # targets to build

    packages=['Cheetah','Cheetah.Utils','core','modules','debugger','webservers','webapps'],

           

    console = ['Karrigell.py'],

    

    data_files=[('', ['Karrigell.ini']), 

            ('webapps',['webapps/index.html','webapps/karrigell.css','webapps/mrm.py','webapps/MRM-Frame.html']), 

 

            ('webapps/config',['webapps/config/service_res.py','webapps/config/service_res.pih']),

 

           ('webapps/res', ['webapps/res/imgBtnConfig.gif', 'webapps/res/imgBtnHelp.gif']),

 

            ('webapps/status',['webapps/status/mrserver_cap.html','webapps/status/server_base.hip']),

 

           ('modules', ['modules/mod_py.py', 'modules/mod_pih.py', 'modules/mod_hip.py']),

 

           ('xml',['xml/__init__.py']),

 

            ('xml/dom',['xml/dom/__init__.py','xml/dom/minidom.py','xml/dom/domreg.py','xml/dom/minicompat.py',

            'xml/dom/xmlbuilder.py','xml/dom/pulldom.py','xml/dom/NodeFilter.py','xml/dom/expatbuilder.py']),

 

           ('xml/parsers',['xml/parsers/__init__.py','xml/parsers/expat.py'])]

)

 

-------------- 下一部分 --------------
Ò»¸öHTML¸½¼þ±»ÒƳý...
URL: http://python.cn/pipermail/python-chinese/attachments/20061107/44f06a9d/attachment.html 

[导入自Mailman归档:http://www.zeuux.org/pipermail/zeuux-python]

2006年11月08日 星期三 09:49

limodou limodou在gmail.com
星期三 十一月 8 09:49:59 HKT 2006

On 11/7/06, 王明 <mingwang在iflytek.com> wrote:
>
>
>
>
> 在windows环境下:
>
> 我刚开始写的时候,老是报某个文件找不到,结果就用比较丑的办法把缺的硬加进去,因为做了xml解析,要用到下面这个库
> $PYTHON_PATH\libs\pyexpat.lib,该如何
>
> 加进去,另附上我的setup.py, 写的不对的地方,请多多指出,谢了!
>
>
>
> from distutils.core import setup
>
> import py2exe
>
>
>
> tup(
>
>     version = "0.5.0",
>
>     description = "py2exe sample script",
>
>     name = "py2exe samples",
>
>
>
>     # targets to build
>
>
> packages=['Cheetah','Cheetah.Utils','core','modules','debugger','webservers','webapps'],
>
>
>
>     console = ['Karrigell.py'],
>
>
>
>     data_files=[('', ['Karrigell.ini']),
>
>
> ('webapps',['webapps/index.html','webapps/karrigell.css','webapps/mrm.py','webapps/MRM-Frame.html']),
>
>
>
>
> ('webapps/config',['webapps/config/service_res.py','webapps/config/service_res.pih']),
>
>
>
>            ('webapps/res', ['webapps/res/imgBtnConfig.gif',
> 'webapps/res/imgBtnHelp.gif']),
>
>
>
>
> ('webapps/status',['webapps/status/mrserver_cap.html','webapps/status/server_base.hip']),
>
>
>
>            ('modules', ['modules/mod_py.py', 'modules/mod_pih.py',
> 'modules/mod_hip.py']),
>
>
>
>            ('xml',['xml/__init__.py']),
>
>
>
>
> ('xml/dom',['xml/dom/__init__.py','xml/dom/minidom.py','xml/dom/domreg.py','xml/dom/minicompat.py',
>
>
> 'xml/dom/xmlbuilder.py','xml/dom/pulldom.py','xml/dom/NodeFilter.py','xml/dom/expatbuilder.py']),
>
>
>
>
> ('xml/parsers',['xml/parsers/__init__.py','xml/parsers/expat.py'])]
>
> )
>
没有对karrigell做过py2exe,我只做过ulipad的处理。不过我发现py2exe不能把模块中的数据文件打包进去。


-- 
I like python!
UliPad <>: http://wiki.woodpecker.org.cn/moin/UliPad
My Blog: http://www.donews.net/limodou

[导入自Mailman归档:http://www.zeuux.org/pipermail/zeuux-python]

2006年11月08日 星期三 09:53

头太晕 super852在gmail.com
星期三 十一月 8 09:53:25 HKT 2006

Ò»°ãÎÒÓöµ½ÕâÑùÎÊÌâµÄʱºò,¾ÍÖ±½Ó°ÑÐèÒªµÄÎļþ»òÎļþ¼Ðcopy½øÈ¥.¿ÉÒÔÖ±½Ó¸´ÖƵ½³ÌÐòµÄĿ¼Àï,Ò²¿ÉÒÔÌí¼Óµ½ÄǸö.zipÎļþÀï.
-------------- 下一部分 --------------
Ò»¸öHTML¸½¼þ±»ÒƳý...
URL: http://python.cn/pipermail/python-chinese/attachments/20061108/fa4c3d3b/attachment.html 

[导入自Mailman归档:http://www.zeuux.org/pipermail/zeuux-python]

2006年11月08日 星期三 09:53

莫家显 mjxian在gmail.com
星期三 十一月 8 09:53:58 HKT 2006

请取消订阅,谢谢

2006/11/8, limodou <limodou at gmail.com>:
>
> On 11/7/06, 王明 <mingwang at iflytek.com> wrote:
> >
> >
> >
> >
> > 在windows环境下:
> >
> > 我刚开始写的时候,老是报某个文件找不到,结果就用比较丑的办法把缺的硬加进去,因为做了xml解析,要用到下面这个库
> > $PYTHON_PATH\libs\pyexpat.lib,该如何
> >
> > 加进去,另附上我的setup.py, 写的不对的地方,请多多指出,谢了!
> >
> >
> >
> > from distutils.core import setup
> >
> > import py2exe
> >
> >
> >
> > tup(
> >
> >     version = "0.5.0",
> >
> >     description = "py2exe sample script",
> >
> >     name = "py2exe samples",
> >
> >
> >
> >     # targets to build
> >
> >
> > packages=['Cheetah','Cheetah.Utils
> ','core','modules','debugger','webservers','webapps'],
> >
> >
> >
> >     console = ['Karrigell.py'],
> >
> >
> >
> >     data_files=[('', ['Karrigell.ini']),
> >
> >
> >
> ('webapps',['webapps/index.html','webapps/karrigell.css','webapps/mrm.py','webapps/MRM-
> Frame.html']),
> >
> >
> >
> >
> >
> ('webapps/config',['webapps/config/service_res.py','webapps/config/service_res.pih']),
> >
> >
> >
> >            ('webapps/res', ['webapps/res/imgBtnConfig.gif',
> > 'webapps/res/imgBtnHelp.gif']),
> >
> >
> >
> >
> >
> ('webapps/status',['webapps/status/mrserver_cap.html','webapps/status/server_base.hip']),
> >
> >
> >
> >            ('modules', ['modules/mod_py.py', 'modules/mod_pih.py',
> > 'modules/mod_hip.py']),
> >
> >
> >
> >            ('xml',['xml/__init__.py']),
> >
> >
> >
> >
> >
> ('xml/dom',['xml/dom/__init__.py','xml/dom/minidom.py','xml/dom/domreg.py','xml/dom/minicompat.py',
> >
> >
> >
> 'xml/dom/xmlbuilder.py','xml/dom/pulldom.py','xml/dom/NodeFilter.py','xml/dom/expatbuilder.py']),
> >
> >
> >
> >
> > ('xml/parsers',['xml/parsers/__init__.py','xml/parsers/expat.py'])]
> >
> > )
> >
> 没有对karrigell做过py2exe,我只做过ulipad的处理。不过我发现py2exe不能把模块中的数据文件打包进去。
>
>
> --
> I like python!
> UliPad <>: http://wiki.woodpecker.org.cn/moin/UliPad
> My Blog: http://www.donews.net/limodou
> _______________________________________________
> python-chinese
> Post: send python-chinese at lists.python.cn
> Subscribe: send subscribe to python-chinese-request at lists.python.cn
> Unsubscribe: send unsubscribe to  python-chinese-request at lists.python.cn
> Detail Info: http://python.cn/mailman/listinfo/python-chinese
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://python.cn/pipermail/python-chinese/attachments/20061108/f963453c/attachment-0001.htm 

[导入自Mailman归档:http://www.zeuux.org/pipermail/zeuux-python]

如下红色区域有误,请重新填写。

    你的回复:

    请 登录 后回复。还没有在Zeuux哲思注册吗?现在 注册 !

    Zeuux © 2025

    京ICP备05028076号