Please create sandbox environment where you can destroy everything practice.
If you have Anaconda you can clone base env:
conda create --name cpp_packages --clone base
Otherwise please check python docs about virtual envs.
Soo ... if you are conda user (like me) please do not forget to activate recentry created environment,
you can do this with the following command:
source activate cpp_packages
To build a package you should do something like this:
python setup.py build_ext --inplace
Next good practice is to test your code.
The most pythonic way to do this is to write tests using PyTest or something similar.
To run tests you just need:
python -m pytest
This command will check test
(or tests
) directory and execute all files with test*.py
pattern.
- Using C++ in Cython
- Python C API: Introduction
- Python C API: Defining New Types
- Python C API: Type Objects
- How to Package Cython and Cython-wrapped C++ Code within a python module
- C++ class in Python
Series of blog posts about boost::python
: