I use zc.recipe.egg:scripts
in order to generate a bin/python
script that will be able to import my develop-eggs (in a custom buildout based project). My buildout.cfg
looks like this :
[buildout]
develop =
develop-eggs/MyPackage.MyLib
develop-eggs/MyPackage.MyLib2
develop-eggs/MyPackage.MyLib3
parts =
interpreter
[...]
[interpreter]
recipe = zc.recipe.egg:scripts
interpreter = python
eggs =
MyPackage.MyLib
MyPackage.MyLib2
MyPackage.MyLib3
All worked fine (as always) until I add the MyPackage.MyLib3
. This one does not want to be included. I checked the setup.py
, the buildout.cfg
nearly 10 times, and I began to investigate on the zc.recipe.egg:script
.
What i found was... strange. This is the first time I see that, and I have no idea what's happening.
In the zc.buildout-2.1.1-py2.6.egg/zc/buildout/easy_install.py
egg file line 1169, I added 2 little lines in order to see what happened :
import pdb
pdb.set_trace()
And it worked. The script was well generated this time and I could import the MyPackage.MyLib3
. I tried to remove the pdb lines, but again, the script doesn't include the MyPackage.MyLib3
. I did NOT do anything while I was on the PDB interface (just some next and continue).
Tested 3 times, and 3 times the same : if I edit the file zc.buildout-2.1.1-py2.6.egg/zc/buildout/easy_install.py
, then the bin/python
script is well generated ; but if I undo my edits, the script does not include the develop-egg MyPackage.MyLib3
.
Do you have any idea from what it could come from? Maybe it's not the right way to generate a Python script?
I found the issue.
In fact, generating an interpreter named python is not a good idea : some other scripts are also generating a specific site-package interpreter. Then I just changed my
interpreter
section as following :And now I execute my script with
bin/py
.