<html><head><meta http-equiv="Content-Type" content="text/html charset=utf-8"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class=""><br class=""><div><blockquote type="cite" class=""><div class="">On Jan 9, 2015, at 12:31 PM, Tom Viner &lt;<a href="mailto:tom@viner.tv" class="">tom@viner.tv</a>&gt; wrote:</div><br class="Apple-interchange-newline"><div class=""><div dir="ltr" class=""><div class="">Hi all,<br class=""></div><div class=""><br class=""></div><div class="">we're using an internal devpi server to host our python packages. We find we have to duplicate all our requirements in our tox.ini which can set "indexserver".</div><div class="">But we'd like to be able to install locally hosted requirements from a setup.py like this, using dependency_links:&nbsp;</div><div class=""><br class=""></div><div class=""><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><font face="monospace, monospace" class="">from setuptools import setup<br class=""></font><font face="monospace, monospace" class="">setup(<br class=""></font><font face="monospace, monospace" class="">&nbsp; &nbsp; name='dep_links',<br class=""></font><font face="monospace, monospace" class="">&nbsp; &nbsp; dependency_links=['<a href="http://pypi.local/user/index/+simple/'" target="_blank" class="">http://pypi.local/user/index/+simple/'</a>],<br class=""></font><font face="monospace, monospace" class="">&nbsp; &nbsp; install_requires=[<br class=""></font><font face="monospace, monospace" class="">&nbsp; &nbsp; &nbsp; &nbsp; 'openpyxl-wrapper',<br class=""></font><font face="monospace, monospace" class="">&nbsp; &nbsp; ]<br class=""></font><font face="monospace, monospace" class="">)</font></blockquote></div><div class=""><br class=""></div><div class="">Our index inherits from the public pypi.</div><div class=""><br class=""></div><div class="">However we get this error message (<a href="https://gist.github.com/tomviner/e925c2878fba31661446" target="_blank" class="">Full output</a>):</div><div class=""><br class=""></div><div class=""><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><font face="monospace, monospace" class="">Installed /home/myuser/.virtualenvs/myvenv/lib/python2.7/site-packages/dep_links-0.0.0-py2.7.egg<br class=""></font><font face="monospace, monospace" class="">Processing dependencies for dep-links==0.0.0<br class=""></font><font face="monospace, monospace" class="">Searching for openpyxl-wrapper<br class=""></font><font face="monospace, monospace" class="">Reading <a href="http://pypi.local/user/index/+simple/" target="_blank" class="">http://pypi.local/user/index/+simple/</a><br class=""></font><font face="monospace, monospace" class="">Reading <a href="https://pypi.python.org/simple/openpyxl-wrapper/" target="_blank" class="">https://pypi.python.org/simple/openpyxl-wrapper/</a><br class=""></font><font face="monospace, monospace" class="">Couldn't find index page for 'openpyxl-wrapper' (maybe misspelled?)<br class=""></font><font face="monospace, monospace" class="">Scanning index of all packages (this may take a while)<br class=""></font><font face="monospace, monospace" class="">Reading <a href="https://pypi.python.org/simple/" target="_blank" class="">https://pypi.python.org/simple/</a><br class=""></font><font face="monospace, monospace" class="">No local packages or download links found for openpyxl-wrapper<br class=""></font><font face="monospace, monospace" class="">error: Could not find suitable distribution for Requirement.parse('openpyxl-wrapper')</font></blockquote></div><div class=""><br class=""></div><div class="">So you can see that our simple index page is reached, but for some reason this link isn't fetched:</div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><font face="monospace, monospace" class="">&lt;a href="openpyxl-wrapper"&gt;openpyxl-wrapper&lt;/a&gt;&lt;br/&gt;</font></blockquote><div class=""><br class=""></div><div class="">But the package can be installed using:</div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><font face="monospace, monospace" class="">pip install -e . -i http://</font><span style="font-family:monospace,monospace" class="">pypi.local/user/index</span><font face="monospace, monospace" class="">/+simple/</font><br class=""></blockquote><div class=""><br class=""></div><div class="">and the requirement is installed from the devpi server package without any issue.</div><div class=""><br class=""></div><div class="">So why can setuptools install from public pypi, but not our devpi server?</div><div class=""><br class=""></div><div class="">Any ideas appreciated!</div><div class=""><br class=""></div></div></div></blockquote></div><div class=""><br class=""></div><div class="">The —index-url and the —find-links flag do slightly different things, and dependency_links is like —find-links.</div><div class=""><br class=""></div><div class="">The tl;dr is that you can’t put the simple index there, you have to put the page where the actual files can be found at,</div><div class="">so something like:</div><div class=""><br class=""></div><div class="">&nbsp; &nbsp; dependency_links=[“<a href="http://pypi.local/user/index/+simple/openpyxl-wrapper/%E2%80%9C%5D" class="">http://pypi.local/user/index/+simple/openpyxl-wrapper/“]</a></div><br class=""><div class="">
<div style="color: rgb(0, 0, 0); letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px; word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class=""><div style="color: rgb(0, 0, 0); letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px; word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class=""><div class="">---</div><div class="">Donald Stufft</div><div class="">PGP: 7C6B 7C5D 5E2B 6356 A926 F04F 6E3C BCE9 3372 DCFA</div></div></div>
</div>
<br class=""></body></html>