Python advice requested:

I need to include a small test program, written in Python, in a repository containing other software not in Python. The program will have multiple source files and use dependencies from PyPI, but does not need to be installed anywhere. The expected usage is to just run it directly from the directory where it lives.

Is there a suitable tool to use to run it which will create a temporary virtual environment, install the dependencies, run the program, and then clean that stuff up?

#Python

@kevin maybe you could look at mise-en-place https://mise.jdx.dev/ it helps with automating such tasks as well as automating everything needed for a repository.

We use it to setup venvs if they don'T exist, update dependencies, in one project we even use it to call on tofu to build Infrastructure for testing.

Home | mise-en-place

mise-en-place documentation

mise-en-place