Is there a way for a Python script running with Pa...
# general
a
Is there a way for a Python script running with Pants to access a package's CLI tools? For example, the
clang-format
package installs
clang-format
in the environment's
bin
folder, but does not have a useful Python module of its own to import. Is this executable available somewhere in the sandbox?
h
https://pypi.org/project/conscript/ might enable this capability
e
This is what you mean I think and IIUC that's only available on main / 2.19.x: https://github.com/pantsbuild/pants/pull/19315
a
neat, thank you both. I'm not familiar with
VenvPexRequest
under the hood; would this be available from a
pants run
command? Where would I find the executable in the sandbox?
e
@ancient-terabyte-9085 the PR I referenced makes all the venv
bin/
scripts available on the `PATH`; so you can use the
subprocess
module (for example) to execute such a script by name without knowing its exact path
a
great, thanks!