Skip to content

Commit

Permalink
Fix setup
Browse files Browse the repository at this point in the history
  • Loading branch information
areski committed Aug 9, 2011
1 parent 5a99769 commit 6bf67be
Showing 1 changed file with 23 additions and 1 deletion.
24 changes: 23 additions & 1 deletion setup.py
Original file line number Diff line number Diff line change
@@ -1,9 +1,31 @@
from setuptools import setup
import os
from setuptools import setup, find_packages
from setuptools.dist import Distribution
import pkg_resources
import sys
import re
from newfies import VERSION


add_django_dependency = True
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] >= 2 and django.VERSION[2] >= 0:
add_django_dependency = False
except ImportError:
pass

Distribution({
"setup_requires": add_django_dependency and ['Django >=1.2.0'] or []
})




# Compile the list of packages available, because distutils doesn't have
# an easy way to do this.
packages, data_files, temp_data_files, addons_data_files = [], [], [], []
Expand Down

0 comments on commit 6bf67be

Please sign in to comment.