Is it a good idea to deploy self-made python modules into working environment by virtualenv?
<p>Lately I was working on changing the deployment of our in-house python modules. Those modules are for in-house usage only. Our previous deployment is to put all modules into somewhere (ex, <strong>/gozilla/pylib</strong>) and set the global environment variable, <strong>PYTHONPATH</strong> point to it. </p>

<p>I am wondering if it is a good idea to make use of <strong>virtualenv</strong> for this kind of deployment? Or some other alternative ways to do that, especially making use of <strong>setup.py</strong> mechanism with possibility to do auto unit-test, doc-gen, ...?</p>

<p><strong>Update</strong></p>

<p>For making use of <strong>PYTHONPATH</strong>, it works well except that we have to do our own copy-n-paste for deployment and there is no any support for unit-test, doc-gen, module-dependency...</p>

<p>For making use of <strong>virtualenv</strong> as deployment tool, other (stand-alone) python scripts are asked to enter <strong>virtual env mode by source ...bin/activate</strong> or by manually invoke <strong>execfile(activate_this, dict(_<em>file</em>_=activate_this))</strong> in the very beginning of their own script. Is it possible to prevent this kind of <strong>manually entering virtualenv mode by execfile</strong> for each Python scripts?</p>

<p>That's what I get right now ;) and I am looking for other suggested ways to do that.</p>
