Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/usr/bin/env bash
- #
- # Generate my_python_library_wrap.c and MyPythonLibrary.py
- #
- swig -python my_python_library.i
- #
- # Generate _MyPythonLibrary.so
- #
- 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
- #
- # Now you can copy MyPythonLibrary.py and _MyPythonLibrary.so into your python site-packages/ directory.
- #
Add Comment
Please, Sign In to add comment