[Distutils] Working toward Linux wheel support

Daniel Holth dholth at gmail.com
Tue Sep 1 15:57:14 CEST 2015


Looks amazing, why don't we merge it.

On Thu, Aug 27, 2015 at 3:24 PM Nate Coraor <nate at bx.psu.edu> wrote:

> On Tue, Aug 25, 2015 at 1:54 PM, Nate Coraor <nate at bx.psu.edu> wrote:
>
>> I've started down this road of Linux platform detection, here's the work
>> so far:
>>
>>     https://bitbucket.org/natefoo/wheel/src/tip/wheel/platform/linux.py
>>
>> I'm collecting distribution details here:
>>
>>     https://gist.github.com/natefoo/814c5bf936922dad97ff
>>
>> 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.
>>
>> --nate
>>
>>
> Hi all,
>
> 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:
>
> # pip install --index https://wheels.galaxyproject.org/ --no-cache-dir
> psycopg2
> Collecting psycopg2
>   Could not find a version that satisfies the requirement psycopg2 (from
> versions: )
> No matching distribution found for psycopg2
>
> Then create /etc/python/binary-compatibility.cfg:
>
> # cat /etc/python/binary-compatibility.cfg
> {
>   "linux_x86_64_centos_7": {
>     "install": ["linux_x86_64_rhel_6"]
>   }
> }
>
> # pip install --index https://wheels.galaxyproject.org/ --no-cache-dir
> psycopg2
> Collecting psycopg2
>   Downloading
> https://wheels.galaxyproject.org/packages/psycopg2-2.6.1-cp27-cp27mu-linux_x86_64_rhel_6.whl
> (307kB)
>     100% |################################| 307kB 75.7MB/s
> Installing collected packages: psycopg2
> Successfully installed psycopg2-2.6.1
>
> Of course, I have not attempted to solve the external dependency problem:
>
> # python -c 'import psycopg2; print psycopg2'
> Traceback (most recent call last):
>   File "<string>", line 1, in <module>
>   File "/usr/lib/python2.7/site-packages/psycopg2/__init__.py", line 50,
> in <module>
>     from psycopg2._psycopg import BINARY, NUMBER, STRING, DATETIME, ROWID
> ImportError: libpq.so.5: cannot open shared object file: No such file or
> directory
>
> But after installing postgresql-libs, everything works as expected:
>
> # python -c 'import psycopg2; print psycopg2'
> <module 'psycopg2' from
> '/usr/lib/python2.7/site-packages/psycopg2/__init__.pyc'>
>
> 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.
>
> I'd really appreciate if this work could be given a look, and some
> discussion could take place on where to go from here.
>
> Thanks,
> --nate
>
>
> [1]: https://github.com/natefoo/pip/tree/linux-wheels
> [2]: https://wheels.galaxyproject.org/simple/psycopg2
> _______________________________________________
> Distutils-SIG maillist  -  Distutils-SIG at python.org
> https://mail.python.org/mailman/listinfo/distutils-sig
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/distutils-sig/attachments/20150901/8ca76c80/attachment.html>


More information about the Distutils-SIG mailing list