diff options
author | Enji Cooper <yaneurabeya@gmail.com> | 2019-11-14 11:15:37 -0800 |
---|---|---|
committer | Claudiu Popa <pcmanticore@gmail.com> | 2019-11-16 21:24:40 +0100 |
commit | ed5f9363a2e53fe98709a8a4ff4cfc1660c8dbda (patch) | |
tree | 09bb447d732f8019138e1fb37c32c71626ea4eab /setup.py | |
parent | 1b15abbc5a995d57abe5f2a7016d6088355a2b91 (diff) | |
download | pylint-git-ed5f9363a2e53fe98709a8a4ff4cfc1660c8dbda.tar.gz |
Make installing pytest-runner contingent on running tests
This monkeypatches several changes from [PyCQA/mccabe](https://github.com/PyCQA/mccabe/blob/master/setup.py)
over to the pylint repo, since the pattern was equivalent between
the two projects.
Signed-off-by: Enji Cooper <yaneurabeya@gmail.com>
Diffstat (limited to 'setup.py')
-rw-r--r-- | setup.py | 6 |
1 files changed, 5 insertions, 1 deletions
@@ -62,6 +62,10 @@ else: long_description = "" +needs_pytest = set(['pytest', 'test', 'ptr']).intersection(sys.argv) +pytest_runner = ['pytest-runner'] if needs_pytest else [] + + def ensure_scripts(linux_scripts): """Creates the proper script names required for each platform (taken from 4Suite) @@ -143,7 +147,7 @@ def install(**kwargs): extras_require=extras_require, test_suite="test", python_requires=">=3.5.*", - setup_requires=["pytest-runner"], + setup_requires=pytest_runner, tests_require=["pytest"], **kwargs ) |