[Distutils] let's standardize dependency declaration without trying to agree on how to implement it

zooko zooko at zooko.com
Thu Sep 25 20:00:43 CEST 2008

(following up to my own proposal with a case study)

The Twisted Matrix project is a very big, widely used, well- 
engineered Python project.


It requires zope.interface to function.  The Twisted hackers are  
mostly setuptools-haters, and are certainly not going to start using  
and depending on it, but they are willing to declare Twisted's  
dependency on zope.interface in a machine-readable way in order to  
facilitate correct installation of Twisted.  The way they have  
currently accomplished this is by importing setuptools but attempting  
not to use it, and then if setuptools is present in sys.modules add  
the flag to setup(): "install_requires=['zope.interface']":


The goal of all this from the perspective of Twisted developers is  
simply to add "This package requires zope.interface ." into their  
metadata in a way that setuptools, easy_install, pyinstall,  
distribute, stdeb, bbfreeze, vanguardistas.pydebdep, virtualenv, and  
other tools will understand.  They do not want to use or depend on  
setuptools, nor do they want setuptools to have any other effects on  
their project than to emit that one simple fact of dependency metadata.

What I am proposing is that in the next release of Python, all that  
Twisted developers need to do is put "install_requires= 
['zope.interface']" into their invocation of distutils.setup(), and  
the appropriate metadata will be included in the resulting .egg-info  
in a way that all of the aforementioned tools will understand.

This is a modest proposal -- it is backwards compatible, it is likely  
to be forwards-compatible with future Python packaging tools, and it  
does not, I hope, cause any problems for people who prefer not to use  


http://allmydata.org -- Tahoe, the Least-Authority Filesystem
http://allmydata.com -- back up all your files for $5/month

More information about the Distutils-SIG mailing list