Skip to content

Commit ce9eb0f

Browse files
committed
pre-commit
1 parent ec33bc8 commit ce9eb0f

1 file changed

Lines changed: 13 additions & 2 deletions

File tree

python/eckit/setup.py

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,16 @@
2222
binary_dir = getenv("ECKIT_BUILD_DIR", str(Path(getenv("HOME"), "build", "eckit")))
2323
library_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+
)
2635
include_dirs = getenv("ECKIT_INCLUDE_DIRS", include_dirs_default).split(":")
2736

2837
extra_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+
4454
kwargs_set: dict[str, Any] = {}
4555
try:
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

5262
version: str
5363
try:
54-
with open("../../VERSION", 'r') as f:
64+
with open("../../VERSION", "r") as f:
5565
version = f.readlines()[0].strip()
5666
except 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:
6070
install_requires = ["findlibs", "pyyaml"]
6171
try:
6272
import eckitlib
73+
6374
install_requires.append(f"eckitlib=={eckitlib.__version__}")
6475
except ImportError:
6576
warnings.warn("failed to import eckitlib, not listing as a dependency")

0 commit comments

Comments
 (0)