From c116016a59799f7d56e6af1151d685117ea1df24 Mon Sep 17 00:00:00 2001
From: Alex Rubinsteyn <alex.rubinsteyn@gmail.com>
Date: Mon, 9 Jan 2017 14:09:00 -0500
Subject: [PATCH] only install futures for PY2

---
 mhcflurry/package_metadata.py |  2 +-
 setup.py                      | 40 ++++++++++++++++++++++-------------
 2 files changed, 26 insertions(+), 16 deletions(-)

diff --git a/mhcflurry/package_metadata.py b/mhcflurry/package_metadata.py
index 559a6d7a..36e61c64 100644
--- a/mhcflurry/package_metadata.py
+++ b/mhcflurry/package_metadata.py
@@ -1,2 +1,2 @@
 
-__version__ = "0.0.8"
+__version__ = "0.1.0"
diff --git a/setup.py b/setup.py
index 07adad40..1571028c 100644
--- a/setup.py
+++ b/setup.py
@@ -15,9 +15,14 @@
 import os
 import logging
 import re
+import sys
 
 from setuptools import setup
 
+# normally we would import six.PY2 but can't yet assume that six
+# is installed here
+PY2 = sys.version_info < (3, 0)
+
 readme_dir = os.path.dirname(__file__)
 readme_filename = os.path.join(readme_dir, 'README.md')
 
@@ -43,6 +48,25 @@ with open('mhcflurry/package_metadata.py', 'r') as f:
         re.MULTILINE).group(1)
 
 if __name__ == '__main__':
+    required_packages = [
+        'numpy>=1.11',
+        'pandas>=0.13.1',
+        'appdirs',
+        'theano>=0.8.2',
+        'keras==1.1.0',
+        'fancyimpute>=0.0.12',
+        'scikit-learn',
+        'h5py',
+        'typechecks',
+        'pepdata',
+        'bottle',
+        'six',
+    ]
+    if PY2:
+        # concurrent.futures is a standard library in Py3 but Py2
+        # requires this backport
+        required_packages.append('futures')
+
     setup(
         name='mhcflurry',
         version=version,
@@ -71,21 +95,7 @@ if __name__ == '__main__':
         package_data={
             'mhcflurry': ['downloads.yml'],
         },
-        install_requires=[
-            'numpy>=1.11',
-            'pandas>=0.13.1',
-            'appdirs',
-            'theano>=0.8.2',
-            'keras==1.1.0',
-            'fancyimpute>=0.0.12',
-            'scikit-learn',
-            'h5py',
-            'typechecks',
-            'pepdata',
-            'futures',
-            'bottle',
-            'six',
-        ],
+        install_requires=required_packages,
         long_description=readme,
         packages=['mhcflurry', 'mhcflurry.class1_allele_specific'],
     )
-- 
GitLab