From 003cceed698ae17dcfb05181eae48b8a5b6d0fde Mon Sep 17 00:00:00 2001 From: debugtalk Date: Wed, 24 Apr 2019 16:14:49 +0800 Subject: [PATCH] fix: ImportError for builtins in Python2.7 --- setup.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/setup.py b/setup.py index 9e118d2b..b0c5dfa0 100644 --- a/setup.py +++ b/setup.py @@ -25,6 +25,11 @@ install_requires = [ "filetype" ] +# Python 2.x? +is_py2 = (sys.version_info[0] == 2) +if is_py2: + install_requires.append("future") + class UploadCommand(Command): """ Build and publish this package. Support setup.py upload. Copied from requests_html.