wardi/speedometer — pull request #2 by AdmiralNemo (2012-12-18 01:19:01+00:00)
Title: NameError: name 'urwid' is not defined in setup.py

If *urwid* is not yet installed when running `setup.py`, the following exception is raised:

Traceback (most recent call last):
File "setup.py", line 25, in
import speedometer
File "/home/dustin/src/speedometer/speedometer.py", line 302, in
class GraphDisplay(urwid.WidgetWrap):
NameError: name 'urwid' is not defined

It is best not to rely on code being functional when `setup.py` is run. The `pkg_resources` module from setuptools provides an API for version discovery, which will do what you want in this case. I've made the necessary changes to `setup.py` and `speedometer.py` to fix this problem while still avoiding redundant version specifications.