<div dir="ltr"><br><div class="gmail_extra"><br><div class="gmail_quote">On Tue, Mar 21, 2017 at 3:13 AM, Thomas Güttler <span dir="ltr"><<a href="mailto:guettliml@thomas-guettler.de" target="_blank">guettliml@thomas-guettler.de</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">AFAIK it is impossible to do this:<br>
<br>
pip install -e foo<br>
<br>
You need to use the repo URL up to now:<br>
<br>
pip install -e git+<a href="https://example.com/repos/foo#egg=foo" rel="noreferrer" target="_blank">https://example.com/repos/<wbr>foo#egg=foo</a><br>
<br>
AFAIK the fast/short implementation of "pip install -e foo" does<br>
not work, since pip can't access metadata of package foo without downloading<br>
the whole package. Or am I wrong - is this possible?<br></blockquote><div><br></div><div>These read metadata from an already-downloaded package with a setup.py?:</div><div><br></div><div>```bash</div><div>pip install -e .</div><div>pip install -e "${VIRTUAL_ENV}/src/foo"</div><div>```</div><div><br></div><div>You can download the JSON metadata from {PyPI, Warehouse} but IDK about {devpi, }?</div><div><br></div><div>- <a href="https://github.com/pypa/warehouse/issues/1638">https://github.com/pypa/warehouse/issues/1638</a></div><div> - <a href="https://pypi.org/pypi/pip/json">https://pypi.org/pypi/pip/json</a></div><div> - </div><div><br></div><div> - <a href="https://github.com/pypa/warehouse/blob/master/warehouse/legacy/api/json.py">https://github.com/pypa/warehouse/blob/master/warehouse/legacy/api/json.py</a></div><div> - [ ] add (existing, Metadata 2.0/3.0) JSON api to devpi</div><div><br></div><div> - [ ] Create a PEP for a pypa JSON HTTP endpoint spec</div><div> - [ ] Static HTML support: Redirect to pkg-name-ver.tar.gz.json?</div><div><br></div><div> - <a href="http://doc.devpi.net/latest/curl.html">http://doc.devpi.net/latest/curl.html</a></div><div> - <a href="http://doc.devpi.net/latest/userman/devpi_commands.html#getjson">http://doc.devpi.net/latest/userman/devpi_commands.html#getjson</a></div><div><br></div><div><br></div><div>- "Pip needs a dependency resolver"</div><div> <a href="https://github.com/pypa/pip/issues/988">https://github.com/pypa/pip/issues/988</a></div><div> - <a href="https://github.com/awwad/depresolve/blob/master/depresolve/scrape_pypi_metadata.py">https://github.com/awwad/depresolve/blob/master/depresolve/scrape_pypi_metadata.py</a></div><div><br></div><div> - pip clone --recursive</div><div> - pip install --clone --recursive --no-recursive</div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
<br>
But how cares for useless downloaded bytes? I don't care.<br></blockquote><div><br></div><div>How is this usecase distinct from those solved for by?:</div><div><br></div><div>- requirements.txt</div><div>- pipenv install --dev pkgname</div><div> - <a href="https://github.com/kennethreitz/pipenv">https://github.com/kennethreitz/pipenv</a><br></div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
<br>
It should be possible to download the whole package "foo",<br>
then look at the metadata which is provided by it. Take<br>
the canonical repo url, and then get the source from<br>
the repo.<br>
<br>
AFAIK there is no official way to define a "Canonical Repo URL" up to now.<br>
<br>
If I want to provide it for my custom packages. How could I do this?<br></blockquote><div><br></div><div>With JSONLD [1],</div><div>you could just add a "source" attribute (with your own namespaced URI: "myns:source") to the package metadata:</div><div><br></div><div>sourceURL: "git+ssh://<a href="http://git@github.com/pypa/pip@master">git@github.com/pypa/pip@master</a>"</div><div>sourceURL: "git+<a href="https://github.com/pypa/pip@master">https://github.com/pypa/pip@master</a>"<br></div><div><br></div><div>Or, we could add "sourceURL" (pending bikeshedding on the property name) to the metadata 3.0 PEP.</div><div><br></div><div>````bash</div><div>pip clone pip</div><div>pip install --clone --rev-override=develop pip</div><div>```</div><div><br></div><div>And then, if you give a mouse a cookie,</div><div>what about multiple sourceURLs: which is the canonical URL?</div><div><br></div><div>git+git://<a href="http://git.apache.org/libcloud.git">git.apache.org/libcloud.git</a><br></div><div>git+<a href="https://github.com/apache/libcloud">https://github.com/apache/libcloud</a></div><div>git+ssh://<a href="http://git@github.com/apache/libcloud">git@github.com/apache/libcloud</a></div><div><br></div><div>[1] <a href="https://github.com/pypa/interoperability-peps/issues/31">https://github.com/pypa/interoperability-peps/issues/31</a><br></div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
<br>
Regards,<br>
Thomas Güttler<span class="gmail-HOEnZb"><font color="#888888"><br>
<br>
-- <br>
Thomas Guettler <a href="http://www.thomas-guettler.de/" rel="noreferrer" target="_blank">http://www.thomas-guettler.de/</a><br>
______________________________<wbr>_________________<br>
Distutils-SIG maillist - <a href="mailto:Distutils-SIG@python.org" target="_blank">Distutils-SIG@python.org</a><br>
<a href="https://mail.python.org/mailman/listinfo/distutils-sig" rel="noreferrer" target="_blank">https://mail.python.org/mailma<wbr>n/listinfo/distutils-sig</a><br>
</font></span></blockquote></div><br></div></div>