Skip to content

Commit

Permalink
Update setup.py
Browse files Browse the repository at this point in the history
Fix for pytorch#516
  • Loading branch information
Robin-des-Bois authored May 26, 2018
1 parent f27ecce commit 030ff67
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
import re
import shutil
import sys
import platform
from setuptools import setup, find_packages


Expand All @@ -23,14 +24,19 @@ def find_version(*file_paths):
return version_match.group(1)
raise RuntimeError("Unable to find version string.")

def pillow_requirement():
if platform.system() == 'Darwin':
return 'pillow >= 4.1.1, != 5.1'
else:
return 'pillow >= 4.1.1'

readme = open('README.rst').read()

VERSION = find_version('torchvision', '__init__.py')

requirements = [
'numpy',
'pillow >= 4.1.1',
pillow_requirement(),
'six',
'torch',
'tqdm'
Expand Down

0 comments on commit 030ff67

Please sign in to comment.