[Distutils] PEP 470, round 4 - Using Multi Repository Support for External to PyPI Package File Hosting

Donald Stufft donald at stufft.io
Fri Oct 3 20:49:05 CEST 2014

> On Oct 3, 2014, at 10:44 AM, Paul Moore <p.f.moore at gmail.com> wrote:
> On 3 October 2014 15:29, Wichert Akkerman <wichert at wiggy.net> wrote:
>>> On 03 Oct 2014, at 16:24, Nick Coghlan <ncoghlan at gmail.com> wrote:
>>> 2. Easily allow package authors to tell PyPI "my releases are hosted
>>> <here>" and have that advertised in such a way that tools can clearly
>>> communicate it to users, without silently introducing unexpected
>>> dependencies on third party services.
>> I  haven’t read the PEP, so this might be a stupid remark, but: is that needed, when a package author can also say something like “add my repository to your system with pip —add-repository <url>” ?
> The logic is that if I say
>    pip install foo
> and foo is not hosted on PyPI, I get an error saying "cannot find
> foo". The quoted point is saying that we want a way for the author of
> foo to add metadata to PyPI that lets pip give a more helpful message:
>    pip install foo
>    ERROR: No downloads for package 'foo' found.
>    foo is hosted at the following repositoties:
>        Main repository - http://foo.example.com/simple/
>        Windows wheels - http://wheels.foo.example.com/simple/
>    Use --index-url to specify the repository you wish to use.
> (Or something like that…)

Yes, the comments in particular were inspired by Egenix’s own repositories. I
saw that they had different repositories for UCS2 and UCS4 and I thought that
it would be awesome if pip could tell end users about both of those and give 
hem the information to choose between which ones were relevant.

In this way it supports more things than the existing mechanisms support
because the old things don’t  allow any mechanism for selective addition which
means binary distributions are hard if the filename doesn’t include enough
information for pip/easy_install to actually select the proper download and you
have to encode some of that information in the URL.

Donald Stufft
PGP: 7C6B 7C5D 5E2B 6356 A926 F04F 6E3C BCE9 3372 DCFA

More information about the Distutils-SIG mailing list