Skip to content

Commit

Permalink
Merge pull request #785 from girder/change-version-check
Browse files Browse the repository at this point in the history
Change how we do a version check.
  • Loading branch information
manthey authored Feb 17, 2022
2 parents 873e4b3 + 9ea0db8 commit ae63ad4
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
4 changes: 2 additions & 2 deletions sources/gdal/large_image_source_gdal/girder_source.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@
#############################################################################

import re
from distutils.version import StrictVersion

import packaging.version
from girder_large_image.girder_tilesource import GirderTileSource
from osgeo import gdal

Expand Down Expand Up @@ -48,7 +48,7 @@ def _getLargeImagePath(self):
try:
largeImageFileId = self.item['largeImage']['fileId']
largeImageFile = File().load(largeImageFileId, force=True)
if (StrictVersion(gdal.__version__) >= StrictVersion('2.1.3') and
if (packaging.version.parse(gdal.__version__) >= packaging.version.parse('2.1.3') and
largeImageFile.get('linkUrl') and
not largeImageFile.get('assetstoreId') and
re.match(r'(http(|s)|ftp)://', largeImageFile['linkUrl'])):
Expand Down
1 change: 1 addition & 0 deletions sources/gdal/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ def prerelease_local_scheme(version):
install_requires=[
'large-image',
'gdal',
'packaging',
'pyproj>=2.2.0',
'importlib-metadata ; python_version < "3.8"',
],
Expand Down

0 comments on commit ae63ad4

Please sign in to comment.