diff --git a/setup.py b/setup.py index f3c465db..40a3aa05 100755 --- a/setup.py +++ b/setup.py @@ -1,10 +1,28 @@ #!/usr/bin/env python from setuptools import find_packages, setup +import os +import sys import versioneer README = open('README.rst', 'r').read() +install_requires = [ + 'configparser; python_version<"3.0"', + 'future>=0.14.0; python_version<"3"', + 'backports.functools_lru_cache; python_version<"3.2"', + 'jedi>=0.17.0,<0.18.0', + 'python-jsonrpc-server>=0.3.3', + 'pluggy', +] + +if sys.version_info[0] == 2: + if os.name != 'nt': + install_requires.append('ujson<=1.35') +else: + install_requires.append('ujson>=2') + + setup( name='python-language-server', @@ -31,15 +49,7 @@ # your project is installed. For an analysis of "install_requires" vs pip's # requirements files see: # https://packaging.python.org/en/latest/requirements.html - install_requires=[ - 'configparser; python_version<"3.0"', - 'future>=0.14.0; python_version<"3"', - 'backports.functools_lru_cache; python_version<"3.2"', - 'jedi>=0.17.0,<0.18.0', - 'python-jsonrpc-server>=0.3.2', - 'pluggy', - 'ujson<=1.35; platform_system!="Windows"' - ], + install_requires=install_requires, # List additional groups of dependencies here (e.g. development # dependencies). You can install these using the following syntax,