From b8cc504ee09b4f6b2ba83a3db95206b305fe136c Mon Sep 17 00:00:00 2001 From: Mark Adams Date: Wed, 7 Oct 2015 07:48:01 -0500 Subject: [PATCH] Made pytest-runner installation in setup.py conditional. Fixes #179 Based on instructions on pytest-runner: https://bitbucket.org/pytest-dev/pytest-runner --- setup.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/setup.py b/setup.py index 452e4e54..e041a252 100755 --- a/setup.py +++ b/setup.py @@ -35,6 +35,9 @@ def get_version(package): 'pytest-runner', ] +needs_pytest = set(('pytest', 'test', 'ptr')).intersection(sys.argv) +pytest_runner = ['pytest-runner'] if needs_pytest else [] + setup( name='PyJWT', version=version, @@ -61,7 +64,7 @@ def get_version(package): 'Topic :: Utilities', ], test_suite='tests', - setup_requires=['pytest-runner'], + setup_requires=pytest_runner, tests_require=tests_require, extras_require=dict( test=tests_require,