1
1
workspace (name = "tensorflow_compression" )
2
2
3
- load ("@bazel_tools//tools/build_defs/repo:http.bzl" , "http_archive" )
4
3
load ("//:workspace.bzl" , "tensorflow_compression_workspace" )
5
4
tensorflow_compression_workspace ()
6
5
6
+ load ("@bazel_tools//tools/build_defs/repo:http.bzl" , "http_archive" )
7
+
8
+ # `bazel_skylib` and `rules_python` versions should match the ones used in
9
+ # `org_tensorflow`.
10
+ http_archive (
11
+ name = "bazel_skylib" ,
12
+ sha256 = "74d544d96f4a5bb630d465ca8bbcfe231e3594e5aae57e1edbf17a6eb3ca2506" ,
13
+ urls = [
14
+ "https://storage.googleapis.com/mirror.tensorflow.org/github.com/bazelbuild/bazel-skylib/releases/download/1.3.0/bazel-skylib-1.3.0.tar.gz" ,
15
+ "https://github.com/bazelbuild/bazel-skylib/releases/download/1.3.0/bazel-skylib-1.3.0.tar.gz" ,
16
+ ],
17
+ )
18
+
19
+ http_archive (
20
+ name = "rules_python" ,
21
+ sha256 = "9d04041ac92a0985e344235f5d946f71ac543f1b1565f2cdbc9a2aaee8adf55b" ,
22
+ strip_prefix = "rules_python-0.26.0" ,
23
+ url = "https://github.com/bazelbuild/rules_python/releases/download/0.26.0/rules_python-0.26.0.tar.gz" ,
24
+ )
25
+
7
26
http_archive (
8
27
name = "org_tensorflow" ,
9
28
sha256 = "ce357fd0728f0d1b0831d1653f475591662ec5bca736a94ff789e6b1944df19f" ,
@@ -14,6 +33,29 @@ http_archive(
14
33
)
15
34
16
35
# Copied from `@org_tensorflow//:WORKSPACE`.
36
+ load (
37
+ "@rules_python//python:repositories.bzl" ,
38
+ "py_repositories" ,
39
+ "python_register_toolchains" ,
40
+ )
41
+ py_repositories ()
42
+
43
+ load (
44
+ "@org_tensorflow//tensorflow/tools/toolchains/python:python_repo.bzl" ,
45
+ "python_repository" ,
46
+ )
47
+ python_repository (name = "python_version_repo" )
48
+ load ("@python_version_repo//:py_version.bzl" , "HERMETIC_PYTHON_VERSION" )
49
+
50
+ # TF workspace scripts below requires `@python` toolchains repo.
51
+ # Toolchain setup here is to please the TF workspace scripts,
52
+ # and we do not use this Python version to build pip packages.
53
+ python_register_toolchains (
54
+ name = "python" ,
55
+ ignore_root_user_error = True ,
56
+ python_version = HERMETIC_PYTHON_VERSION ,
57
+ )
58
+
17
59
load ("@org_tensorflow//tensorflow:workspace3.bzl" , "tf_workspace3" )
18
60
tf_workspace3 ()
19
61
0 commit comments