title: Customise the virtualenv `activate` script
body: <p>What is the conventional way to customise the changes made by a Python virtualenv <code>bin/activate</code> script?</p>
  
  <p>The Python virtualenv is activated by <a href="https://virtualenv.pypa.io/en/stable/userguide/#activate" rel="noreferrer">a <code>$VENV/bin/activate</code> script</a>. This script works primarily by setting environment variables specific to the virtualenv.</p>
  
  <p>(This is different from the “bootstrap script” <a href="https://virtualenv.pypa.io/en/stable/reference/#creating-your-own-bootstrap-scripts" rel="noreferrer">discussed in the Virtualenv documentation</a>. Those are used once, when creating the virtualenv; they are not used when activating the virtualenv. This question is about the activate script.)</p>
  
  <p>Many of the code bases for which I use a Python virtualenv, need additional (custom) environment variables set, at the same time the virtualenv is activated.</p>
  
  <ul>
  <li><p>Edit the <code>$VENV/bin/activate</code> script directly, to add statements that set more environment variables?</p></li>
  <li><p>Write a custom wrapper script, that incidentally calls <code>$VENV/bin/activate</code>?</p></li>
  <li><p>Write a separate script with a specific name, that will be automatically called by the <code>$VENV/bin/activate</code> script? Does such a thing exist?</p></li>
  </ul>
  
  <p>Of course I could write a script with a different name, and instruct developers to run that instead. Or I could instruct them to install <code>virtualenvwrapper</code>. But that is not the if-you-got-the-virtualenv-working-then-this-works-too automation that I'm seeking.</p>
  
  <p>Instead, this question is asking how to hook into the <em>existing</em> convention, of activating the virtualenv with a known name <code>$VENV/bin/activate</code>.</p>