Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 3 additions & 4 deletions python/pip_install/pip_compile.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@

requirements_in = os.path.relpath(sys.argv.pop(1))
requirements_txt = sys.argv.pop(1)
update_target_name = sys.argv.pop(1)
update_target_label = sys.argv.pop(1)

# Before loading click, set the locale for its parser.
# If it leaks through to the system setting, it may fail:
Expand Down Expand Up @@ -65,9 +65,8 @@
# $(rootpath) in the workspace root gives ./requirements.in
if update_target_pkg == ".":
update_target_pkg = ""
update_command = os.getenv("CUSTOM_COMPILE_COMMAND") or "bazel run //%s:%s" % (
update_target_pkg,
update_target_name,
update_command = os.getenv("CUSTOM_COMPILE_COMMAND") or "bazel run %s" % (
update_target_label,
)

os.environ["CUSTOM_COMPILE_COMMAND"] = update_command
Expand Down
2 changes: 1 addition & 1 deletion python/pip_install/requirements.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ def compile_pip_requirements(
args = [
loc % requirements_in,
loc % requirements_txt,
name + ".update",
"//%s:%s.update" % (native.package_name(), name),
] + extra_args

deps = [
Expand Down