[Distutils] environment variables in buildout config files?

Marius Gedminas marius at pov.lt
Thu Jan 8 22:46:38 CET 2009

On Thu, Jan 08, 2009 at 04:37:05PM -0500, Barry Warsaw wrote:
> One other thing that bugs me about these is that it's not obvious from  
> an ls what you can actually delete because it's an artifact of  
> setuptools/buildout/etc and what is part of your package.  I mean, you  
> have to know that it's safe to delete bin, dist, and build  right?

Or you could see which files are ignored by your VCS.  E.g. with bzr
you'd do 'rm `bzr unknowns`', and I'm sure you could write a one-liner
to work with 'svn st -v'.

Or you could get a fresh checkout, or use svn export.

> setup.py has a 'clean' command but it's not enough.  Maybe if buildout  
> added a --clean option or something that would be better.  What I  
> really want is a simple way to revert a tree back to its pristine  
> version-controlled layout, without all the build, develop, test  
> artifacts.

I'd say this is up to your version-control system to implement this,
then.  It doesn't feel right to put this into buildout.  E.g. how would
it know that it's OK to erase ./eggs, but not OK to erase
~/.buildout/my-shared-egg-cache/, if the difference is just an option in
~/.buildout/default.cfg?  Sure, you could see which files are inside the
tree and which ones are outside, but it rapidly descends into guessing.
Which you should refuse the temptation to, according to Zen.

Also, there are files littering your source tree that aren't tracked in
a VCS, and weren't created by buildout (e.g. *.pyc).  I don't think
bin/buildout clean should remove files bin/buildout didn't create.

Marius Gedminas
Attempts to stick to simple on-or-off options lead to monsters like gcc, which
now has so many flags that programmers are using genetic algorithms to explore
        -- http://www.third-bit.com/~gvwilson/xmlprog.html
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
URL: <http://mail.python.org/pipermail/distutils-sig/attachments/20090108/88df4c5d/attachment.pgp>

More information about the Distutils-SIG mailing list