[openstack-dev] Swift, netifaces, PyPy, and cffi

Alex Gaynor alex.gaynor at gmail.com
Tue Aug 13 21:58:56 UTC 2013


Hi all,

(This references this changeset: https://review.openstack.org/#/c/38415/)

One of the goals I've been working at has been getting swift running on
PyPy (and from there, the rest of OpenStack). The last blocking issue in
swift is that it currently uses netifaces, which is a C-extension that
doesn't on PyPy. I've proposed to replace this dependency with a cffi based
binding to the system.

For those not familiar, cffi is a tool for binding to C libraries, similar
to ctypes (in the stdlib), except more expressive, less error prone, and
faster; some of our downstream dependencies already use it.

One of the issues that came up in this review however, is that cffi is not
packaged in the most recent Ubuntu LTS (and likely other distributions),
although it is available in raring, and in a PPA (
http://packages.ubuntu.com/raring/python-cffi and
https://launchpad.net/~pypy/+archive/ppa?field.series_filter=preciserespectively).

As a result of this, we wanted to get some feedback on which direction is
best to go:

a) cffi-only approach, this is obviously the simplest approach, and works
everywhere (assuming you can install a PPA, use pip, or similar for cffi)
b) wait until the next LTS to move to this approach (requires waiting until
2014 for PyPy support)
c) Support using either netifaces or cffi: most complex, and most code,
plus "one or the other" dependencies aren't well supported by most tools as
far as I know.

Thoughts?
Alex

-- 
"I disapprove of what you say, but I will defend to the death your right to
say it." -- Evelyn Beatrice Hall (summarizing Voltaire)
"The people's good is the highest law." -- Cicero
GPG Key fingerprint: 125F 5C67 DFE9 4084
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstack.org/pipermail/openstack-dev/attachments/20130813/3e0fab2a/attachment.html>


More information about the OpenStack-dev mailing list