When the @six//:six library is used on a target without the `legacy_create_init` flag disabled, the library will not be usable due to __init__.py being empty and the six code will be in six.py. This change forces six to occupy the __init__ name, preventing this file getting created regardless of the `legacy_create_init` setting. See comments onpull/6530/heada74c43bbd9
for context:a74c43bbd9
parent
8c46be0328
commit
23e520e7fc
3 changed files with 7 additions and 7 deletions
@ -1,13 +1,13 @@ |
|||||||
genrule( |
genrule( |
||||||
name = "copy_six", |
name = "copy_six", |
||||||
srcs = ["six-1.10.0/six.py"], |
srcs = ["six-1.12.0/six.py"], |
||||||
outs = ["six.py"], |
outs = ["__init__.py"], |
||||||
cmd = "cp $< $(@)", |
cmd = "cp $< $(@)", |
||||||
) |
) |
||||||
|
|
||||||
py_library( |
py_library( |
||||||
name = "six", |
name = "six", |
||||||
srcs = ["six.py"], |
srcs = ["__init__.py"], |
||||||
srcs_version = "PY2AND3", |
srcs_version = "PY2AND3", |
||||||
visibility = ["//visibility:public"], |
visibility = ["//visibility:public"], |
||||||
) |
) |
||||||
|
Loading…
Reference in new issue