Skip to content
Snippets Groups Projects
Piotr Maślanka's avatar
Piotr Maślanka authored
a12ca087

snakehouse

Build Status Code Climate Issue Count PyPI PyPI version PyPI PyPI license

snakehouse is a tool to pack mutiple .pyx files into a single extension.

Inspired by this StackOverflow discussion.

Tested and works on CPython 3.5-3.9, both Windows and Linux. It doesn't work on PyPy.

Contributions most welcome! If you contribute, feel free to attach a change to CONTRIBUTORS.md as a part of your pull request as well! Note what have you changed in CHANGELOG.md as well!

Usage notes

Take a look at example on how to multi-build your Cython extensions.

Don't place modules compiled that way in root .py file's top level imports. Wrap them in a layer of indirection instead!

This applies to unit tests as well!

When something goes wrong (eg. the application throws an unhandled exception) the built module has a tendency to dump core. Try to debug it first by passing dont_snakehouse=True to your modules in the debug mode.