#!/usr/bin/env python

# add borg package(s) to the Python search path
import sys
import os.path
import plac

module_paths = [
    "borg/build/lib",
    "cargo/build/lib",
    ]
here = os.path.abspath(os.path.dirname(__file__))

for path in module_paths:
    sys.path.insert(0, os.path.join(here, path))

# configure paths to resources
import borg

borg.defaults.solvers_root = os.path.join(here, "solvers")

# launch the calibration tool
if __name__ == "__main__":
    from borg.tools.calibrate import main

    plac.call(main)

