[issue37349] venv.EnvBuilder environmental variable hooks

Caleb Donovick report at bugs.python.org
Thu Jun 20 18:09:43 EDT 2019


Caleb Donovick <donovick at cs.stanford.edu> added the comment:

I have another idea, instead of baking in the semantics of the environmental variables, we could simply add the hooks __VENV_ACTIVATE_EXTRAS__ and __VENV_DEACTIVATE_EXTRAS__ to activate. By default they would be replaced by '', but would allow subclasses to extend the behavior of activate / deactivate arbitrarily. 

> 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.

I'll take a stab at implementing this if the above proposal is not acceptable.

----------

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


More information about the Python-bugs-list mailing list