Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Utilities and example for using CMake to build Cython modules.
Python C++
tree: 5561b34f6b

Fetching latest commit…

Cannot retrieve the latest commit at this time

Failed to load latest commit information.
bin
cmake
include
src
test
CMakeLists.txt
LICENSE
readme.rst
setup.py

readme.rst

cython-cmake-example

Introduction

Cython is hybrid C-Python language to easily write Python C-extensions. Cython allows one to write fast Python-ish code and easily integrate C or C++ code.

CMake is a cross-platform build system with good support for C/C++. With simple projects description scripts, CMakeLists.txt, a powerful configuration system is available. The configuration can be handled with a command line interface, curses interface, or Qt GUI interface.

This repository has CMake utilities for building Cython projects with CMake. The rectangle example from the Cython documentation is built to demonstrate their use. An example is also provided that shows registering a C callback with a function defined in a Cython module.

The features of this build system include:

  • Easy configuration of build settings.
  • Easy integration of external libraries.
  • Implicit Makefile dependency generation for .pxd files.
  • Implicit Makefile dependency generation for C/C++ headers.
  • Out-of-source builds.

Dependencies

Build Dependencies

Test Dependencies

Build Instructions

mkdir cython_example_build
cd cython_example_build
cmake /path/to/src/cython-cmake-example
make

To run the tests:

nosetests
Something went wrong with that request. Please try again.