From 05da9d9a00d3a1e8aaf129c5f698d698c562c3fd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Damir=20Jeli=C4=87?= Date: Tue, 15 Jan 2019 16:51:09 +0100 Subject: [PATCH] setup.py: Make the typing module a requirement only for old python versions. Typing is part of standard library from python 3.5 and from python 3.7 onwards trying to install it results in an error. This patch disables typing installation on python versions that are newer than 3.5. --- requirements.txt | 2 +- setup.py | 6 +++++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/requirements.txt b/requirements.txt index c627b85..0e2405c 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,3 +1,3 @@ future cffi -typing +typing; python_version < '3.5' diff --git a/setup.py b/setup.py index 4b0deb1..5742fd9 100644 --- a/setup.py +++ b/setup.py @@ -22,6 +22,10 @@ packages=["olm"], setup_requires=["cffi>=1.0.0"], cffi_modules=["olm_build.py:ffibuilder"], - install_requires=["cffi>=1.0.0", "future", "typing"], + install_requires=[ + "cffi>=1.0.0", + "future", + "typing;python_version<'3.5'" + ], zip_safe=False )