[Distutils] setuptools: Utility of setup() arguments

Ian Bicking ianb at colorstudy.com
Wed Sep 7 00:21:59 CEST 2005

I'm wondering, is there any reason to use the keyword arguments to 
setup() that write files to the .egg-info directory, instead of writing 
those files myself (assuming I was going to hardcode them in the Python 
source anyway).

Specifically I'm coming back to some deployment stuff, and I'd like to 
make an installation process that installs all the dependencies using 
--multi-version, and then makes the deployed application require those 
exact versions -- this way nothing else on the machine should be 
effected by the installation.  Doing this in an automated way seems 
reasonably straight-forward; read the requires.txt file, figure out what 
the versions are we installed just now (which might have build tags), 
and rewrite that file.  I can rewrite that file easily, not so easy to 
rewrite setup.py.  Relatedly, I'd prefer having entry_points.txt in my 
repository, since it's annoying when I forget to update it, or when I 
run "sudo python setup.py develop" it'll be written out as root, and 
I'll have to fix the permissions before rerunning "setup.py egg_info".

Frankly I'd rather have PKG-INFO in the repository as a text file too, 
though it concerns me more that it is formed from several keyword 
arguments instead of one.

So, to the degree this works (and I haven't tried it with PKG-INFO), is 
there any reason to use setup() arguments over editing the files it 
generates directly?

Ian Bicking  /  ianb at colorstudy.com  /  http://blog.ianbicking.org

More information about the Distutils-SIG mailing list