summaryrefslogtreecommitdiffstats
path: root/src/python-common/setup.py
diff options
context:
space:
mode:
authorSebastian Wagner <sebastian.wagner@suse.com>2019-10-16 13:14:36 +0200
committerSebastian Wagner <sebastian.wagner@suse.com>2019-10-25 14:58:41 +0200
commit9ba33ac11cfaa5cbbdc8dca9f1959387a5d156da (patch)
tree42912f6e959bdafaf1135d6abd739ab8be966eea /src/python-common/setup.py
parentMerge pull request #31068 from bk201/wip-lint-python-common (diff)
downloadceph-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.py15
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',