Skip to content

Commit

Permalink
Make pillow a requirement only if PIL is missing.
Browse files Browse the repository at this point in the history
Signed-off-by: Martin Raspaud <martin.raspaud@smhi.se>
  • Loading branch information
mraspaud committed Feb 26, 2014
1 parent 8317d35 commit 769fe61
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,13 @@
BASE_PATH = os.path.sep.join(os.path.dirname(
os.path.realpath(__file__)).split(os.path.sep))

requires = ['numpy >=1.4.1', 'pyresample']

try:
from PIL import Image
except ImportError:
requires.append("pillow")

NAME = 'mpop'

setup(name=NAME,
Expand Down Expand Up @@ -73,7 +80,7 @@
os.path.join('doc', 'examples', 'polar_aapp1b.py'),
os.path.join('doc', 'examples', 'polar_segments.py')])],
zip_safe=False,
install_requires=['numpy >=1.4.1', 'pyresample', 'pillow'],
install_requires=requires,
extras_require={ 'xRIT': ['mipp >= 0.6.0'],
'hdf_eos': ['pyhdf'],
'viirs': ['h5py']}
Expand Down

0 comments on commit 769fe61

Please sign in to comment.