Adding more polish

This commit is contained in:
Anne Gentle
2010-11-23 12:58:08 -06:00
parent 91b1cd7180
commit a0a830fa68

View File

@@ -23,7 +23,7 @@ This page describes how to setup a working Python development environment that c
Linux Systems Linux Systems
------------- -------------
'' At present, this section is tested for Nova on Ubuntu 10.10-64. Feel free to add notes and change according to your experiences or operating system.'' Note: This section is tested for Nova on Ubuntu 10.10-64. Feel free to add notes and change according to your experiences or operating system.
Bring down the Nova source with bzr, then: Bring down the Nova source with bzr, then:
:: ::
@@ -34,32 +34,30 @@ Bring down the Nova source with bzr, then:
python tools/install_venv.py python tools/install_venv.py
If all goes well, you should get a message something like this: If all goes well, you should get a message something like this:
::
::
Nova development environment setup is complete. Nova development environment setup is complete.
Nova development uses virtualenv to track and manage Python dependencies while in development and testing. Nova development uses virtualenv to track and manage Python dependencies while in development and testing. Virtual env gives you an independent Python environment.
To activate the Nova virtualenv for the extent of your current shell session To activate the Nova virtualenv for the extent of your current shell session
you can run: you can run::
::
$ source .nova-venv/bin/activate $ source .nova-venv/bin/activate
Or, if you prefer, you can run commands in the virtualenv on a case by case Or, if you prefer, you can run commands in the virtualenv on a case by case
basis by running: basis by running::
::
$ tools/with_venv.sh <your command> $ tools/with_venv.sh <your command>
Also, make test will automatically use the virtualenv. Also, make test will automatically use the virtualenv.
If you don't want to create a virtualenv every time you branch (which takes a while as long as we have the large Twisted project as a dependency) you can reuse a single virtualenv for all branches. If you don't want to create a virtualenv every time you branch (which takes a while as long as we have the large Twisted project as a dependency) you can reuse a single virtualenv for all branches.
1. If you don't have a nova/ directory containing trunk/ and other branches, do so now. #. If you don't have a nova/ directory containing trunk/ and other branches, do so now.
2. Go into nova/trunk and install a virtualenv. #. Go into nova/trunk and install a virtualenv.
3. Move it up a level: mv nova/trunk/.nova-venv nova/.nova-venv #. Move it up a level: mv nova/trunk/.nova-venv nova/.nova-venv.
4. Symlink the ../nova/.nova-venv directory from your branch #. Symlink the ../nova/.nova-venv directory from your branch::
::
~/openstack/nova/my_branch$ ln -s ../.nova-venv .nova-venv ~/openstack/nova/my_branch$ ln -s ../.nova-venv .nova-venv
This works with run_tests.sh and nosetests -w nova/tests/api This works with run_tests.sh and nosetests -w nova/tests/api
@@ -67,14 +65,13 @@ This works with run_tests.sh and nosetests -w nova/tests/api
MacOSX Systems MacOSX Systems
-------------- --------------
First, install Virtual Env, which creates an isolated "standalone" Python environment. First, install Virtual Env, which creates an isolated "standalone" Python environment.::
::
sudo easy_install virtualenv sudo easy_install virtualenv
Initial Code Setup: Here's how to setup the code initially::
::
bzr branch lp:nova bzr branch lp:nova
cd nova cd nova
python tools/install_venv.py python tools/install_venv.py
@@ -84,17 +81,17 @@ Initial Code Setup:
If you have installed OpenSSL 1.0.0a on MacOS, which can happen when installing a MacPorts package for OpenSSL, you will see an error when running nova.tests.auth_unittest.AuthTestCase.test_209_can_generate_x509. The version that functions correctly is OpenSSL 0.9.8l 5, installed with MacOS 10.6 as a base element. If you have installed OpenSSL 1.0.0a on MacOS, which can happen when installing a MacPorts package for OpenSSL, you will see an error when running nova.tests.auth_unittest.AuthTestCase.test_209_can_generate_x509. The version that functions correctly is OpenSSL 0.9.8l 5, installed with MacOS 10.6 as a base element.
:: Here's how to get the latest code::
cd nova cd nova
bzr pull # get the latest stuff... bzr pull # get the latest stuff...
source .nova_venv/bin/activate source .nova_venv/bin/activate
./run_tests.sh ./run_tests.sh
#... do cleaning work or hack hack hack with a branched named cleaning And then you can do cleaning work or hack hack hack with a branched named cleaning::
bzr push lp:~launchpaduserid/nova/cleaning bzr push lp:~launchpaduserid/nova/cleaning
To submit the merge/patch that you hacked upon:
To submit the merge/patch: * Navigate to https://code.launchpad.net/~launchpaduserid/nova/cleaning.
* navigate to https://code.launchpad.net/~launchpaduserid/nova/cleaning * Click on the link "Propose for merging".
* click on the link "Propose for merging"