Skip to content

Commit

Permalink
Make pytest-runner conditional
Browse files Browse the repository at this point in the history
  • Loading branch information
andrew-propelauth committed Feb 22, 2023
1 parent d29e5a4 commit 2d234cc
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,10 @@
HERE = pathlib.Path(__file__).parent
README = (HERE / "README.md").read_text()

# See https://pytest-runner.readthedocs.io/en/latest/#conditional-requirement
needs_pytest = {'pytest', 'test', 'ptr'}.intersection(sys.argv)
pytest_runner = ['pytest-runner'] if needs_pytest else []

setup(
name="propelauth-flask",
version="2.0.1",
Expand All @@ -16,7 +20,7 @@
author_email="[email protected]",
license="MIT",
install_requires=["flask>=0.9", "propelauth-py", "requests"],
setup_requires=["pytest-runner"],
setup_requires=pytest_runner,
tests_require=["pytest==4.4.1"],
test_suite="tests",
)

0 comments on commit 2d234cc

Please sign in to comment.