Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit c6357a6

Browse filesBrowse files
authored
Fixed incorrect custom compile commands from compile_pip_requirements (bazel-contrib#627)
1 parent 83f9154 commit c6357a6
Copy full SHA for c6357a6

File tree

2 files changed

+4
-5
lines changed
Filter options

2 files changed

+4
-5
lines changed

‎python/pip_install/pip_compile.py

Copy file name to clipboardExpand all lines: python/pip_install/pip_compile.py
+3-4Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515

1616
requirements_in = os.path.relpath(sys.argv.pop(1))
1717
requirements_txt = sys.argv.pop(1)
18-
update_target_name = sys.argv.pop(1)
18+
update_target_label = sys.argv.pop(1)
1919

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

7372
os.environ["CUSTOM_COMPILE_COMMAND"] = update_command

‎python/pip_install/requirements.bzl

Copy file name to clipboardExpand all lines: python/pip_install/requirements.bzl
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ def compile_pip_requirements(
5454
args = [
5555
loc % requirements_in,
5656
loc % requirements_txt,
57-
name + ".update",
57+
"//%s:%s.update" % (native.package_name(), name),
5858
] + extra_args
5959

6060
deps = [

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.