<div class="gmail_quote">On Wed, Nov 21, 2012 at 1:16 AM, Vinay Sajip <span dir="ltr"><<a href="mailto:vinay_sajip@yahoo.co.uk" target="_blank">vinay_sajip@yahoo.co.uk</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div class="im">Daniel Holth <dholth <at> <a href="http://gmail.com" target="_blank">gmail.com</a>> writes:<br>
<br>
</div><div class="im">> If you don't have Provides-Dist, then distribute must continue to bundle an<br>
> extra .egg-info directory to emulate the feature. This is more than enough<br>
> justification for me. Name: is essentially an alias for Provides-Dist: (or<br>
> vice-versa) so there is no such thing as a single-valued Provides-Dist. Having<br>
> two names for a package is just as complicated as having twenty.<br>
<br>
</div>I'm not so sure. In the case of two names, it could be assumed that one was a<br>
fork of the other (as in the specific cases of distribute/setuptools, or PIL/<br>
Pillow). You cannot reasonably make this assumption if you have twenty entries<br>
in your Provides-Dist.<br>
<div class="im"><br>
> You should not implement Provides-Dist by searching for every Provides-Dist:<br>
> name on PyPI.<br>
<br>
</div>I wasn't seriously suggesting that this approach be taken - merely pointing out<br>
that Provides-Dist isn't of much use in a metadata index.<br>
<div class="im"><br>
> should only use it when deciding whether to download setuptools when distribute<br>
</div>> is already installed and a package depends on setuptools.The bundling term was<br>
<div class="im">> bad wording on the part of the PEP. No one should ever include non-renamed<br>
> copies of other dists in their dists "import six" vs. "import django.util.six".<br>
> I've suggested a new wording in this thread.<br>
<br>
</div>So apart from the setuptools/distribute and PIL/Pillow scenarios, what are the<br>
scenarios where you would have 3 or more values in Provides-Dist? If they are<br>
e.g. a bundled SQLAlchemy, why would that be preferable to an entry in<br>
Requires-Dist?<br></blockquote><div><br>Provides/Requires/Obsoletes are *not* for bundling. Publishing bundled packages on the index is bad, and people shouldn't do it. What they're for is tracking name changes over time, so that you can fork and rename and merge projects without breaking the world for people that depend on your projects (one example used in the Fedora RPM docs is the apache package being renamed to httpd: <a href="https://docs.fedoraproject.org/en-US/Fedora_Draft_Documentation/0.1/html-single/RPM_Guide/index.html#ch-dependencies">https://docs.fedoraproject.org/en-US/Fedora_Draft_Documentation/0.1/html-single/RPM_Guide/index.html#ch-dependencies</a>).<br>
<br>The fact distribute can provide setuptools and Pillow can provide PIL are examples of the simple fork/rename case - they're designed to be drop in replacements for the projects they forked, so it's appropriate for them to advertise that fact in a way the deployment tools can understand. The multi-value support is then needed if you have multiple name changes over time (e.g. if someone were to create a distribute2 that provided both distribute and setuptools), or if you merge two projects together (e.g. if a popular extension to a project was folded into the main distribution for that project).<br>
<br>It's likely fine if an installer doesn't use sophisticated graph analysis to find the "best" way to satisfy a set of requirements - you can just as easily use it in the simple way Daniel describes of only using these fields to check for existing locally installed packages with the necessary capabilities, before going out to get whatever is missing from the package index based purely on the distribution names.<br>
<br>Cheers,<br>Nick.<br> </div></div>-- <br>Nick Coghlan   |   <a href="mailto:ncoghlan@gmail.com">ncoghlan@gmail.com</a>   |   Brisbane, Australia<br>