File tree Expand file tree Collapse file tree 5 files changed +77
-7
lines changed
py_cc_toolchain_registered Expand file tree Collapse file tree 5 files changed +77
-7
lines changed Original file line number Diff line number Diff line change @@ -61,18 +61,26 @@ def define_local_runtime_toolchain_impl(
6161 cc_library (
6262 name = "_python_headers" ,
6363 # NOTE: Keep in sync with watch_tree() called in local_runtime_repo
64- srcs = native .glob (["include/**/*.h" ]),
64+ srcs = native .glob (
65+ ["include/**/*.h" ],
66+ # A Python install may not have C headers
67+ allow_empty = True ,
68+ ),
6569 includes = ["include" ],
6670 )
6771
6872 cc_library (
6973 name = "_libpython" ,
7074 # Don't use a recursive glob because the lib/ directory usually contains
7175 # a subdirectory of the stdlib -- lots of unrelated files
72- srcs = native .glob ([
73- "lib/*{}" .format (lib_ext ), # Match libpython*.so
74- "lib/*{}*" .format (lib_ext ), # Also match libpython*.so.1.0
75- ]),
76+ srcs = native .glob (
77+ [
78+ "lib/*{}" .format (lib_ext ), # Match libpython*.so
79+ "lib/*{}*" .format (lib_ext ), # Also match libpython*.so.1.0
80+ ],
81+ # A Python install may not have shared libraries.
82+ allow_empty = True ,
83+ ),
7684 hdrs = [":_python_headers" ],
7785 )
7886
Original file line number Diff line number Diff line change 1+ load ("@bazel_tools//tools/build_defs/repo:http.bzl" , "http_archive" )
2+
3+ http_archive (
4+ name = "protobuf" ,
5+ sha256 = "da288bf1daa6c04d03a9051781caa52aceb9163586bff9aa6cfb12f69b9395aa" ,
6+ strip_prefix = "protobuf-27.0" ,
7+ url = "https://github.com/protocolbuffers/protobuf/releases/download/v27.0/protobuf-27.0.tar.gz" ,
8+ )
9+
10+ http_archive (
11+ name = "rules_cc" ,
12+ sha256 = "d9bdd3ec66b6871456ec9c965809f43a0901e692d754885e89293807762d3d80" ,
13+ strip_prefix = "rules_cc-0.0.13" ,
14+ urls = ["https://github.com/bazelbuild/rules_cc/releases/download/0.0.13/rules_cc-0.0.13.tar.gz" ],
15+ )
16+
117local_repository (
218 name = "rules_python" ,
319 path = "../../.." ,
Original file line number Diff line number Diff line change 1+ load ("@bazel_tools//tools/build_defs/repo:http.bzl" , "http_archive" )
2+
3+ http_archive (
4+ name = "protobuf" ,
5+ sha256 = "da288bf1daa6c04d03a9051781caa52aceb9163586bff9aa6cfb12f69b9395aa" ,
6+ strip_prefix = "protobuf-27.0" ,
7+ url = "https://github.com/protocolbuffers/protobuf/releases/download/v27.0/protobuf-27.0.tar.gz" ,
8+ )
9+
10+ http_archive (
11+ name = "rules_cc" ,
12+ sha256 = "d9bdd3ec66b6871456ec9c965809f43a0901e692d754885e89293807762d3d80" ,
13+ strip_prefix = "rules_cc-0.0.13" ,
14+ urls = ["https://github.com/bazelbuild/rules_cc/releases/download/0.0.13/rules_cc-0.0.13.tar.gz" ],
15+ )
16+
117local_repository (
218 name = "rules_python" ,
319 path = "../../.." ,
@@ -13,8 +29,6 @@ python_register_toolchains(
1329 python_version = "3.9" ,
1430)
1531
16- load ("@bazel_tools//tools/build_defs/repo:http.bzl" , "http_archive" )
17-
1832http_archive (
1933 name = "bazel_skylib" ,
2034 sha256 = "c6966ec828da198c5d9adbaa94c05e3a1c7f21bd012a0b29ba8ddbccb2c93b0d" ,
Original file line number Diff line number Diff line change 1+ load ("@bazel_tools//tools/build_defs/repo:http.bzl" , "http_archive" )
2+
3+ http_archive (
4+ name = "protobuf" ,
5+ sha256 = "da288bf1daa6c04d03a9051781caa52aceb9163586bff9aa6cfb12f69b9395aa" ,
6+ strip_prefix = "protobuf-27.0" ,
7+ url = "https://github.com/protocolbuffers/protobuf/releases/download/v27.0/protobuf-27.0.tar.gz" ,
8+ )
9+
10+ http_archive (
11+ name = "rules_cc" ,
12+ sha256 = "d9bdd3ec66b6871456ec9c965809f43a0901e692d754885e89293807762d3d80" ,
13+ strip_prefix = "rules_cc-0.0.13" ,
14+ urls = ["https://github.com/bazelbuild/rules_cc/releases/download/0.0.13/rules_cc-0.0.13.tar.gz" ],
15+ )
16+
117local_repository (
218 name = "rules_python" ,
319 path = "../../.." ,
Original file line number Diff line number Diff line change 1+ load ("@bazel_tools//tools/build_defs/repo:http.bzl" , "http_archive" )
2+
3+ http_archive (
4+ name = "protobuf" ,
5+ sha256 = "da288bf1daa6c04d03a9051781caa52aceb9163586bff9aa6cfb12f69b9395aa" ,
6+ strip_prefix = "protobuf-27.0" ,
7+ url = "https://github.com/protocolbuffers/protobuf/releases/download/v27.0/protobuf-27.0.tar.gz" ,
8+ )
9+
10+ http_archive (
11+ name = "rules_cc" ,
12+ sha256 = "d9bdd3ec66b6871456ec9c965809f43a0901e692d754885e89293807762d3d80" ,
13+ strip_prefix = "rules_cc-0.0.13" ,
14+ urls = ["https://github.com/bazelbuild/rules_cc/releases/download/0.0.13/rules_cc-0.0.13.tar.gz" ],
15+ )
16+
117local_repository (
218 name = "rules_python" ,
319 path = "../../.." ,
You can’t perform that action at this time.
0 commit comments