Permalink
Browse files

attempting fix for arian

  • Loading branch information...
1 parent 601a84c commit e8fd6fd01af3b052f03c3e3495550690c75ebbab @anutron committed Jun 23, 2011
Showing with 22 additions and 0 deletions.
  1. +22 −0 django/setup.py
View
@@ -1,6 +1,28 @@
from setuptools import setup, find_packages
import os
+from setuptools.dist import Distribution
+import pkg_resources
+
+
+add_django_dependency = True
+# See issues #50, #57 and #58 for why this is necessary
+try:
+ pkg_resources.get_distribution('Django')
+ add_django_dependency = False
+except pkg_resources.DistributionNotFound:
+ try:
+ import django
+ if django.VERSION[0] >= 1 and django.VERSION[1] >= 1 and django.VERSION[2] >= 1:
+ add_django_dependency = False
+ except ImportError:
+ pass
+
+Distribution({
+ "setup_requires": add_django_dependency and ['Django >=1.1.1'] or []
+})
+
+
base = os.path.join(os.path.dirname(__file__), "src")
setup(

0 comments on commit e8fd6fd

Please sign in to comment.