six.BUILD 544 B

12345678910111213141516171819
  1. load("@rules_python//python:defs.bzl", "py_library")
  2. # Consume `six.py` as `__init__.py` for compatibility
  3. # with `--incompatible_default_to_explicit_init_py`.
  4. # https://github.com/protocolbuffers/protobuf/pull/6795#issuecomment-546060749
  5. # https://github.com/bazelbuild/bazel/issues/10076
  6. genrule(
  7. name = "copy_six",
  8. srcs = ["six-1.12.0/six.py"],
  9. outs = ["__init__.py"],
  10. cmd = "cp $< $(@)",
  11. )
  12. py_library(
  13. name = "six",
  14. srcs = ["__init__.py"],
  15. srcs_version = "PY2AND3",
  16. visibility = ["//visibility:public"],
  17. )