From bd5e0d2d6decbd086afada32c62446b842225630 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C5=82awek=20Ehlert?= Date: Mon, 20 Oct 2014 16:41:29 +0200 Subject: [PATCH] fix Pillow dependency --- setup.py | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/setup.py b/setup.py index 963c7da8..f4f74fe7 100644 --- a/setup.py +++ b/setup.py @@ -1,6 +1,10 @@ #!/usr/bin/env python -from distutils.core import setup +try: + from setuptools import setup +except ImportError: + from distutils.core import setup + import pkg_resources import sys @@ -19,10 +23,10 @@ def is_installed(name): requires = ['ModestMaps >=1.3.0','simplejson', 'Werkzeug'] # Soft dependency on PIL or Pillow -if is_installed('Pillow') or sys.platform == 'win32': - requires.append('Pillow') -else: +if is_installed('PIL'): requires.append('PIL') +else: + requires.append('Pillow') setup(name='TileStache',