Check python version in setup.py only for install

This allow us to use this on build service like travis.
This commit is contained in:
Julien Duponchelle 2017-03-21 10:06:07 +01:00
parent 34f5a6f82c
commit c5290cfec6
No known key found for this signature in database
GPG Key ID: CE8B29639E07F5E8

View File

@ -20,7 +20,7 @@ from setuptools import setup, find_packages
from setuptools.command.test import test as TestCommand
# we only support Python 3 version >= 3.4
if sys.version_info < (3, 4):
if len(sys.argv) >= 2 and sys.argv[1] == "install" and sys.version_info < (3, 4):
raise SystemExit("Python 3.4 or higher is required")