It's necessary to bundle the external library with the wheel.

On linux, this is what the manylinux tag is all about (see PEP 513 & 571) and the auditwheel tool ( will bundle the library into the wheel.

On OS X and Windows, I'm less familiar with the toolchain but the same principle applies.


On Tue, Jan 22, 2019 at 6:41 AM Jeroen Demeyer <> wrote:

I have a Python project that depends on an external C library (which is
unrelated to Python and NOT part of the OS).

For an sdist, this is easy: my assumes that the library is
pre-installed somewhere on the system where setuptools can find it.

However, is there a standard solution for packaging such a project as
wheel? Ideally, the project should "just work" when doing pip install on
it, which means that the external library should somehow be bundled in
the wheel.

I know that for example numpy does that, but it also has a very
complicated build system (containing a fork of distutils!).

Does anybody know any pointers for this? Or if you think that this is a
minefield which is not really supported, feel free to say so.

Distutils-SIG mailing list --
To unsubscribe send an email to
Message archived at