[py]
recipe = zc.recipe.egg:script
eggs = ${buildout:eggs}
interpreter = py
dependent-scripts = true <---- This.
You can then simply run ./bin/pyinstaller main.py.
Frage
I almost have this working. My buildout.cfg:
[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
This generates path/bin/py, and when I run ./bin/py app.py, my application runs. Great.
Now what?
If I install pyinstaller globally, and run:
pyinstaller app.py
It generates dist/app, but running it fails because the develop eggs from my buildout weren't found during the pyinstaller run.
If I install all the eggs globally (including the develop ones), and run pyinstaller, the resulting binary works perfectly... but the point of buildout is that you don't have to do this.
Basically, how do I install 'buildout aware' copy of the pyinstaller script into my bin folder?
I presume it's something to do with using 'recipe = zc.recipe.egg:scripts', but the buildout docs are terribly vague about how that works when you're trying to get the script from a package.
I'm sure I've seen a buildout before that installs alembic and nosetests in the bin folder, so I'm sure this is possible... somehow...
Lösung
[py]
recipe = zc.recipe.egg:script
eggs = ${buildout:eggs}
interpreter = py
dependent-scripts = true <---- This.
You can then simply run ./bin/pyinstaller main.py.