From 9053c2405888879f519b5d98c490c216074e188a Mon Sep 17 00:00:00 2001 From: Mariusz Glebocki Date: Sun, 4 Apr 2021 02:06:30 +0200 Subject: [PATCH] Add `six` Python package as `anytree` dependency --- WORKSPACE | 10 ++++++++++ bazel/python_anytree.BUILD | 4 +++- bazel/python_six.BUILD | 10 ++++++++++ 3 files changed, 23 insertions(+), 1 deletion(-) create mode 100644 bazel/python_six.BUILD diff --git a/WORKSPACE b/WORKSPACE index 59a609417..b9a60d854 100644 --- a/WORKSPACE +++ b/WORKSPACE @@ -187,6 +187,16 @@ http_archive( ], ) +http_archive( + name = "python_six", + sha256 = "30639c035cdb23534cd4aa2dd52c3bf48f06e5f4a941509c8bafd8ce11080259", + build_file = "//bazel:python_six.BUILD", + strip_prefix = "six-1.15.0", + urls = [ + "https://files.pythonhosted.org/packages/6b/34/415834bfdafca3c5f451532e8a8d9ba89a21c9743a0c59fbd0205c7f9426/six-1.15.0.tar.gz", + ], +) + http_archive( name = "python_anytree", sha256 = "79ee0cc74456950003287b0b5c7b76b7d09435563a31d9e553da484325043e1f", diff --git a/bazel/python_anytree.BUILD b/bazel/python_anytree.BUILD index 48f27d9a7..07c4aa7e6 100644 --- a/bazel/python_anytree.BUILD +++ b/bazel/python_anytree.BUILD @@ -39,5 +39,7 @@ py_library( visibility = ["//visibility:public"], srcs_version = "PY3", imports = ["."], - deps = [] + deps = [ + "@python_six//:six", + ] ) diff --git a/bazel/python_six.BUILD b/bazel/python_six.BUILD new file mode 100644 index 000000000..4672576c0 --- /dev/null +++ b/bazel/python_six.BUILD @@ -0,0 +1,10 @@ +load("@rules_python//python:defs.bzl", "py_library") + +licenses(["unencumbered"]) # MIT + +py_library( + name = "six", + srcs = ["six.py"], + visibility = ["//visibility:public"], + srcs_version = "PY3", +)