All Projects → benjaminjack → Python_cpp_example

benjaminjack / Python_cpp_example

Licence: mit
An example of a hybrid python/C++ package with unit tests

Programming Languages

python
139335 projects - #7 most used programming language
cpp
1120 projects

Projects that are alternatives of or similar to Python cpp example

Avp Slam Sim
A basic implementation(not official code) of AVP-SLAM(IROS 2020) in simulation. https://arxiv.org/abs/2007.01813
Stars: ✭ 97 (-9.35%)
Mutual labels:  cmake
Openrct2
An open source re-implementation of RollerCoaster Tycoon 2 🎢
Stars: ✭ 10,115 (+9353.27%)
Mutual labels:  cmake
Sugar
Stars: ✭ 101 (-5.61%)
Mutual labels:  cmake
Cmake fortran template
A template directory structure for a Fortran project using CMake as the build system.
Stars: ✭ 97 (-9.35%)
Mutual labels:  cmake
Samples
DEPRECATED. MediaSDK samples. Main development repo located at https://github.com/Intel-Media-SDK/MediaSDK/tree/master/samples
Stars: ✭ 99 (-7.48%)
Mutual labels:  cmake
Unit Threaded
Advanced unit test framework for D
Stars: ✭ 100 (-6.54%)
Mutual labels:  unittest
Examples
VLC-Qt Examples
Stars: ✭ 96 (-10.28%)
Mutual labels:  cmake
Cmakepchcompiler
CMake precompiled header support via custom PCH compiler extension
Stars: ✭ 105 (-1.87%)
Mutual labels:  cmake
Gr Paint
An OFDM Spectrum Painter for GNU Radio
Stars: ✭ 99 (-7.48%)
Mutual labels:  cmake
Cmake Example Library
How to install a library with cmake
Stars: ✭ 101 (-5.61%)
Mutual labels:  cmake
Cgcmake
CMake modules for common applications related to computer graphics
Stars: ✭ 98 (-8.41%)
Mutual labels:  cmake
Jni By Examples
🎇Fun Java JNI By Examples - with CMake and C++ (or C, of course!) ‼️ Accepting PRs
Stars: ✭ 99 (-7.48%)
Mutual labels:  cmake
Vfxcmake
Cmake Find modules for common vfx software, and general Cmake utility code
Stars: ✭ 100 (-6.54%)
Mutual labels:  cmake
Cqxq
让XQ支持CQ插件
Stars: ✭ 97 (-9.35%)
Mutual labels:  cmake
Spectator
🦊 🚀 A Powerful Tool to Simplify Your Angular Tests
Stars: ✭ 1,386 (+1195.33%)
Mutual labels:  unittest
Gr Tutorial
A tutorial OOT module for GNU Radio
Stars: ✭ 96 (-10.28%)
Mutual labels:  cmake
Qv2ray
⭐ Linux / Windows / macOS 跨平台 V2Ray 客户端 | 支持 VMess / VLESS / SSR / Trojan / Trojan-Go / NaiveProxy / HTTP / HTTPS / SOCKS5 | 使用 C++ / Qt 开发 | 可拓展插件式设计 ⭐
Stars: ✭ 12,886 (+11942.99%)
Mutual labels:  cmake
Corrosion
Marrying Rust and CMake - Easy Rust and C/C++ Integration!
Stars: ✭ 106 (-0.93%)
Mutual labels:  cmake
Sh3redux
SILENT HILL 3 Engine Remake in OpenGL and C++
Stars: ✭ 105 (-1.87%)
Mutual labels:  cmake
Covise
Collaborative Visualization and Simulation Environment, OpenCOVER and OddLOT
Stars: ✭ 101 (-5.61%)
Mutual labels:  cmake

python_cpp_example

This repository contains an example Python module which wraps C++ code. The code presented here was designed to meet four requirements:

  1. Python bindings for C++ code (using pybind11 and built with CMake)
  2. Unit tests for C++ code (using catch)
  3. Unit tests for Python code (using unittest)
  4. A setuptools setup.py script for building, installation, and testing

Please see the blog post that accompanies this repository for more information.

NOTE: If you'd like to see the version of the repository that corresponds to my original June 2017 blog post, go to this release. However, I no longer recommend using the repository structure from this old release.

Installation

To build and install python_cpp_example, clone or download this repository and then, from within the repository, run:

python3 ./setup.py install

or

pip3 install .

Tests

To execute all unit tests, run the following command:

python3 ./setup.py test

Requirements

  • Python 2 or 3
  • CMake 2.8.12 or higher
  • A modern compiler with C++11 support

Acknowledgements

Much of the code in this repository was adapted from the pybind11 tutorial and the pybind11 example CMake repository.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].