Buildout and setuptools

(A comment to blog post by Tres Seavor -- I can't figure out how to add comment there, so this post.)

Buildout is build tool which can be used for any Python packages and
not something only for Zope. Since it is created Jim Fulton, the Zope
Pope, naturally there are many early adopters from Zope community.
Buildout itself may not be enough for all purposes, but it can be
extended using "recipes", the extension mechanism provided by
Buildout. Buildout use setuptools, but it's not for replacing it.
You can make use all features of setuptools while using Buildout. So,
all the strengths of setuptools are available for Buildout also.

A buildout.cfg of a Python need not to have duplicate information
given in setup.py . For example, a typical configuration file for a
package will be like this:

[buildout]
develop = .
parts =

As you can see above there is no additional detail, the only
information given is the packages required to be developed.
(Here . means package in the current directory)

As you know any build system should have some kind of configuration,
if you think its a clutter, well I don't know what to say.

Most of the packages are setuptools based and so you can run any
command provided by setuptools. But if you want to get the benefits
of using Buildout you should learn the Buildout system. Then you will
be able to overcome the "foreign feeling".

As I said, Buildout doesn't prevent you from running any setuptools
command. For example if your package's setup.py is configured to run
'test' command, you can run it. There are some buildout recipe which
helps you to run tests in some weired way, but that is not a problem
of buildout ! That recipe may have it's own reason for doing it that
way, like handle extra dependencies, be more explicit, use a
particular test runner etc.. If you don't want this recipe, it's OK,
use your old setuptools test mechanism.

Popular posts from this blog

Some thoughts on Python 3 adoption

PyCon India 2014 - Call for Proposal

PyCon India 2014 received 143 proposals