Issue #12 resolved

Installation fails with Django 1.5 alpha 1

marnold avatarmarnold created an issue

With Django 1.5 (first alpha release) running python setup.py fails with the following exception:

Traceback (most recent call last):
  File "setup.py", line 2, in <module>
    from timedelta import __version__
  File "/Users/lwarx/play/beefarm/django-timedeltafield-0.6.7/timedelta/__init__.py", line 6, in <module>
    from fields import TimedeltaField
  File "/Users/lwarx/play/beefarm/django-timedeltafield-0.6.7/timedelta/fields.py", line 1, in <module>
    from django.db import models
  File "/Users/lwarx/.virtualenvs/beefarm/lib/python2.7/site-packages/django/db/__init__.py", line 11, in <module>
    if DEFAULT_DB_ALIAS not in settings.DATABASES:
  File "/Users/lwarx/.virtualenvs/beefarm/lib/python2.7/site-packages/django/conf/__init__.py", line 51, in __getattr__
    self._setup(name)
  File "/Users/lwarx/.virtualenvs/beefarm/lib/python2.7/site-packages/django/conf/__init__.py", line 44, in _setup
    % (desc, ENVIRONMENT_VARIABLE))
django.core.exceptions.ImproperlyConfigured: Requested setting DATABASES, but settings are not configured. You must either define the environment variable DJANGO_SETTINGS_MODULE or call settings.configure() before accessing settings.

Maybe this is a Django issue, but it looks like there are some unnecessary imports in setup.py which trigger django settings validation.

This affects automatic installation via pip/virtualenv.

Comments (7)

  1. Log in to comment
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.