Skip to content

dcperera/pybind_examples

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Examples of using Pybind11

Written for the MolSSI Software Summer School 2017

WARNING: Make sure that you are within the Software Summer School (sss) conda environment!

1.) Make a subdirectory for building (common practice) and change into it

mkdir build
cd build

2.) Run cmake. This will run some checks of your build environment and then create the Makefile for you

cmake ../

3.) Actually build the python modules

make

4.) Test the python module

Simple test:

    python3 -c "import basic_mod; print(basic_mod.factorial(10))"

This should print 3628800, which according to google, is correct.

or use the test script:

    PYTHONPATH=./ python3 ../test.py

About

Examples for binding C++ and Python

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • C++ 75.4%
  • CMake 12.9%
  • Python 11.7%