2222binary_dir = getenv ("ECKIT_BUILD_DIR" , str (Path (getenv ("HOME" ), "build" , "eckit" )))
2323library_dirs = getenv ("ECKIT_LIB_DIR" , str (Path (binary_dir , "lib" ))).split (":" )
2424
25- include_dirs_default = ":" .join ( str (p ) for p in (Path (source_dir , "src" ), Path (binary_dir , "src" ), Path (source_dir , "eckit" , "src" ), Path (binary_dir , "eckit" , "src" )) if p .exists ())
25+ include_dirs_default = ":" .join (
26+ str (p )
27+ for p in (
28+ Path (source_dir , "src" ),
29+ Path (binary_dir , "src" ),
30+ Path (source_dir , "eckit" , "src" ),
31+ Path (binary_dir , "eckit" , "src" ),
32+ )
33+ if p .exists ()
34+ )
2635include_dirs = getenv ("ECKIT_INCLUDE_DIRS" , include_dirs_default ).split (":" )
2736
2837extra_compile_args = ["-std=c++17" ]
@@ -41,6 +50,7 @@ def _ext(name: str, sources: list, libraries: list) -> Extension:
4150 extra_link_args = extra_compile_args ,
4251 )
4352
53+
4454kwargs_set : dict [str , Any ] = {}
4555try :
4656 from setup_utils import ext_kwargs as wheel_ext_kwargs
@@ -51,7 +61,7 @@ def _ext(name: str, sources: list, libraries: list) -> Extension:
5161
5262version : str
5363try :
54- with open ("../../VERSION" , 'r' ) as f :
64+ with open ("../../VERSION" , "r" ) as f :
5565 version = f .readlines ()[0 ].strip ()
5666except Exception :
5767 warnings .warn ("failed to read VERSION, falling back to 0.0.0" )
@@ -60,6 +70,7 @@ def _ext(name: str, sources: list, libraries: list) -> Extension:
6070install_requires = ["findlibs" , "pyyaml" ]
6171try :
6272 import eckitlib
73+
6374 install_requires .append (f"eckitlib=={ eckitlib .__version__ } " )
6475except ImportError :
6576 warnings .warn ("failed to import eckitlib, not listing as a dependency" )
0 commit comments