Comment 4 for bug 803186

Revision history for this message
Brian Lamar (blamar) wrote :

For those curious, setup.py/distutils provides the "develop" command which allows for installation of python projects into local/user-specific/project-specific site-packages directories. For example, on most Linux distributions it's as easy as:

$ python setup.py develop --user

This will install Nova in to /home/<user>/.local/lib/python2.x/site-packages. From there on out you'll be able to run bin/nova-api with the sys.path modifications removed.

For those without the "--user" flag (OSX and maybe older version of Python?), the documented way to use setup.py for development is to create a distutils.cfg file as described here: http://docs.python.org/install/index.html#location-and-names-of-config-files, then run:

$ python setup.py develop

...in the desired branch.

If your distutils.cfg file looks like this:

[develop]
prefix=/home/<user>/.local

then you'll get the same results.

I can't be the only one that things modifications to sys.path are sub-optimal, but I do have the bias of being rooted in my ways :)