On 26 Mar, 2013, at 12:06, Daniel Holth <dho...@gmail.com> wrote:

> 
> On Mar 26, 2013 5:28 AM, "Ronald Oussoren" <ronaldousso...@mac.com> wrote:
> >
> >
> > On 25 Mar, 2013, at 19:16, PJ Eby <p...@telecommunity.com> wrote:
> > >
> > >
> > > Also, as far as detecting the need for setuptools, I think that can be
> > > done just by noticing whether the PKG-INFO included in an sdist is
> > > metadata 2.0 or not.  If it is, then setuptools should be explicitly
> > > declared as a build-time dependency, otherwise it's not needed.  If
> > > it's an older metadata version, then you probably need setuptools.
> >
> > Is it even necessary to automaticly install setuptools? Setuptools-using 
> > package are supposed to use  ez_setup.py, or distribute_setup.py for 
> > distribute, to ensure that the setuptools package is available during 
> > setup.  Although I must admit that I have no idea how many packages still 
> > do this instead of assuming that users will have installed setuptools 
> > anyway.
> >
> > Ronald
> >
> 
> We really really really want to get rid of ez_setup. It is considered by many 
> to be the example of something that should not happen as a side effect of 
> running a build script.

That can't be helped with the current tool versions, distutils in current 
release of python doesn't support setup-requires and hence the only way to use 
setuptools is by using ez_setup.py.  Ez_setup.py will still have to be present 
for python 2.7 users that want to use "python setup.py ...", and hence can be 
assumed to be present for now.  I'm all for adding support for metadata 2.0 to 
the stdlib for Python 3.4, that way ez_setup.py can be phased out in the long 
run.

> 
> When packages no longer have to install themselves, they can just mention 
> setup-requires and the installer grabs the necessary setuptools.
> 
That can only be done for sdists with 2.0 metadata, sdists for older versions 
don't have a setup-requires in their metadata.  This is not just for 
installing, if you want to use setuptools in your setup.py you'll have to make 
sure it is installed in your setup.py, and with the current version of the 
packaging tools this means you have to use something like ez_setup.py or tell 
users to install setuptools themselves.

And with some luck a large subset of packages will ship wheels in the future, 
that way the installer doesn't even have to look at sdists.

Ronald

_______________________________________________
Distutils-SIG maillist  -  Distutils-SIG@python.org
http://mail.python.org/mailman/listinfo/distutils-sig

Reply via email to