- CMake
- C++ Compiler
- Python
- SWIG
- Run cmake with
BUILD_BINDINGS_PYTHON=ON - Build target
_sourcetraildb - Copy two files from the
bindings_pythonbuild directory intoSourcetrailDB/examples/python_api_example/src:sourcetraildb.py- Windows:
_sourcetraildb.pyd - Linux:
_sourcetraildb.so - macOS:
_sourcetraildb.dyliband rename to_sourcetraildb.so
- Run example from the directory
SourcetrailDB/examples/python_api_example/srcwith:
$ 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=ONandBUILD_BINDINGS_PYTHON=ON - Build target
_sourcetraildbandpython_api_example. - Open
python_api_example.srctrlprjlocated in the build directory ofpython_api_examplewith Sourcetrail and index the project.