govtrack / boundaries_us

ARCHIVE. A full Django deployment for represent-boundaries and represent-maps with definitions for U.S.-specific data files
http://gis.govtrack.us/map/demo/cd-2012/
22 stars 7 forks source link

Virtual environment setup #4

Open brad opened 11 years ago

brad commented 11 years ago

Have you considered setting this up with a virtual environment? I got it working with these simple steps:

## After activating the virtual environment
$ pip install "django>=1.5,<=1.6" django-appconf django-jsonfield south pil psycopg2
## Note that installing psycopg2 via pip removes an apt-get dependancy

## Now install pycairo to the virtualenv
$ curl http://cairographics.org/releases/py2cairo-1.10.0.tar.bz2 | tar jxv
$ ./waf --prefix=$VIRTUALENV configure
$ ./waf build
$ ./waf install

Personally, I like to keep all the python dependancies in the virtual environment to avoid clashing with any other projects I'm working on. Also, this reduces the number of Ubuntu-specific dependencies slightly.

JoshData commented 11 years ago

Sure, I'd be happy to include alternate virtualenv-style build instructions. And I didn't know where to get py2cairo, so I appreciate that you dug up those instructions. What's 'waf' by the way?

brad commented 11 years ago

I actually have no clue what 'waf' is, but I found the instructions here and pycairo is here. Actually, revisiting that stackoverflow page, I noticed the answer that points out the project "cairocffi", which is pip installable and API compatible with pycairo. You may want to try that.

JoshData commented 11 years ago

Huh, cool. Thanks. I'll update the README with these pointers.