Over a million developers have joined DZone.
{{announcement.body}}
{{announcement.title}}

An Isolated Install of Brubeck

DZone's Guide to

An Isolated Install of Brubeck

· Java Zone
Free Resource

Managing a MongoDB deployment? Take a load off and live migrate to MongoDB Atlas, the official automated service, with little to no downtime.

I wanted to install James Dennis’s Brubeck web framework, but lately I’ve become fanatical about installing nothing, nothing, in the system-wide directories. A simple rm -rf brubeck/ should make it like nothing ever happened.

So that I remember this for next time, here’s how I did an isolated install of Brubeck and all its dependencies on Mac OS Lion.

Install virtualenv and virtualenvwrapper (but of course you’ve already done this, because you’re elite like me).

Make a virtualenv

mkvirtualenv brubeck; cdvirtualenv

ZeroMQ

wget http://download.zeromq.org/historic/zeromq-2.1.9.tar.gz
tar zxf zeromq-2.1.9.tar.gz
cd zeromq-2.1.9
./autogen.sh
./configure --prefix=.. # Don't install system-wide, just in your virtualenv's directory
make
cd ..

Mongrel2

git clone https://github.com/zedshaw/mongrel2.git
cd mongrel2
emacs Makefile

Add a line like this to the top of the Makefile, so the compiler can find where you’ve installed ZeroMQ’s header and lib files:

OPTFLAGS += -I/Users/emptysquare/.virtualenvs/brubeck/include -L/Users/emptysquare/.virtualenvs/brubeck/lib

and replace PREFIX?=/usr/local with something like: PREFIX?=/Users/emptysquare/.virtualenvs/brubeck

(If you can get this to work with relative instead of absolute paths, please tell me in the comments!)

make
make install
cd ..

Python Packages

Now we need our isolated include/ and lib/ directories available on the path when we install Brubeck’s Python package dependencies. Specifically, the gevent_zeromq package has some C code that needs to find zmq.h and libzmq in order to compile. We’ll do that by setting the LIBRARY_PATH and C_INCLUDE_PATH environment variables:

cd brubeck
export LIBRARY_PATH=/Users/emptysquare/.virtualenvs/brubeck/lib
export C_INCLUDE_PATH=/Users/emptysquare/.virtualenvs/brubeck/include
pip install -I -r ./envs/brubeck.reqs
pip install -I -r ./envs/gevent.reqs

How nice is that?

Brubeck

git clone https://github.com/j2labs/brubeck.git
cd brubeck

I plan to do a little hacking on Brubeck itself soon, so rather than running python setup.py install here, I’m simply including my copy of Brubeck’s source code on my PYTHONPATH.

Next

Once you’re here, you have a completely isolated install of ZeroMQ, Mongrel2, Brubeck, and all its package dependencies. Continue with James’s Brubeck installation instructions at the “A Demo” portion.


Source: emptysquare.net/blog/how-to-do-an-isolated-install-of-brubeck/

MongoDB Atlas is the easiest way to run the fastest-growing database for modern applications — no installation, setup, or configuration required. Easily live migrate an existing workload or start with 512MB of storage for free.

Topics:

Opinions expressed by DZone contributors are their own.

THE DZONE NEWSLETTER

Dev Resources & Solutions Straight to Your Inbox

Thanks for subscribing!

Awesome! Check your inbox to verify your email so you can start receiving the latest in tech news and resources.

X

{{ parent.title || parent.header.title}}

{{ parent.tldr }}

{{ parent.urlSource.name }}