It’s basically all in the title. My project ships with a
requirements.txt that lists a set of dependencies that need to be present to test the bindings to the C++ library I’m building.
I would like to be able to perform the following steps:
- Find a suitable version of Python3 with the standard FindPython3 module.
- Use the discovered Python interpreter to create a virtual environment. (Ideally only if it doesn’t already exist)
- Install the requirements.txt into that virtual environment.
- Re-run FindPython3 to point the imported targets Python3::Interpreter, Python3::Module, etc. to the virtual environment.
Is this possible? If not, is there something that’s equivalently convenient?