Permalink
Browse files

attempting fix for arian

  • Loading branch information...
1 parent c5ad2cb commit 2ceabd8af0e5262cd0bc7005bec2481637fadba5 @anutron committed Jun 23, 2011
Showing with 22 additions and 0 deletions.
  1. +22 −0 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__), "frontend_dev")
setup(

0 comments on commit 2ceabd8

Please sign in to comment.