[issue37349] venv.EnvBuilder environmental variable hooks

Vinay Sajip report at bugs.python.org
Thu Jun 20 17:53:32 EDT 2019


Vinay Sajip <vinay_sajip at yahoo.co.uk> added the comment:

> Is there an architecture that would be less objectionable?

One thing I would consider is the ability to configure a custom_script_path in the same way as other parameters are now. It would be used as follows: If not None, it should specify a directory, and the files in there would be copied to the target venv *after* the standard scripts are copied (possibly overwriting ones already there, such as "activate"), with the same variable substitutions that are currently done.

This approach allows for other things than just custom environment variable setting, and so it seems a more generic solution to the issue of customisability. While it involves the developers who require such functionality to maintain those scripts, it seems fair to place the onus on them, and not on stdlib maintainers.

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue37349>
_______________________________________


More information about the Python-bugs-list mailing list