38
38
)
39
39
]
40
40
41
+
41
42
def get_version () -> str :
42
43
version_pattern = (
43
44
r"^__version__ = [\"\'](.*)[\"\']" # More permissive regex pattern
@@ -49,22 +50,25 @@ def get_version() -> str:
49
50
raise ValueError ("couldn't parse version" )
50
51
return version_match .group (1 )
51
52
53
+
52
54
def get_eccodeslib_dep () -> list [str ]:
53
55
eccodes_version = importlib .metadata .version ("eccodeslib" )
54
- mj , mn , pt = eccodes_version .split ('.' , 2 )
56
+ mj , mn , pt = eccodes_version .split ("." , 2 )
55
57
return [
56
58
f"eccodeslib >= { eccodes_version } , < { int (mj )+ 1 } " ,
57
59
]
58
60
61
+
59
62
class bdist_wheel_ext (bdist_wheel ):
60
63
# cf wheelmaker setup.py for explanation
61
64
def get_tag (self ):
62
65
python , abi , plat = bdist_wheel .get_tag (self )
63
66
return python , abi , "manylinux_2_28_x86_64"
64
67
68
+
65
69
ext_kwargs = {
66
- ' darwin' : {},
67
- ' linux' : {"cmdclass" : {"bdist_wheel" : bdist_wheel_ext }},
70
+ " darwin" : {},
71
+ " linux" : {"cmdclass" : {"bdist_wheel" : bdist_wheel_ext }},
68
72
}
69
73
70
74
setuptools .setup (
@@ -77,5 +81,4 @@ def get_tag(self):
77
81
keywords = "ecCodes GRIB BUFR" ,
78
82
ext_modules = ext_modules ,
79
83
** ext_kwargs [sys .platform ],
80
-
81
84
)
0 commit comments