As I said, this is not being done as a build step. This is what I want to happen at runtime, as it’s the user that will provide the .py file (for example).
Thanks for the help though, ended up digging through the test suites of pip to stumble upon this.