CythonBuilder; automated compiling and packaging of Cython code
Project description
CythonBuilder
CythonBuilder; automated compiling and packaging of Cython code
Installation
pip install cythonbuilder
How to use
CythonBuilder makes it easy to use Cython in your Python project by automating the compilation, building and packaging process. You can use CythonBuilder from the commandline or import it as a package in Python.
Commandline Demonstration:
-
Initialize
In your project directory, callcybuilder init
. This creates the/ext
folder. -
Organize
Place all of your Cython files in/ext/pyxfiles
-
Compile and package
Simply callcybuilder build
to build all Cythonfiles in/ext/pyxfiles
. Alternatively callcybuilder build filename
to package specific files (no .pyx needed) -
Import All packages en up in
/ext
so you can simplyfrom ext import yourfilename
.
Python demonstration
import cythonbuilder as cybuilder
cybuilder.init()
cybuilder.just_build(targetfilenames=["my_cy_package"])
from ext import my_cy_package
my_cy_package.some_function()
In-depth, step by step Explanation
I've written a few articles that explain why Python is slow, why we need Cython and how CythonBuilder helps us develop fast code easily:
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.