Skip to content

Commit

Permalink
Merge pull request #180 from mark-adams/make-pytest-runner-conditional
Browse files Browse the repository at this point in the history
Made pytest-runner installation in setup.py conditional. Fixes #179
  • Loading branch information
mark-adams committed Oct 9, 2015
2 parents 89a8279 + b8cc504 commit d338883
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion setup.py
Expand Up @@ -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,
Expand All @@ -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,
Expand Down

0 comments on commit d338883

Please sign in to comment.