@@ -21,6 +21,8 @@ make it possible to have multiple tools inside the `pypi` directory
2121
2222load ("//python:defs.bzl" , _py_binary = "py_binary" , _py_test = "py_test" )
2323
24+ _DEFAULT_TAGS = ["no-sandbox" , "no-remote-exec" , "requires-network" ]
25+
2426def pip_compile (
2527 name ,
2628 srcs = None ,
@@ -36,7 +38,7 @@ def pip_compile(
3638 requirements_linux = None ,
3739 requirements_windows = None ,
3840 visibility = ["//visibility:private" ],
39- tags = None ,
41+ tags = _DEFAULT_TAGS ,
4042 ** kwargs ):
4143 """Generates targets for managing pip dependencies with pip-compile.
4244
@@ -75,6 +77,7 @@ def pip_compile(
7577 requirements_darwin: File of darwin specific resolve output to check validate if requirement.in has changes.
7678 requirements_windows: File of windows specific resolve output to check validate if requirement.in has changes.
7779 tags: tagging attribute common to all build rules, passed to both the _test and .update rules.
80+ default: ["no-sandbox", "no-remote-exec", "requires-network"]
7881 visibility: passed to both the _test and .update rules.
7982 **kwargs: other bazel attributes passed to the "_test" rule.
8083 """
@@ -141,9 +144,6 @@ def pip_compile(
141144 ] + extra_deps
142145
143146 tags = tags or []
144- tags .append ("requires-network" )
145- tags .append ("no-remote-exec" )
146- tags .append ("no-sandbox" )
147147 attrs = {
148148 "args" : args ,
149149 "data" : data ,
0 commit comments