<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">On Tue, Aug 25, 2015 at 1:54 PM, Nate Coraor <span dir="ltr"><<a href="mailto:nate@bx.psu.edu" target="_blank">nate@bx.psu.edu</a>></span> wrote:<br><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"><div dir="ltr">I've started down this road of Linux platform detection, here's the work so far:<div><br></div><div>    <a href="https://bitbucket.org/natefoo/wheel/src/tip/wheel/platform/linux.py" target="_blank">https://bitbucket.org/natefoo/wheel/src/tip/wheel/platform/linux.py</a></div><div><br></div><div>I'm collecting distribution details here:</div><div><br></div><div>    <a href="https://gist.github.com/natefoo/814c5bf936922dad97ff" target="_blank">https://gist.github.com/natefoo/814c5bf936922dad97ff</a><br></div><div><br></div><div>One thing to note, although it's not used, I'm attempting to label a particular ABI as stable or unstable, so for example, Debian testing is unstable, whereas full releases are stable. Arch and Gentoo are always unstable, Ubuntu is always stable, etc. Hopefully this would be useful in making a decision about what wheels to allow into PyPI.</div><span class=""><font color="#888888"><div><br></div><div>--nate</div></font></span></div><div class=""><div class="h5"><div class="gmail_extra"><br></div></div></div></blockquote><div><br></div><div>Hi all,</div><div><br></div><div>Platform detection and binary-compatibility.cfg support is now available in my branch of pip[1]. I've also built a large number of psycopg2 wheels for testing[2]. Here's what happens when you try to install one of them on CentOS 7 using my pip:</div><div><br></div><div><div># pip install --index <a href="https://wheels.galaxyproject.org/">https://wheels.galaxyproject.org/</a> --no-cache-dir psycopg2</div></div><div><div>Collecting psycopg2</div></div><div><div>  Could not find a version that satisfies the requirement psycopg2 (from versions: )</div><div>No matching distribution found for psycopg2</div></div><div><br></div><div>Then create /etc/python/binary-compatibility.cfg:</div><div><br></div><div><div># cat /etc/python/binary-compatibility.cfg </div><div>{</div><div>  "linux_x86_64_centos_7": {</div><div>    "install": ["linux_x86_64_rhel_6"]</div><div>  }</div><div>}</div></div><div><br></div><div><div># pip install --index <a href="https://wheels.galaxyproject.org/">https://wheels.galaxyproject.org/</a> --no-cache-dir psycopg2</div><div>Collecting psycopg2</div><div>  Downloading <a href="https://wheels.galaxyproject.org/packages/psycopg2-2.6.1-cp27-cp27mu-linux_x86_64_rhel_6.whl">https://wheels.galaxyproject.org/packages/psycopg2-2.6.1-cp27-cp27mu-linux_x86_64_rhel_6.whl</a> (307kB)</div><div>    100% |################################| 307kB 75.7MB/s </div><div>Installing collected packages: psycopg2</div><div>Successfully installed psycopg2-2.6.1</div></div><div><br></div><div><div>Of course, I have not attempted to solve the external dependency problem:</div><div><br></div><div><div># python -c 'import psycopg2; print psycopg2'</div><div>Traceback (most recent call last):</div><div>  File "<string>", line 1, in <module></div><div>  File "/usr/lib/python2.7/site-packages/psycopg2/__init__.py", line 50, in <module></div><div>    from psycopg2._psycopg import BINARY, NUMBER, STRING, DATETIME, ROWID</div><div>ImportError: libpq.so.5: cannot open shared object file: No such file or directory</div></div><div><br></div><div>But after installing postgresql-libs, everything works as expected:</div><div><br></div><div><div># python -c 'import psycopg2; print psycopg2'</div><div><module 'psycopg2' from '/usr/lib/python2.7/site-packages/psycopg2/__init__.pyc'></div></div><div><br></div><div>This is an improvement over the current situation of an sdist in PyPI, however, since only one non-default package (postgresql-libs) needs to be installed as opposed to postgresql-devel and the build tools (gcc, make, etc.). In addition, a user installing psycopg2 is likely to already have postgresql-libs installed.</div></div><div><br></div><div>I'd really appreciate if this work could be given a look, and some discussion could take place on where to go from here.</div><div><br></div><div>Thanks,</div><div>--nate</div><div><br></div><div><br></div><div>[1]: <a href="https://github.com/natefoo/pip/tree/linux-wheels">https://github.com/natefoo/pip/tree/linux-wheels</a></div><div>[2]: <a href="https://wheels.galaxyproject.org/simple/psycopg2">https://wheels.galaxyproject.org/simple/psycopg2</a></div></div></div></div>