2013-09-24 21 views
0

几乎有这方面的工作。我buildout.cfg:你如何在zc.buildout中使用pyinstaller?

[buildout] 
parts = deps py 
develop = 
    . 
    lib/sdl-util/ 
    lib/nark/ 

[deps] 
recipe = zc.recipe.egg:eggs 
eggs = 
    nose 
    pysdl2 
    pyinstaller 

[py] 
interpreter = py 
recipe = zc.recipe.egg:script 
eggs = 
    zope.component 
    tech 
    nark 
    sutils 
    pysdl2 
    pyinstaller 

这会产生路径/斌/ PY,当我运行./bin/py app.py,我的应用程序运行。大。

现在怎么办?

如果我安装pyinstaller全球,并运行:

pyinstaller app.py 

它产生DIST /应用程序,但因为我的扩建开发鸡蛋pyinstaller运行过程中,未发现运行失败。

如果我安装所有的鸡蛋都在全球(包括开发者),并运行pyinstaller,生成的二进制工作完美......但扩建的一点是,你没有做到这一点。

基本上,我怎么安装“扩建意识”的pyinstaller脚本复制到我的bin文件夹?

我相信这件事情做与使用“配方= zc.recipe.egg:脚本”,但附加件文档是非常模糊的有关如何,当你试图从包拿到剧本的作品。

我敢肯定,我已经看到了扩建,它安装在bin文件夹蒸馏器和nosetests之前,所以我敢肯定这是可能的... ...不知何故

回答

0
[py] 
recipe = zc.recipe.egg:script 
eggs = ${buildout:eggs} 
interpreter = py 
dependent-scripts = true <---- This. 

然后,您可以只需运行./bin/pyinstaller main.py.