Guest User

Untitled

a guest
Jun 20th, 2018
80
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.42 KB | None | 0 0
  1. #!/usr/bin/env bash
  2.  
  3. #
  4. # Generate my_python_library_wrap.c and MyPythonLibrary.py
  5. #
  6. swig -python my_python_library.i
  7. #
  8. # Generate _MyPythonLibrary.so
  9. #
  10. gcc `python-config --cflags --ldflags` -I/path/to/my/c/library/headers -L/path/to/my/c/library -lmy_c_library my_python_library_wrap.c -fPIC -shared -o _MyPythonLibrary.so
  11. #
  12. # Now you can copy MyPythonLibrary.py and _MyPythonLibrary.so into your python site-packages/ directory.
  13. #
Add Comment
Please, Sign In to add comment