- CMake
- C++ Compiler
- Python
- SWIG
- Run cmake with
BUILD_BINDINGS_PYTHON=ON
- Build target
_sourcetraildb
- Copy two files from the
bindings_python
build directory intoSourcetrailDB/examples/python_api_example/src
:sourcetraildb.py
- Windows:
_sourcetraildb.pyd
- Linux:
_sourcetraildb.so
- macOS:
_sourcetraildb.dylib
and rename to_sourcetraildb.so
- Run example from the directory
SourcetrailDB/examples/python_api_example/src
with:
$ python example.py --database-file-path=absolute/path/to/SourcetrailDB/examples/python_api_example/src/example.srctrldb --source-file-path=absolute/path/to/SourcetrailDB/examples/python_api_example/data/file.py
- Run cmake with
BUILD_EXAMPLES=ON
andBUILD_BINDINGS_PYTHON=ON
- Build target
_sourcetraildb
andpython_api_example
. - Open
python_api_example.srctrlprj
located in the build directory ofpython_api_example
with Sourcetrail and index the project.