Skip to content

Latest commit

 

History

History
32 lines (22 loc) · 673 Bytes

README.rst

File metadata and controls

32 lines (22 loc) · 673 Bytes

cmake_python_wrapper

C Python wrapper generated by CMake example This example was built from this BLOG: https://bloerg.net/2012/11/10/cmake-and-distutils.html

Installation

Note: INSTALL_DIR represents your target installation directory

git clone https://github.com/jacquemier/cmake_python_wrapper.git
mkdir build
cmake ../cmake_python_wrapper/v2 -DCMAKE_INSTALL_PREFIX=INSTALL_DIR
make install

Test

export LD_LIBRARY_PATH=${LD_LIBRARY_PATH}:INSTALL_DIR/lib
python

>>> import foo
>>> foo.square(10)