From bed6ceee70cdfbf97c19be3c51037462bc4294f0 Mon Sep 17 00:00:00 2001 From: Scott K Logan Date: Tue, 11 Jul 2023 14:23:18 -0500 Subject: [PATCH] Simplify version check in setup.py (#559) The motivation here is to drop the dependency on pkg_resources. --- setup.py | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/setup.py b/setup.py index daf914b5..698119c8 100644 --- a/setup.py +++ b/setup.py @@ -4,15 +4,11 @@ import os import sys -from pkg_resources import parse_version from setuptools import setup -minimum_version = '3.6' -if ( - parse_version('%d.%d' % (sys.version_info.major, sys.version_info.minor)) < - parse_version(minimum_version) -): - sys.exit('This package requires at least Python ' + minimum_version) +minimum_version = (3, 6) +if sys.version_info < minimum_version: + sys.exit('This package requires at least Python %d.%d' % minimum_version) cmdclass = {} try: