Hi Jean,

Your post is not about buildout, by the way, it's about setuptools. You're not even using buildout from what I can tell.

A while ago I griped about the experience of installing via buildout:
http://www.openplans.org/projects/deliverance/lists/deliverance-discussion/archive/2008/07/1216293014124/forum_view

The Deliverance buildout thing is totally screwed up, at least on OS X. That's to do with lxml and libxml2, though.

I just had a similar experience with the eggified eXtreme Management Tool.
As usual, I just grab the download from the Plone product page. Then I
unpack it.
- This is a clean Python install, so I can't just run setup.py, I have
to ez_setup.py first. OK, do that, it installs to
~/zope/Python-2.4.5/site-packages and jams something into a .pth file.
- Now I run '~/zope/Python-2.4.5/bin/python setup.py install' and it
spews a ton of noise, obscuring the fact that:
  (a) it's installing into ~/zope/Python-2.4.5/site-packages instead
of into my Zope instance, and
  (b) it's haring off to pypi.python.org to download two dependencies
not mentioned on the Plone product page.
- It also jams more stuff into easy-install.pth

This is all very wrong. First of all, you're not using buildout here. Secondly, you're installing this using setup.py directly into your global site-packages, which you definitely don't want. Thirdly, why do you worry about dependencies?

You should just do what it says here:

http://plone.org/documentation/tutorial/buildout/

In particular:

http://plone.org/documentation/tutorial/buildout/installing-a-third-party-product

Things I don't like:
- there's no reason for the whole byte-compiling and
working-directory-copying dance, much less making me watch it. It's
just Python code that could just be copied once into the proper place.
(Yes, this is a setuptools issue and XMT probably can't help it.)
- I don't want to unexpectedly discover that my download misses bits
that I need internet access to get at. Also, before finding pypi,
setuptools consults plone.org .. so two remote servers have to be up
for things to work, when the dependencies could simply have been
bundled.

The point of setuptools is that it calculates the appropriate dependencies for you and fetches them automatically. That can be a great help. With buildout, you will get to see quite clearly which versions you're getting, and you can pin them if you need to.

However, I don't think that bundling everything together was ever a good idea. Say I release package A 1.0 that depends on package B 1.0, and then then someone discovers a critical bug in B 1.0 and releases B 1.0.1. With setuptools doing dependency management, I have a pretty good chance of getting B 1.0.1 as a default once it's installed. With a bundle, I'd need to re-release A.

Now what happens if I have released C 1.0 and C depends on B. Do I bundle it twice? How do you resolve conflicts between versions? setuptools tracks and does all that stuff for you.

- What's the point of having a defined way for Python to find imports
if you're just going to enumerate all the places to look in a .pth
file? (I realise I'm fighting the tide here.) Next I want to rejigger
things so that the install goes to my instance, so that I can decide
on a per-instance basis whether I want the XMT installed, and I'll
have to hack the .pth file to take out the site-packages paths.

Please read the bulidout tutorial and all of this will make so much more sense.

I don't like the "Best match: xm.booking 0.5.2" lines, which tell me
that if I install Products.eXtremeManagement-1.6.tar.gz and little
Johnny installs Products.eXtremeManagement-1.6.tar.gz I may end up
with a different setup than Johnny (if he got "Best match: xm.booking
0.5.3"). Ditto if I setup server A today and server B tomorrow, I may
have different bits. Products as distributed should install the same
every time.

And then, last but not least, I get told:

Searching for setuptools==0.6c8
Best match: setuptools 0.6c8
Processing setuptools-0.6c8-py2.4.egg
setuptools 0.6c8 is already the active version in easy-install.pth
Installing easy_install script to /home/jean/zope/Python-2.4.5/bin
Installing easy_install-2.4 script to /home/jean/zope/Python-2.4.5/bin

I just installed it, of course it's there and active. And then it goes
even further and apparently reinstalls it. This is just noise,
obscuring useful information and doing unnecessary work.

/me shrugs

You'll only get this once. I'd rather know what it was doing.

Martin

--
Author of `Professional Plone Development`, a book for developers who
want to work with Plone. See http://martinaspeli.net/plone-book


_______________________________________________
Product-Developers mailing list
[email protected]
http://lists.plone.org/mailman/listinfo/product-developers

Reply via email to