3838 )
3939]
4040
41+
4142def get_version () -> str :
4243 version_pattern = (
4344 r"^__version__ = [\"\'](.*)[\"\']" # More permissive regex pattern
@@ -49,22 +50,25 @@ def get_version() -> str:
4950 raise ValueError ("couldn't parse version" )
5051 return version_match .group (1 )
5152
53+
5254def get_eccodeslib_dep () -> list [str ]:
5355 eccodes_version = importlib .metadata .version ("eccodeslib" )
54- mj , mn , pt = eccodes_version .split ('.' , 2 )
56+ mj , mn , pt = eccodes_version .split ("." , 2 )
5557 return [
5658 f"eccodeslib >= { eccodes_version } , < { int (mj )+ 1 } " ,
5759 ]
5860
61+
5962class bdist_wheel_ext (bdist_wheel ):
6063 # cf wheelmaker setup.py for explanation
6164 def get_tag (self ):
6265 python , abi , plat = bdist_wheel .get_tag (self )
6366 return python , abi , "manylinux_2_28_x86_64"
6467
68+
6569ext_kwargs = {
66- ' darwin' : {},
67- ' linux' : {"cmdclass" : {"bdist_wheel" : bdist_wheel_ext }},
70+ " darwin" : {},
71+ " linux" : {"cmdclass" : {"bdist_wheel" : bdist_wheel_ext }},
6872}
6973
7074setuptools .setup (
@@ -77,5 +81,4 @@ def get_tag(self):
7781 keywords = "ecCodes GRIB BUFR" ,
7882 ext_modules = ext_modules ,
7983 ** ext_kwargs [sys .platform ],
80-
8184)
0 commit comments