Skip to content

Commit

Permalink
Simplify version check in setup.py (#559)
Browse files Browse the repository at this point in the history
The motivation here is to drop the dependency on pkg_resources.
  • Loading branch information
cottsay authored Jul 11, 2023
1 parent e942a24 commit bed6cee
Showing 1 changed file with 3 additions and 7 deletions.
10 changes: 3 additions & 7 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down

0 comments on commit bed6cee

Please sign in to comment.