4 ms·
I'm not very familiar with Ruby, but I know there are some similar pain-points wrt packages/dependencies and maintaining "pristine" (aka "actually working") pro
by e12e 14y ago
I'm not very familiar with Ruby, but I know there are some similar pain-points wrt packages/dependencies and maintaining "pristine" (aka "actually working") project trees (it's not specific to python/ruby either - hence package managers like apt/yum, build tools like apache maven etc).
What I usually do, is I have a system python for packages managed with
apt (There are a lot of these, try):
aptitude search '?and(?depends(python),?installed)'
- and a system installed virtualenv.
I then have a local python virtulalenv for installing misc packages (eg: a more recent mercurial than the one distributed in apt on older Debian distros):
virtualenv ~/opt/python-misc
ln -s ~/opt/python-misc/bin ~/pybin
# In .bashrc:
if [ -d "~/opt/pybin" ] then PATH="~/opt/pybin:${PATH}" fi; export PATH
Note my "local" python virtualenv is before system in path, so any casual pip install "shiny-package-that-migh-break-system" just (at worst) means I have to recreate the virtualenv (or pip uninstall it).
But for projects -- I highly recommend looking at buildout. A nice summary I stumbled across here:
http://www.marmelune.net/en/python/buildout/from-virtualenv-to-buildout/ http://www.marmelune.net/en/python/buildout/from-virtualenv-...
edit: formatting