[Distutils] setup.cfg new format proposal

Sridhar Ratnakumar sridharr at activestate.com
Sat Sep 12 20:47:29 CEST 2009


On Fri, 11 Sep 2009 18:57:28 -0700, P.J. Eby <pje at telecommunity.com> wrote:

> At 02:50 AM 9/12/2009 +0200, Tarek Ziadé wrote:
> it means that we can even provide an XML-RPC service at PyPI so people
> can query the metadata for their platform with zero download and zero
> third-party
> code execution.
>  Ah, now that does sound rather useful, as it would allow installation  
> and similar tools to resolve dependencies without first needing to build  
> or download binaries.

Yes, it is useful. PyPM relies on this 'static metadata', as fetched from  
PKG-INFO and requires.txt, *before* building the packages (on the backend  
server). If the package developer used a configure.py like mechanism to  
*conditionally* generate this PKG-INFO or requires.txt before uploading  
the tarball, then PyPM will use *that* metadata for all of the platforms  
... which is not we want.

I'm +1 on Tarek's proposal actually .. although Jim Fulton has a point  
regarding having conditionals in setup.cfg.

Regardless of the specifics, installer tools should be able to query the  
metadata for a given system (not current system). For example, one should  
be able to do something like this on Linux and Python-2.6:

   >> metadata = read_metadata('/path/to/source')
   >> metadata.get_install_requires_for(pyver=(2,5), osname='win32')

And this should happen without any execution of setup.py.

-srid


More information about the Distutils-SIG mailing list