[Distutils] option #1 plus download_url scraping

holger krekel holger at merlinux.eu
Wed Jun 5 00:48:30 CEST 2013


On Tue, Jun 04, 2013 at 15:23 -0700, Noah Kantrowitz wrote:
> 
> On Jun 4, 2013, at 3:16 PM, Barry Warsaw wrote:
> 
> > Like many of you, I got Donald's message about the changes to URLs for
> > Cheeseshop packages.  My question is about the three options; I think I want a
> > middle ground, but I'm interested to see why you will discourage me from that
> > <wink>.
> > 
> > IIUC, option #1 is fine for packages hosted on PyPI.  But what if our packages
> > are *also* hosted elsewhere, say for redundancy purposes, and that external
> > location needs to be scraped?
> > 
> > Specifically, say I have a download_url in my setup.py.  I *want* that url to
> > be essentially a wildcard or index page because I don't want to have to change
> > setup.py every time I make a release (unless of course `setup.py sdist` did it
> > for me).  I also can't add this url to the "Additional File URLs" page for my
> > package because again I'd have to change it every time I do a release.
> > 
> > So the middle ground I think I want is: option #1 plus scraping from
> > download_url, but only download_url.
> > 
> > Am I a horrible person for wanting this?  Is there a better way.
> 
> Do you mean you just don't want to update the version number in setup.py before you release? I'm a bit unsure of the reason for this. The goal is very specifically the hosting outside of PyPI is no longer encouraged.

I agree with not encouraging "hosting outside" but i'd like to sidenote
that PEP438 has a section discussing history/reasons for external 
hosting [1] and concludes with this:

    Irrespective of the present-day validity of these reasons, there
    clearly is a history why people choose to host files externally and
    it even was for some time the only way you could do things. This PEP
    takes the position that there remain some valid reasons for external
    hosting even today.

As to Barry's need, what might be missing is a tool that helps to
register links with a checksum.  This would not require a change to setup.py
but it would require an extra (scriptable) action when releasing a package.

OTOH, just automating a bit of setup.py changes might be easier and
would allow hosting on pypi which is usually more reliable for 
install time users.

best,
holger

> The reliability and performance of PyPI have enough of a track record now that "I want it on my own site just in case" no longer holds enough water to be worth the substantial downsides.
> 
> --Noah
> 



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



More information about the Distutils-SIG mailing list