src/pyd/BUILD.bazel
raw| 1 | # On Windows, pybind_extension produces opencc_clib.pyd.dll but Python only |
| 2 | # loads .pyd files. This genrule copies it to opencc_clib.pyd so it can be |
| 3 | # imported when //src/pyd is on sys.path (via py_opencc's imports on Windows). |
| 4 | genrule( |
| 5 | name = "opencc_clib_pyd_copy", |
| 6 | srcs = ["//src:opencc_clib"], |
| 7 | outs = ["opencc_clib.pyd"], |
| 8 | cmd = "cp $< $@", |
| 9 | visibility = [ |
| 10 | "//python/opencc/clib:__pkg__", |
| 11 | "//src:__pkg__", |
| 12 | ], |
| 13 | ) |