From b9596336cedbe3b93d3ef8ec474fd9cf3493a55e Mon Sep 17 00:00:00 2001 From: Joe Ethier Date: Fri, 19 Jan 2018 14:43:03 -0800 Subject: [PATCH] Fix setup.py for systems with older setuptools. (#703) * User safer platform detection in setup.py dependency declaration. * Rev patch version number. --- setup.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/setup.py b/setup.py index b7b095586..5835de763 100644 --- a/setup.py +++ b/setup.py @@ -126,7 +126,6 @@ def run(self): INSTALL_REQUIRES = [ 'contextlib2>=0.5.1,<1.0', - 'enum34>=1.1.2,<2.0;python_version<"3.4"', 'future>=0.16.0', 'mutablerecords>=0.4.1,<2.0', 'oauth2client>=1.5.2,<2.0', @@ -136,6 +135,11 @@ def run(self): 'sockjs-tornado>=1.0.3,<2.0', 'tornado>=4.3,<5.0', ] +# Not all versions of setuptools support semicolon syntax for specifying +# platform-specific dependencies, so we do it the old school way. +if sys.version_info < (3,4): + INSTALL_REQUIRES.append('enum34>=1.1.2,<2.0') + class PyTestCommand(test): @@ -174,7 +178,7 @@ def run_tests(self): setup( name='openhtf', - version='1.2.0', + version='1.2.1', description='OpenHTF, the open hardware testing framework.', author='John Hawley', author_email='madsci@google.com',