Chris's Wiki :: blog/python/EverythingModuleProblem Commentshttps://utcc.utoronto.ca/~cks/space/blog/python/EverythingModuleProblem?atomcommentsDWiki2013-04-06T22:51:50ZRecent comments in Chris's Wiki :: blog/python/EverythingModuleProblem.From 108.44.40.236 on /blog/python/EverythingModuleProblemtag:CSpace:blog/python/EverythingModuleProblem:16bcd8c7e4579c64f7974e7c2d98626478e509eeFrom 108.44.40.236<div class="wikitext"><p>You should be using 'virtualenv' to manage multiple python projects.</p>
<p>'virtualenvwrapper' makes things even easier.</p>
<pre>
mkvirtualenv fred-1
cd ~/src/fred-1
python setup.py develop
mkvirtualenv fred-2
cd ~/src/fred-2
python setup.py develop
</pre>
<p>...later..</p>
<pre>
workon fred-1
</pre>
<p>or</p>
<pre>
workon fred-2
</pre>
<p>- Justin</p>
</div>2013-04-06T22:51:50ZFrom 87.79.78.105 on /blog/python/EverythingModuleProblemtag:CSpace:blog/python/EverythingModuleProblem:813593ef3bf670f7c2de0bbfe1a44fcc4504553aFrom 87.79.78.105<div class="wikitext"><p>By the custom in Perl you would have <code>src/fred-1/lib/fred</code> and <code>src/fred-2/lib/fred</code>.</p>
<p>This solves the feels-wrong issue too, because <code>lib</code> <em>is</em> a (sub)directory of modules, so you would be perfectly justified to tell Python that it is.</p>
<p>This also means you have a natural place for other things (e.g. <code>src/fred-1/bin</code>) which you may want to include with the package.</p>
<p>(Though I admit I wonder why you <em>do</em> have <code>fred-1</code> and <code>fred-2</code> rather than branches in your VCS.)</p>
<p>—<a href="http://plasmasturm.org/">Aristotle Pagaltzis</a></p>
</div>2013-03-23T13:21:41Z