[Distutils] Best practices for optional C extensions

Paul Moore p.f.moore at gmail.com
Sun Jul 14 09:55:12 CEST 2013


On 13 July 2013 14:14, Ben Darnell <ben at bendarnell.com> wrote:

> I'd like to add a C extension to speed up a small bit of code in a package
> (Tornado), but make it optional both for compatibility with non-cpython
> implementations and for ease of installation on systems without a C
> compiler available.  Ideally any user who runs "pip install tornado" on a
> system capable of compiling extensions would get the extensions; if this
> capability cannot be detected automatically I'd prefer the opt-out case to
> be the one that requires non-default arguments.  Are there any packages
> that provide a good example to follow for this?


I believe that coverage has an optional C extension like this.

Paul
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/distutils-sig/attachments/20130714/f11a6e2d/attachment.html>


More information about the Distutils-SIG mailing list