GithubHelp home page GithubHelp logo

ryanmwhitephd / cython-cmake-example Goto Github PK

View Code? Open in Web Editor NEW

This project forked from thewtex/cython-cmake-example

0.0 2.0 0.0 40 KB

Utilities and example for using CMake to build Cython modules.

License: Apache License 2.0

CMake 74.26% Python 18.90% C++ 6.84%

cython-cmake-example's Introduction

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.

The project is tested across platforms on the nightly dashboard.

Note

The latest versions of these CMake Cython scripts are maintained in scikit-build.

Dependencies

Build Dependencies

Test Dependencies

Build Instructions

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

Warning

In your CMake configuration, make sure that PYTHON_LIBRARY, PYTHON_INCLUDE_DIR, and CYTHON_EXECUTABLE are all using the same CPython version.

To run the tests:

nosetests

cython-cmake-example's People

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.