Skip to content

Commit 95e72ce

Browse files
author
Jonathon Belotti
authored
Merge pull request #23 from dillon-giacoppo/jonathon/pip-timeout-configurability
2 parents 8e12431 + a04fbe2 commit 95e72ce

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

defs.bzl

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@ def _pip_repository_impl(rctx):
3131
# Manually construct the PYTHONPATH since we cannot use the toolchain here
3232
"PYTHONPATH": pypath
3333
},
34+
timeout=rctx.attr.timeout,
3435
)
3536
if result.return_code:
3637
fail("rules_python_external failed: %s (%s)" % (result.stdout, result.stderr))
@@ -43,6 +44,8 @@ pip_repository = repository_rule(
4344
"requirements": attr.label(allow_single_file=True, mandatory=True,),
4445
"wheel_env": attr.string_dict(),
4546
"python_interpreter": attr.string(default="python3"),
47+
# 600 is documented as default here: https://docs.bazel.build/versions/master/skylark/lib/repository_ctx.html#execute
48+
"timeout": attr.int(default = 600),
4649
"_script": attr.label(
4750
executable=True, default=Label("//src:__main__.py"), cfg="host",
4851
),

0 commit comments

Comments
 (0)