./wip/py-cppimport, Import C++ files directly from Python

[ CVSweb ] [ Homepage ] [ RSS ] [ Required by ] [ Add to tracker ]


Branch: CURRENT, Version: 20.8.4.2, Package name: py310-cppimport-20.8.4.2, Maintainer: kamelderouiche

TODO: Adjust the following lines from README.md

##### If you've used cppimport version 0.0.\*, some new features for you! Compiler arguments, multiple source files, bug fixes! Read on.

# Import C or C++ files directly from Python!
Let's try it out. First, if you're on Linux or OS X, install with the terminal command `pip install cppimport`.

Most cppimport users combine it with [pybind11](https://github.com/pybind/pybind11), but you can use a range of methods to create your Python extensions. Raw C extensions, Boost.Python, SWIG all work. Let's look at a simple C++ extension:

```c++
#include <pybind11/pybind11.h>

namespace py = pybind11;

int square(int x) {
return x * x;
}


PYBIND11_MODULE(somecode, m) {
m.def("square", &square);
}
...


Master sites:

RMD160: ac51cd3e672681d1700105019e75fa51341aa473
Filesize: 4173.2 KB

Version history: (Expand)