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 2525 "attrs" ,
2626 "cffi" ,
2727 "findlibs>=0.1.1" ,
28+ "eccodeslib ; platform_system!=\" Windows\" " ,
2829]
2930
3031ext_modules = [
3334 sources = ["eccodes/_eccodes.cc" ],
3435 language = "c++" ,
3536 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" )) ],
3839 )
3940]
4041
@@ -52,11 +53,14 @@ def get_version() -> str:
5253
5354
5455def 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 []
6064
6165
6266class bdist_wheel_ext (bdist_wheel ):
You can’t perform that action at this time.
0 commit comments