Skip to content

Commit

Permalink
Check for edm
Browse files Browse the repository at this point in the history
  • Loading branch information
Dima Dorezyuk committed Jun 28, 2024
1 parent 516f3c3 commit 20fe89b
Showing 1 changed file with 16 additions and 4 deletions.
20 changes: 16 additions & 4 deletions third-party/bazel/edm.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,21 @@ def _edm_repositories_impl(rctx):
build_files_args.append("--build-file")
build_files_args.append(str(build_file))
print("build_files_args: ", build_files_args)
# If we don't have edm on the machine installed we try to recover and
# install it.
if rctx.which("edm") == None:
print("Installind edm")
rctx.execute(
[
"python3",
"-m",
"pip",
"install",
"git+https://github.com/Everest/everest-dev-environment.git#subdirectory=dependency_manager",
]
)
exec_result = rctx.execute(
["edm", "bazel", rctx.attr.dependencies_yaml] +
build_files_args,
["edm", "bazel", rctx.attr.dependencies_yaml] + build_files_args,
)
if exec_result.return_code != 0:
fail("edm exec error: ", exec_result.stderr)
Expand All @@ -27,5 +39,5 @@ edm_repositories = repository_rule(
allow_files=True,
doc="List of build files for external repositories",
),
},
)
},
)

0 comments on commit 20fe89b

Please sign in to comment.