@@ -21,6 +21,8 @@ make it possible to have multiple tools inside the `pypi` directory
21
21
22
22
load ("//python:defs.bzl" , _py_binary = "py_binary" , _py_test = "py_test" )
23
23
24
+ _DEFAULT_TAGS = ["no-sandbox" , "no-remote-exec" , "requires-network" ]
25
+
24
26
def pip_compile (
25
27
name ,
26
28
srcs = None ,
@@ -36,7 +38,7 @@ def pip_compile(
36
38
requirements_linux = None ,
37
39
requirements_windows = None ,
38
40
visibility = ["//visibility:private" ],
39
- tags = None ,
41
+ tags = _DEFAULT_TAGS ,
40
42
** kwargs ):
41
43
"""Generates targets for managing pip dependencies with pip-compile.
42
44
@@ -75,6 +77,7 @@ def pip_compile(
75
77
requirements_darwin: File of darwin specific resolve output to check validate if requirement.in has changes.
76
78
requirements_windows: File of windows specific resolve output to check validate if requirement.in has changes.
77
79
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"]
78
81
visibility: passed to both the _test and .update rules.
79
82
**kwargs: other bazel attributes passed to the "_test" rule.
80
83
"""
@@ -141,9 +144,6 @@ def pip_compile(
141
144
] + extra_deps
142
145
143
146
tags = tags or []
144
- tags .append ("requires-network" )
145
- tags .append ("no-remote-exec" )
146
- tags .append ("no-sandbox" )
147
147
attrs = {
148
148
"args" : args ,
149
149
"data" : data ,
0 commit comments