Skip to content
Snippets Groups Projects
Commit 4e3ccd35 authored by Alex Rubinsteyn's avatar Alex Rubinsteyn Committed by GitHub
Browse files

Merge pull request #73 from hammerlab/fix-setup-for-py3

only install futures for PY2
parents fd492b92 e443254b
No related merge requests found
__version__ = "0.0.8"
__version__ = "0.1.0"
......@@ -122,8 +122,19 @@ def run(argv=sys.argv[1:]):
parser.error(
"Specify either an input CSV file or both the "
"--alleles and --peptides arguments")
pairs = list(itertools.product(args.alleles, args.peptides))
# split user specified allele and peptide strings in case they
# contain multiple entries separated by commas
alleles = []
for allele_string in args.alleles:
alleles.extend([s.strip() for s in allele_string.split(",")])
peptides = []
for peptide in args.peptides:
peptides.extend(peptide.strip() for p in peptide.split(","))
for peptide in peptides:
if not peptide.isalpha():
raise ValueError(
"Unexpected character(s) in peptide '%s'" % peptide)
pairs = list(itertools.product(alleles, peptides))
df = pandas.DataFrame({
"allele": [p[0] for p in pairs],
"peptide": [p[1] for p in pairs],
......
......@@ -2,7 +2,7 @@ numpy>= 1.11
pandas>=0.13.1
appdirs
theano>=0.8.2
keras==1.1.0
keras==1.2.0
fancyimpute>=0.0.12
scikit-learn
h5py
......
......@@ -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.major == 2)
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.2.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'],
)
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment