|
|
| (5 intermediate revisions by 3 users not shown) |
| Line 1: |
Line 1: |
| If you are looking to setup a buildbot master in a virtualenv, this page will have more accurate information [[https://wiki.mozilla.org/ReleaseEngineering/Master_Setup]]
| |
|
| |
|
| = Initial Setup =
| |
| <pre>
| |
| mkdir $HOME/venv
| |
| cd $HOME/venv
| |
| wget http://pypi.python.org/packages/source/v/virtualenv/virtualenv-1.5.1.tar.gz#md5=3daa1f449d5d2ee03099484cecb1c2b7
| |
| tar zxf virtualenv-1.5.1.tar.gz
| |
| virtualenv-1.5.1/virtualenv.py $HOME/venv
| |
| $HOME/venv/bin/pip install virtualenvwrapper
| |
| </pre>
| |
|
| |
| then add these lines to your ~/.bashrc or ~/.zshrc
| |
|
| |
| <pre>
| |
| export WORKON_HOME=$HOME/.virtualenvs
| |
| VIRTUALENVWRAPPER_PYTHON=$HOME/venv/bin/python
| |
| source $HOME/venv/bin/virtualenvwrapper.sh
| |
| </pre>
| |
|
| |
| = Using virtual environments =
| |
| To create a new virtual environment, use 'mkvirtualenv', e.g.
| |
| mkvirtualenv buildapi
| |
|
| |
| This will create and activate a new virtual environment where you can install new packages, e.g.
| |
| pip install mysql-python
| |
|
| |
| To switch between virtual environments, use the 'workon' command, e.g.
| |
| workon buildbot-0.7
| |
|
| |
| All of the heavy lifting here is done by [http://www.doughellmann.com/docs/virtualenvwrapper/ virutalenvwrapper]
| |