diff --git a/python/pip_install/pip_compile.py b/python/pip_install/pip_compile.py index 1e789e9b5d..93c55c825f 100644 --- a/python/pip_install/pip_compile.py +++ b/python/pip_install/pip_compile.py @@ -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: @@ -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 diff --git a/python/pip_install/requirements.bzl b/python/pip_install/requirements.bzl index 0bc382e2b0..63fec01cfe 100644 --- a/python/pip_install/requirements.bzl +++ b/python/pip_install/requirements.bzl @@ -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 = [