summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMark Adams <mark@markadams.me>2015-10-07 07:48:01 -0500
committerMark Adams <madams@atlassian.com>2015-10-09 14:10:14 -0500
commitb8cc504ee09b4f6b2ba83a3db95206b305fe136c (patch)
tree58a7532bdcefac9ae54e9be5083875d539038b73
parent89a82790fabf0f5e555bd1226d8507820e41b092 (diff)
downloadpyjwt-b8cc504ee09b4f6b2ba83a3db95206b305fe136c.tar.gz
Made pytest-runner installation in setup.py conditional. Fixes #179
Based on instructions on pytest-runner: https://bitbucket.org/pytest-dev/pytest-runner
-rwxr-xr-xsetup.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/setup.py b/setup.py
index 452e4e5..e041a25 100755
--- a/setup.py
+++ b/setup.py
@@ -35,6 +35,9 @@ tests_require = [
'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 @@ setup(
'Topic :: Utilities',
],
test_suite='tests',
- setup_requires=['pytest-runner'],
+ setup_requires=pytest_runner,
tests_require=tests_require,
extras_require=dict(
test=tests_require,