Skip to content

Commit

Permalink
Simplify version check in setup.py
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 committed Jun 28, 2023
1 parent 99c0326 commit 52dfb58
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 52dfb58

Please sign in to comment.