10000 Update example with extra_pip_args, pip_data_exclude and quite option… · satishhiremath/rules_python@2c78da5 · GitHub
[go: up one dir, main page]

Skip to content

Commit 2c78da5

Browse files
Update example with extra_pip_args, pip_data_exclude and quite options (bazel-contrib#49)
1 parent 3e1a6a5 commit 2c78da5

File tree

1 file changed

+13
-1
lines changed

1 file changed

+13
-1
lines changed

example/WORKSPACE

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,12 +62,24 @@ rules_python_external_dependencies()
6262
load("@rules_python_external//:defs.bzl", "pip_install")
6363

6464
pip_install(
65-
# You can optionally provide a python_interpreter (path) or a python_interpreter_target (a Bazel target, that
65+
# (Optional) You can provide extra parameters to pip.
66+
# Here, make pip output verbose (this is usable with `quiet = False`).
67+
#extra_pip_args = ["-v"],
68+
69+
# (Optional) You can exclude custom elements in the data section of the generated BUILD files for pip packages.
70+
# Exclude directories with spaces in their names in this example (avoids build errors if there are such directories).
71+
#pip_data_exclude = ["**/* */**"],
72+
73+
# (Optional) You can provide a python_interpreter (path) or a python_interpreter_target (a Bazel target, that
6674
# acts as an executable). The latter can be anything that could be used as Python interpreter. E.g.:
6775
# 1. Python interpreter that you compile in the build file (as above in @python_interpreter).
6876
# 2. Pre-compiled python interpreter included with http_archive
6977
# 3. Wrapper script, like in the autodetecting python toolchain.
7078
python_interpreter_target = "@python_interpreter//:python_bin",
79+
80+
# (Optional) You can set quiet to False if you want to see pip output.
81+
#quiet = False,
82+
7183
# Uses the default repository name "pip"
7284
requirements = "//:requirements.txt",
7385
)

0 commit comments

Comments
 (0)
0