[buildout] hard coded urls considered harmful
Hi All, bootstrap.py contains the following hard coded url: exec urllib2.urlopen('http://peak.telecommunity.com/dist/ez_setup.py' ).read() in ez With hindsight, this seems like a bad idea. For example, with the ridiculous situation we currently have with setuptools and distribute. It also means that the above url can't ever change, which is a bit of a harsh requirement. My suggestion would be for bootstrap.py to include the code in ez_setup.py, but that seems a little heavyweight. I guess this will all be solved when the standard library includes modules to download packages from PyPI and install them. But what to do in the meantime? cheers, Chris -- Simplistix - Content Management, Batch Processing & Python Consulting - http://www.simplistix.co.uk
On Fri, Oct 9, 2009 at 5:08 PM, Chris Withers <chris@simplistix.co.uk> wrote:
Hi All,
bootstrap.py contains the following hard coded url:
exec urllib2.urlopen('http://peak.telecommunity.com/dist/ez_setup.py' ).read() in ez
With hindsight, this seems like a bad idea. For example, with the ridiculous situation we currently have with setuptools and distribute. It also means that the above url can't ever change, which is a bit of a harsh requirement.
My suggestion would be for bootstrap.py to include the code in ez_setup.py, but that seems a little heavyweight. I guess this will all be solved when the standard library includes modules to download packages from PyPI and install them. But what to do in the meantime?
zc.buildout uses setuptools. it's hardcoded and it's deeper than bootstrap.py. Changing this properly requires quite some work. We need to leave this alone and provide a distribute bootstrap.py that does some extra things to make zc.buildout work with it. A specific bootstrap.py script for distribute is possible, and I happen to have it finished now : $ wget http://ziade.org/bootstrap.py (this is working with the current zc.buildout trunk) Tarek
Tarek Ziadé wrote:
My suggestion would be for bootstrap.py to include the code in ez_setup.py, but that seems a little heavyweight. I guess this will all be solved when the standard library includes modules to download packages from PyPI and install them. But what to do in the meantime?
zc.buildout uses setuptools. it's hardcoded and it's deeper than bootstrap.py. Changing this properly requires quite some work.
Not that much, as you already know, as I've already done the majority of this on a branch. Hopefully I'll get to look at this again soon, and the bugs I hit might well be solved now that Distribute is more mature...
We need to leave this alone and provide a distribute bootstrap.py that does some extra things to make zc.buildout work with it.
Hacking around like this seems sub optimal to me.
A specific bootstrap.py script for distribute is possible, and I happen to have it finished now :
I'll certainly try this out, but I'm not using buildout trunk anywhere. Does it work with the current released version of buildout? Chris -- Simplistix - Content Management, Batch Processing & Python Consulting - http://www.simplistix.co.uk
On Fri, Oct 9, 2009 at 6:19 PM, Chris Withers <chris@simplistix.co.uk> wrote:
A specific bootstrap.py script for distribute is possible, and I happen to have it finished now :
I'll certainly try this out, but I'm not using buildout trunk anywhere. Does it work with the current released version of buildout?
No I need to release zc.buildout 1.4.2 for this, I have asked the other maintainers if they are OK. I'll do it this week-end together with the Distribute 0.6.4 release if no one objects Tarek
On Fri, Oct 9, 2009 at 11:08 AM, Chris Withers <chris@simplistix.co.uk> wrote:
Hi All,
bootstrap.py contains the following hard coded url:
exec urllib2.urlopen('http://peak.telecommunity.com/dist/ez_setup.py' ).read() in ez
With hindsight, this seems like a bad idea.
I don't see a good alternative.
For example, with the ridiculous situation we currently have with setuptools and distribute. It also means that the above url can't ever change, which is a bit of a harsh requirement.
My suggestion would be for bootstrap.py to include the code in ez_setup.py, but that seems a little heavyweight.
ez_setup.py has a hard coded URL too. And using it's code wouldn't do anything for the situation with distribute.
I guess this will all be solved when the standard library includes modules to download packages from PyPI and install them. But what to do in the meantime?
For myself, I'm going to stay out of Tarek's way and see what develops. :) Jim -- Jim Fulton
Jim Fulton wrote:
On Fri, Oct 9, 2009 at 11:08 AM, Chris Withers <chris@simplistix.co.uk> wrote:
Hi All,
bootstrap.py contains the following hard coded url:
exec urllib2.urlopen('http://peak.telecommunity.com/dist/ez_setup.py' ).read() in ez
With hindsight, this seems like a bad idea.
I don't see a good alternative.
At least having it overrideable on the command line and/or by an environment variable would be the way forward...
My suggestion would be for bootstrap.py to include the code in ez_setup.py, but that seems a little heavyweight.
ez_setup.py has a hard coded URL too.
Indeed, but that uses the advertised public APIs of PyPI, which I have a little more faith in. But yes, this whole business of hardcoding download urls is brittle and annoying. What's needed to make it no longer necessary? stdlib support for downloading a package from an index, with PyPI as the default? Chris -- Simplistix - Content Management, Batch Processing & Python Consulting - http://www.simplistix.co.uk
participants (3)
-
Chris Withers
-
Jim Fulton
-
Tarek Ziadé