diff options
author | Sebastian Wagner <sebastian.wagner@suse.com> | 2019-10-16 13:14:36 +0200 |
---|---|---|
committer | Sebastian Wagner <sebastian.wagner@suse.com> | 2019-10-25 14:58:41 +0200 |
commit | 9ba33ac11cfaa5cbbdc8dca9f1959387a5d156da (patch) | |
tree | 42912f6e959bdafaf1135d6abd739ab8be966eea /src/python-common/setup.py | |
parent | Merge pull request #31068 from bk201/wip-lint-python-common (diff) | |
download | ceph-9ba33ac11cfaa5cbbdc8dca9f1959387a5d156da.tar.xz ceph-9ba33ac11cfaa5cbbdc8dca9f1959387a5d156da.zip |
python-common: Add mypy testing
Signed-off-by: Sebastian Wagner <sebastian.wagner@suse.com>
Diffstat (limited to 'src/python-common/setup.py')
-rw-r--r-- | src/python-common/setup.py | 15 |
1 files changed, 13 insertions, 2 deletions
diff --git a/src/python-common/setup.py b/src/python-common/setup.py index cf1f661cfd4..6692ddab4dd 100644 --- a/src/python-common/setup.py +++ b/src/python-common/setup.py @@ -1,6 +1,16 @@ +import sys + from setuptools import setup, find_packages +if sys.version_info >= (3,0): + mypy = ['mypy', 'pytest-mypy'] + pytest = 'pytest >=2.1.3' +else: + mypy = [] + pytest = 'pytest >=2.1.3,<5' + + with open("README.rst", "r") as fh: long_description = fh.read() @@ -20,10 +30,11 @@ setup( install_requires=( 'six', ), + setup_requires=['pytest-runner'], tests_require=[ - 'pytest >=2.1.3', + pytest, 'tox', - ], + ] + mypy, classifiers = [ 'Intended Audience :: Developer', 'Operating System :: POSIX :: Linux', |