On Tue, Jan 29, 2019 at 3:22 PM Donald Stufft <don...@stufft.io> wrote:

>
> It still declares a name in the specifier because when doing the
> dependency resolution algorithm, it needs to know the name and the version,
> and conceptually the name and version of “foo @
> https://example.com/foo.tar.gz” is (“foo”, “https://example.com/foo.tar.gz
> ”).
>

I disagree that it *needs* the name: since the link is declared as a
dependency, the installer will necessarily need to check/download it at
some point to install it and could discover the package name at that point,
just like it will discover the version at the same point.
Providing the name in the direct reference is an optimization that ease the
work of the installer and allowing to provide a version specifier could be
an other one.

The two features are basically not 1:1, given that PEP 508 url specifier
> short circuits the URL discovery phase completely, whereas dependency_links
> only provide hints for additional places to look. Trying to cram version
> specifiers into the PEP 508 style syntax is not going to work as people
> expect, because it is conceptually nonsensical.
>

This, I totally agree.


> However, one thing we *could* maybe do is allow including a specific
> version. So instead of treating the URL as the version you would provide
> the name, version, and url. So you’d have something like "foo-1.0 @
> https://example.com/foo.tar.gz”. I don’t personally see much of a point
> to that, the version number doesn’t tell us any new information here, the
> only thing I think it *could* be useful for, is if you had something
> depending on “foo >= 1” and something else depending on “foo-1.0 @ …” then
> it would make it easier to determine there isn’t a dependency conflict.
>

Yes, or the other way round, directly spot a dependency conflict without
downloading the link.
--
Distutils-SIG mailing list -- distutils-sig@python.org
To unsubscribe send an email to distutils-sig-le...@python.org
https://mail.python.org/mailman3/lists/distutils-sig.python.org/
Message archived at 
https://mail.python.org/archives/list/distutils-sig@python.org/message/RR6HO4EFVY3EASZHV6UQ25U7TTHZNBIO/

Reply via email to