From 1bd9e8413781546254a3e1ce2a571ef08ebbebc8 Mon Sep 17 00:00:00 2001 From: Michael Penkov Date: Thu, 30 May 2019 18:13:31 +0900 Subject: [PATCH] pin sklearn and tornado versions for Py2 (#2510) * pin sklearn version for Py2 * pin tornado version --- setup.py | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/setup.py b/setup.py index a2249edf5b..4d736f4e73 100644 --- a/setup.py +++ b/setup.py @@ -230,12 +230,22 @@ def finalize_options(self): 'cython', 'pyemd', 'testfixtures', - 'scikit-learn', 'Morfessor==2.0.2a4', 'python-Levenshtein >= 0.10.2', 'visdom >= 0.1.8, != 0.1.8.7', ] +if sys.version_info[:2] == (2, 7): + # + # 0.20.3 is the last version of scikit-learn that supports Py2. + # Similarly, for version 5.1.1 of tornado. We require tornado indirectly + # via visdom. + # + win_testenv.append('scikit-learn==0.20.3') + win_testenv.append('tornado==5.1.1') +else: + win_testenv.append('scikit-learn') + linux_testenv = win_testenv[:] if sys.version_info < (3, 7):