Skip to content

Commit 1dcc4f9

Browse files
committed
Add dependency to typing_extensions package to support Python < 3.8
1 parent 8d08205 commit 1dcc4f9

File tree

1 file changed

+20
-0
lines changed

1 file changed

+20
-0
lines changed

repositories.bzl

+20
Original file line numberDiff line numberDiff line change
@@ -34,13 +34,33 @@ py_library(
3434
srcs = glob(["importlib_metadata/*.py"]),
3535
imports = ["."],
3636
deps = [
37+
"@{name}//typing_extensions",
3738
"@{name}//zipp",
3839
],
3940
)
4041
""".format(
4142
name = rctx.name,
4243
))
4344

45+
rctx.download_and_extract(
46+
output = "typing_extensions",
47+
sha256 = "c8fd5561e1bd88b743ef2ee065a5e661b2fd7b56e9cbe9ae2aeb928f41438819",
48+
stripPrefix = "typing_extensions-4.5.0/src",
49+
url = "https://github.com/python/typing_extensions/archive/refs/tags/4.5.0.tar.gz",
50+
)
51+
52+
rctx.file("typing_extensions/BUILD.bazel", """
53+
package(default_visibility = ["//visibility:public"])
54+
55+
py_library(
56+
name = "typing_extensions",
57+
srcs = [
58+
"typing_extensions.py",
59+
],
60+
imports = ["."],
61+
)
62+
""")
63+
4464
rctx.download_and_extract(
4565
output = "zipp",
4666
sha256 = "a2e6a09c22d6d36221e2d37f08d9566554f4de9e6e3ed8eb9ddcc0b0440162c0",

0 commit comments

Comments
 (0)