File tree Expand file tree Collapse file tree 1 file changed +11
-7
lines changed Expand file tree Collapse file tree 1 file changed +11
-7
lines changed Original file line number Diff line number Diff line change 25
25
"attrs" ,
26
26
"cffi" ,
27
27
"findlibs>=0.1.1" ,
28
+ 'eccodeslib ; platform_system!="Windows"' ,
28
29
]
29
30
30
31
ext_modules = [
33
34
sources = ["eccodes/_eccodes.cc" ],
34
35
language = "c++" ,
35
36
libraries = ["eccodes" ],
36
- library_dirs = [os .environ [ "LIBDIR" ] ],
37
- include_dirs = [os .environ [ "INCDIR" ] ],
37
+ library_dirs = [os .environ . get ( "LIBDIR" , os . path . realpath ( "install/lib" )) ],
38
+ include_dirs = [os .environ . get ( "INCDIR" , os . path . realpath ( "install/include" )) ],
38
39
)
39
40
]
40
41
@@ -52,11 +53,14 @@ def get_version() -> str:
52
53
53
54
54
55
def get_eccodeslib_dep () -> list [str ]:
55
- eccodes_version = importlib .metadata .version ("eccodeslib" )
56
- mj , mn , pt = eccodes_version .split ("." , 2 )
57
- return [
58
- f"eccodeslib >= { eccodes_version } , < { int (mj )+ 1 } " ,
59
- ]
56
+ try :
57
+ eccodes_version = importlib .metadata .version ("eccodeslib" )
58
+ mj , mn , pt = eccodes_version .split ("." , 2 )
59
+ return [
60
+ f"eccodeslib >= { eccodes_version } , < { int (mj )+ 1 } " ,
61
+ ]
62
+ except importlib .metadata .PackageNotFoundError :
63
+ return []
60
64
61
65
62
66
class bdist_wheel_ext (bdist_wheel ):
You can’t perform that action at this time.
0 commit comments