@@ -3,44 +3,32 @@ load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")
3
3
# Python rules.
4
4
http_archive (
5
5
name = "rules_python" ,
6
- url = "https://github.com/bazelbuild/rules_python/releases/download/0.1.0/rules_python-0.1.0.tar.gz" ,
7
- sha256 = "b6d46438523a3ec0f3cead544190ee13223a52f6a6765a29eae7b7cc24cc83a0" ,
6
+ sha256 = "a868059c8c6dd6ad45a205cca04084c652cfe1852e6df2d5aca036f6e5438380" ,
7
+ strip_prefix = "rules_python-0.14.0" ,
8
+ url = "https://github.com/bazelbuild/rules_python/archive/refs/tags/0.14.0.tar.gz" ,
8
9
)
9
10
10
- load ("@rules_python//python:pip.bzl" , "pip_install " )
11
+ load ("@rules_python//python:pip.bzl" , "pip_parse " )
11
12
12
- pip_install (
13
- # (Optional) You can provide extra parameters to pip.
14
- # Here, make pip output verbose (this is usable with `quiet = False`).
15
- #extra_pip_args = ["-v"],
16
-
17
- # (Optional) You can exclude custom elements in the data section of the generated BUILD files for pip packages.
18
- # Exclude directories with spaces in their names in this example (avoids build errors if there are such directories).
19
- #pip_data_exclude = ["**/* */**"],
13
+ pip_parse (
14
+ name = "pip_deps" ,
15
+ requirements_lock = "//:requirements.txt" ,
16
+ )
20
17
21
- # (Optional) You can provide a python_interpreter (path) or a python_interpreter_target (a Bazel target, that
22
- # acts as an executable). The latter can be anything that could be used as Python interpreter. E.g.:
23
- # 1. Python interpreter that you compile in the build file (as above in @python_interpreter).
24
- # 2. Pre-compiled python interpreter included with http_archive
25
- # 3. Wrapper script, like in the autodetecting python toolchain.
26
- #python_interpreter_target = "@python_interpreter//:python_bin",
18
+ load ("@pip_deps//:requirements.bzl" , "install_deps" )
27
19
28
- # (Optional) You can set quiet to False if you want to see pip output.
29
- #quiet = False,
20
+ install_deps ()
30
21
31
- # Uses the default repository name "pip"
32
- requirements = "//:requirements.txt" ,
33
- )
34
22
35
23
# Packaging rules.
36
24
#load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")
37
25
http_archive (
38
26
name = "rules_pkg" ,
39
27
urls = [
40
- "https://mirror.bazel.build/github.com/bazelbuild/rules_pkg/releases/download/0.4 .0/rules_pkg-0.4 .0.tar.gz" ,
41
- "https://github.com/bazelbuild/rules_pkg/releases/download/0.4 .0/rules_pkg-0.4 .0.tar.gz" ,
28
+ "https://mirror.bazel.build/github.com/bazelbuild/rules_pkg/releases/download/0.8 .0/rules_pkg-0.8 .0.tar.gz" ,
29
+ "https://github.com/bazelbuild/rules_pkg/releases/download/0.8 .0/rules_pkg-0.8 .0.tar.gz" ,
42
30
],
43
- sha256 = "038f1caa773a7e35b3663865ffb003169c6a71dc995e39bf4815792f385d837d " ,
31
+ sha256 = "eea0f59c28a9241156a47d7a8e32db9122f3d50b505fae0f33de6ce4d9b61834 " ,
44
32
)
45
33
load ("@rules_pkg//:deps.bzl" , "rules_pkg_dependencies" )
46
- rules_pkg_dependencies ()
34
+ rules_pkg_dependencies ()
0 commit comments