<html><head><meta http-equiv="Content-Type" content="text/html charset=iso-8859-1"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><br><div><div>On Jul 18, 2013, at 4:36 PM, Paul Moore <<a href="mailto:p.f.moore@gmail.com">p.f.moore@gmail.com</a>> wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite"><div dir="ltr">On 18 July 2013 18:24, Marcus Smith <span dir="ltr"><<a href="mailto:qwcode@gmail.com" target="_blank">qwcode@gmail.com</a>></span> wrote:<br><div class="gmail_extra"><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<br><div class="gmail_quote"><div class="im"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">I think it's still useful to have pip vendor just pkg_resources (as<br>

pip.pkg_resources). It's easy, it gives you enough to install wheels,<br>
and it's not the only thing you would do. </blockquote><div><br></div></div><div>I agree.  there's 2 problems to be solved here</div><div><br></div><div>1) making pip a self-sufficient wheel installer  (which requires some internal pkg_resources equivalent)</div>

<div>2) removing the user headache of a setuptools build *dependency* for practically all current pypi distributions</div><div><br></div><div>for #2, we have a few paths I think</div><div><br></div><div>1) bundle setuptools  (and have pip install "pkg_resources" for console scripts, if it existed as a separate project)</div>

<div>2) bundle setuptools (and rewrite the console script wrapper logic to not need pkg_resources?)</div><div>3) dynamic install of setuptools from wheel when pip needs to instal sdists (which is 99.9% of the time, so this feels a bit silly)</div>

<div>4) just be happy that the pip bootstrap/bundle efforts will alleviate the pain in new versions of python (by pre-installing setuptools?)</div><div></div></div></blockquote></div><br></div><div class="gmail_extra">As you say, for #1 using an internal pkg_resources (probably distlib's, why bother vendoring a second one?) works.</div>
<div class="gmail_extra"><br></div><div class="gmail_extra">Given that pip forces use of setuptools for *all* sdist builds, I think we have to bundle it for that purpose. I really dislike the need to do this, but I don't see a way round it. And if we do, we can just as easily use the real pkg_resources as distlib's emulation.</div>
<div class="gmail_extra"><br></div><div class="gmail_extra">As regards console scripts, I think they should be rewritten to remove the dependency on pkg_resources. That should be a setuptools fix, maybe triggered by a flag (possibly implied by --single-version-externally-managed, as the pkg_resources complexity is only needed when multi-versions are involved). If Jason's not comfortable with the change, then we'll probably have to find some way of doing it within pip, which will likely to be a fairly gross hack (unless we go really bleeding-edge and don't pit scripts into a wheel *at all* (or just omit exes and -script.py files, I don't know) and put the exports metadata in the wheel assuming that it's the wheel installer's job to create the wrappers. We can do that for pip install, and we just have to assume that other tools (wheel install, distlib) will do the same.</div>
<div class="gmail_extra"><br></div><div class="gmail_extra">TBH, my preference is for the metadata approach, do it correctly from the start.</div><div class="gmail_extra"><br></div><div class="gmail_extra">Paul</div></div>
_______________________________________________<br>Distutils-SIG maillist  -  <a href="mailto:Distutils-SIG@python.org">Distutils-SIG@python.org</a><br><a href="http://mail.python.org/mailman/listinfo/distutils-sig">http://mail.python.org/mailman/listinfo/distutils-sig</a><br></blockquote></div><br><div>Console scripta aren't the only use of entry points fwiw. THere's other entry points programs use. I don't know if they all depend on setuptools or if just assume it's there. Technically the should depend but that would break things for those people.</div><div><br></div><div>I think either way pkg_resources is going to need to be installed, but setuptools won't. </div><div>
<br>-----------------<br>Donald Stufft<br>PGP: 0x6E3CBCE93372DCFA // 7C6B 7C5D 5E2B 6356 A926 F04F 6E3C BCE9 3372 DCFA

</div>
<br></body></html>