Although I have resigned myself to supporting it, I'm still unhappy with zc.buildout.
This is mostly because it tends to ghettoize the packages that are written to use
some of its core features. The core features that tend towards ghettoization fall into
dependency info, testing info, and script generation. Here's what I don't like.
Critical dependency version information is kept outside of setup.py
in buildout.cfg, making it more likely that a package won't work
when 'easy_install'ed. Example: roughly 90% of the Zope3-related
packages and any packages that depend upon them were not
'easy_install'able from PyPI for a few months due to two
external dependency pins done in buildout.cfg files. Installation
via buildout worked, of course, and the packagers never noticed that
the packages couldn't be 'easy_install'ed, even though the packages
are all published to PyPI, and thus presumably 'easy_install'able.
Because the defacto test regime is via the zope testrunner invoked
via bin/test, buildout-centric package developers are hostile to
test invocation via setup.py test, although setup.py test has
been adopted in the larger Python community as the expected way to
run a single package's tests. Example: another committer "fixed" a
checkin of mine by removing stuff from the "tests_require" line of
setup.py in a package housed on svn.zope.org. This makes setup.py test not work
in a fresh checkout. bin/test after a buildout continues to work,
so the packagers just never notice.
Scripts of dependent packages aren't installed automatically by
buildout, while easy_install does install them. So the result of
installing an egg by putting it in a buildout eggs= line is not
equivalent to installing using setup.py install. This means that
packages which have post-setup routines (such as creating an
instance) which expect dependent packages scripts to be installed
won't work. Example: the repoze.plone package depends on the
repoze.zope2 package. The repoze.plone package is a meta-egg
that names as its dependencies repoze.zope2 and all Plone product
and library eggs. When repoze.plone is 'easy_install'ed, a script
from its repoze.zope2 dependency named mkzope2instance is put
into the bin directory. However, when it's named as an egg in a
buildout.cfg, the script is not installed, making it impossible to
create an instance. This is fixable by adding a
zc.recipe.eggs:scripts recipe and naming each egg I want to
install scripts for in that recipe's section, so it's not
intractable, it just violates the rule of least suprise.
Scripts are generated to have long PYTHONPATHS because eggs go to
locations that aren't already on the PYTHONPATH. The environment
generated by a buildout is roughly equivalent to a virtualenv, so I
don't understand why we shouldn't just make a virtualenv, and have
zc.recipe.egg put eggs in its site-packages, and manage a .pth
file to activate and deactivate them as necessary. Scripts wouldn't
need to contain any PYTHONPATH info then. This would be more in
line with what easy_install already does, which would make it
easier for people who haven't yet drank the buildout Kool-Aid to
understand.
In any case, I'm, as usual, bitter but dealing. ;-) One buildout for repoze.plone
is on the burner.
I completely agree with the goal that we should not have buildout be a dependency - it's a choice of convenience and consistency. But practice has shown that it works out.
Which is why we're really grateful that you're making a repoze.plone buildout. We need it. :-)
To take your points in turn:
1) Dependency Information Balkanization
This indeed sucks, and should probably be seen as a stop-gap measure of the fact that Zope 3's eggification process was messy and probably not fully through through. However, no-one seems to have been able to come up with a proper way of managing a release process like Zope 3's where every package is its own egg and you need to track "known good" configurations without an external tracking of "known good sets" like what we currently do with buildout. If you have a practical way to do this, I'd love to hear it.
Of course, easy_install should work for a package. That it doesn't is definitely a bug that should be fixed.
2) Testing Balkanization
For Zope 2/Plone t least, this issue doesn't have anything to with buildout - it has to do with the way that ZopeTestCase works and Zope's product machinery. No-one particularly likes running through zopectl to run tests. I don't know enough about the machinery to support "python setup.py test" to comment on how/whether that's a problem.
3) Script Generation
I was puzzled at this too. I think buildout should generate scripts by default, or at least have the option to behave that way. I can see cases where this isn't necessary, of course.
Having buildout use virtualenev as an implementation detail may be an interesting choice. Why not bring it up on distutils-sig and see what Jim thinks?
Cheers,
Martin