mozilla/django-browserid — Issue #31: pip install fails after commit 05cb0564152ed613715c3cffbe08dec8fbe8334f
Author: garzola
Created: 2012-02-07 08:16:50+00:00
State: open

In commit 05cb0564152ed613715c3cffbe08dec8fbe8334f, it looks like two lines were added to django_browserid/__init__.py:

from django_browserid.auth import BrowserIDBackend
from django_browserid.base import get_audience, verify

Because of these two lines both of the following fail:

pip install git+git://github.com/mozilla/django-browserid.git#egg=django_browserid

mkdir t
cd t
git clone git://github.com/mozilla/django-browserid.git
cd django-browserid
python setup.py install

In both cases, I get the following error message:
ImportError: Settings cannot be imported, because environment variable DJANGO_SETTINGS_MODULE is undefined.

setup.py imports django_browserid/__init__.py to get the version number, but at setup time, the django environment is not available. These two imports should be removed from __init__.py or it should not be imported into the setup.py.