How to create both a c extension and a pure python package

Marco Sulla Marco.Sulla.Python at gmail.com
Wed Mar 10 12:42:19 EST 2021


On Wed, 10 Mar 2021 at 16:45, Thomas Jollans <tjol at tjol.eu> wrote:
> Why are you doing this?
>
> If all you want is for it to be possible to install the package from
> source on a system that can't use the C part, you could just declare
> your extension modules optional

Because I want to provide (at least) two wheels: a wheel for linux
users with the C extension compiled and a generic wheel in pure python
as a fallback for any other architecture.

If I make the extension optional, as far as I know, only one wheel is
produced: the wheel with the extension if all is successful, or the
pure py wheel.


More information about the Python-list mailing list