Skip to content

Commit

Permalink
REF: Use pkg_resources instead of distutils (#393)
Browse files Browse the repository at this point in the history
Co-authored-by: Alan D. Snow <alan.snow@pioneer.com>
  • Loading branch information
snowman2 and Alan D. Snow committed Sep 17, 2021
1 parent 3870b4b commit 5feafc2
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,9 @@
import sys
from pathlib import Path

from pkg_resources import parse_version
from setuptools import Extension, setup, find_packages
from setuptools.command.build_ext import build_ext as _build_ext
# import distutils *after* setuptools
from distutils.version import LooseVersion

import versioneer

Expand Down Expand Up @@ -83,7 +82,7 @@ def get_geos_paths():
)
return {}

if LooseVersion(geos_version) < LooseVersion(MIN_GEOS_VERSION):
if parse_version(geos_version) < parse_version(MIN_GEOS_VERSION):
raise ImportError(
"GEOS version should be >={}, found {}".format(
MIN_GEOS_VERSION, geos_version
Expand Down

0 comments on commit 5feafc2

Please sign in to comment.