diff --git a/maple2jax/libxc/build.jinja b/maple2jax/libxc/build.jinja index 616e9c4..9793683 100644 --- a/maple2jax/libxc/build.jinja +++ b/maple2jax/libxc/build.jinja @@ -105,12 +105,22 @@ pybind_extension( visibility = ["//visibility:public"], ) +genrule( + name = "gen_libxc_pyd", + srcs = [":libxc.so"], + outs = ["libxc.pyd"], + cmd = "cp $< $@", +) + py_library( name = "libxc", srcs = glob( ["*.py"], exclude=["gen_build.py", "wrap.py"], ), - data = [":libxc.so"], + data = select({ + "@platforms//os:windows": [":gen_libxc_pyd"], + "//conditions:default": [":libxc.so"], + }), visibility = ["//visibility:public"], )