From 41b6b50d0913c60bb53e14ead036411c8db26876 Mon Sep 17 00:00:00 2001 From: Eric Liang Date: Thu, 22 Nov 2018 11:43:52 -0800 Subject: [PATCH] fix py3 (#3382) --- python/setup.py | 32 ++++++++++++++++++-------------- 1 file changed, 18 insertions(+), 14 deletions(-) diff --git a/python/setup.py b/python/setup.py index 0ad412e18..11c434b29 100644 --- a/python/setup.py +++ b/python/setup.py @@ -131,6 +131,23 @@ def find_version(*filepath): raise RuntimeError("Unable to find version string.") +requires = [ + "numpy", + "funcsigs", + "click", + "colorama", + "pytest", + "pyyaml", + "redis~=2.10.6", + "setproctitle", + # The six module is required by pyarrow. + "six >= 1.0.0", + "flatbuffers", +] + +if sys.version_info < (3, 0): + requires.append("faulthandler") + setup( name="ray", version=find_version("ray", "__init__.py"), @@ -144,20 +161,7 @@ setup( cmdclass={"build_ext": build_ext}, # The BinaryDistribution argument triggers build_ext. distclass=BinaryDistribution, - install_requires=[ - "numpy", - "funcsigs", - "click", - "colorama", - "pytest", - "pyyaml", - "redis~=2.10.6", - "faulthandler;python_version<'3'", - "setproctitle", - # The six module is required by pyarrow. - "six >= 1.0.0", - "flatbuffers" - ], + install_requires=requires, setup_requires=["cython >= 0.27, < 0.28"], extras_require=extras, entry_points={