Skip to content

Commit b8cc504

Browse files
committed
Made pytest-runner installation in setup.py conditional. Fixes jpadilla#179
Based on instructions on pytest-runner: https://bitbucket.org/pytest-dev/pytest-runner
1 parent 89a8279 commit b8cc504

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

setup.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,9 @@ def get_version(package):
3535
'pytest-runner',
3636
]
3737

38+
needs_pytest = set(('pytest', 'test', 'ptr')).intersection(sys.argv)
39+
pytest_runner = ['pytest-runner'] if needs_pytest else []
40+
3841
setup(
3942
name='PyJWT',
4043
version=version,
@@ -61,7 +64,7 @@ def get_version(package):
6164
'Topic :: Utilities',
6265
],
6366
test_suite='tests',
64-
setup_requires=['pytest-runner'],
67+
setup_requires=pytest_runner,
6568
tests_require=tests_require,
6669
extras_require=dict(
6770
test=tests_require,

0 commit comments

Comments
 (0)