Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Switch dynamic version handling from pkg_resources (in setuptools) to packaging #229

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions Changelog
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
since version 2.1.5 release
===========================
* switch dynamic version handling from pkg_resources (in setuptools) to packaging

version 2.1.5 release
=====================
* remove python 3.6 support, add python 3.11,3.12
Expand Down
1 change: 1 addition & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ classifiers = [
"Topic :: Software Development :: Libraries :: Python Modules",
]
dependencies = [
"packaging",
"pyproj",
"numpy",
]
Expand Down
4 changes: 2 additions & 2 deletions src/pygrib/_pygrib.pyx
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import os
from datetime import datetime
from io import BufferedReader
from os import PathLike
from pkg_resources import parse_version
from packaging import version
from numpy import ma
import pyproj
npc.import_array()
Expand Down Expand Up @@ -1391,7 +1391,7 @@ cdef class gribmessage(object):
else:
scalea = 1.
scaleb = 1.
if parse_version(grib_api_version) < parse_version('1.9.0'):
if version.parse(grib_api_version) < version.parse('1.9.0'):
projparams['a']=self['scaledValueOfMajorAxisOfOblateSpheroidEarth']*scalea
projparams['b']=self['scaledValueOfMinorAxisOfOblateSpheroidEarth']*scaleb
else:
Expand Down