I have a codebase that includes some C++ code and Python scripts that make use of the resulting binaries (via the subprocess module).
root/
experiments/
script_1.py (needs to call binary_1)
clis/
binary_1.cc
binary_1
What's the best way to refer to the binary from the Python scripts?
$PATH
variable, or copied the binary to /usr/local/bin
, or somethingIf your binaries are pre-compiled you can use the data_files parameter to setuptools. Have it installed in /usr/local/bin.
data_files=[("/usr/local/bin", glob("bin/*"))], ...