Martin Aspeli wrote:
Jim Fulton wrote:
Martin Aspeli wrote:
Jim Fulton wrote:
The first step to compatibility is deciding what it means. :) I'm all in favor of workingenv/buildout compatibility. I'd like to see some specifics of how people would like to use workingenv amd buildout together. I have some guesses, but I'd rather hear people say what they want to do. I think this would be much more useful than a discussion of implementation details at this point. Once we know what we want the end result to be, I'm sure you and I can work out some implementation that makes sense. I agree, and I find myself a bit confused by this orientation as well.
The main use case I could imagine wanting to solve would be that I'd like to run 'python' inside zc.buildout and have an interactive prompt that had all the eggs that zc.buildout knew about available. That is, I'd like to be able to do "from zope.interface import ..." and so on.
As I mentioned before, this is already supported:
[buildout] parts = ... foo ...
[foo] recipe=zc.recipe.egg eggs = egg1 egg2 ... interpreter = mypy
After running the buildout, you will have bin/mypy.
Oh, didn't see that. That's cool! :)
If you run bin/mypy, then you'll get a Python prompt and you can import and use anything provided by the listed eggs and their dependencies.
I guess this wouldn't work for Zope's packages in ${SOFTWARE_HOME}/lib/python because they're not eggs known to buildout, but I could add that to my path manually (and when all of Zope is eggs...)
[foo] recipe=zc.recipe.egg eggs = egg1 egg2 ... interpreter = mypy extra-paths = path-to-your-instance/lib/python
You can also do:
bin/mypy somescript args
and run the script somescript with the given arguments and it will have the path set up for it.
One wart is that any scripts defined by the eggs will be installed too when you run the buildout, which you may or may not want. There's a way to suppress this but I should probably add a dedicated interpreter recipe that just creates an interpreter.
At least if it was optional to install the eggs' script, that'd be nice. I guess it won't do much harm if the eggs install their scripts, though.
It is optional: [foo] recipe=zc.recipe.egg eggs = egg1 egg2 ... interpreter = mypy extra-paths = path-to-your-instance/lib/python scripts = mypy But more work than I think it should be. The scripts option allows you to select which scripts to include or to rename them. Jim -- Jim Fulton mailto:jim@zope.com Python Powered! CTO (540) 361-1714 http://www.python.org Zope Corporation http://www.zope.com http://www.zope.org