DZone
Java Zone
Thanks for visiting DZone today,
Edit Profile
  • Manage Email Subscriptions
  • How to Post to DZone
  • Article Submission Guidelines
Sign Out View Profile
  • Post an Article
  • Manage My Drafts
Over 2 million developers have joined DZone.
Log In / Join
  • Refcardz
  • Trend Reports
  • Webinars
  • Zones
  • |
    • Agile
    • AI
    • Big Data
    • Cloud
    • Database
    • DevOps
    • Integration
    • IoT
    • Java
    • Microservices
    • Open Source
    • Performance
    • Security
    • Web Dev
DZone > Java Zone > An Isolated Install of Brubeck

An Isolated Install of Brubeck

A. Jesse Jiryu Davis user avatar by
A. Jesse Jiryu Davis
·
Jan. 16, 12 · Java Zone · Interview
Like (0)
Save
Tweet
3.35K Views

Join the DZone community and get the full member experience.

Join For Free

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/

Python (language) ZeroMQ Dependency Directory Framework Makefile

Opinions expressed by DZone contributors are their own.

Popular on DZone

  • How To Evaluate Software Quality Assurance Success: KPIs, SLAs, Release Cycles, and Costs
  • SQL GROUP BY and Functional Dependencies: a Very Useful Feature
  • Exhaustive JUNIT5 Testing with Combinations, Permutations, and Products
  • Understand Source Code — Deep Into the Codebase, Locally and in Production

Comments

Java Partner Resources

X

ABOUT US

  • About DZone
  • Send feedback
  • Careers
  • Sitemap

ADVERTISE

  • Advertise with DZone

CONTRIBUTE ON DZONE

  • Article Submission Guidelines
  • MVB Program
  • Become a Contributor
  • Visit the Writers' Zone

LEGAL

  • Terms of Service
  • Privacy Policy

CONTACT US

  • 600 Park Offices Drive
  • Suite 300
  • Durham, NC 27709
  • support@dzone.com
  • +1 (919) 678-0300

Let's be friends:

DZone.com is powered by 

AnswerHub logo