Skip to content

Commit

Permalink
further fix windows
Browse files Browse the repository at this point in the history
  • Loading branch information
mavenlin committed Dec 6, 2023
1 parent 8e79848 commit 183c96e
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 4 deletions.
4 changes: 2 additions & 2 deletions gen_repo/gen_py.py
Original file line number Diff line number Diff line change
Expand Up @@ -87,10 +87,10 @@ def main(_):

functionals.append((p, ext_params, ext_params_descriptions, info))

with open(FLAGS.template, "rt") as f:
with open(FLAGS.template, "rt", encoding="utf8") as f:
py_template = Template(f.read(), trim_blocks=True, lstrip_blocks=True)
py_code = py_template.render(functionals=functionals, zip=zip)
with open(FLAGS.output, "wt") as out:
with open(FLAGS.output, "wt", encoding="utf8") as out:
out.write(py_code)


Expand Down
1 change: 1 addition & 0 deletions gen_repo/libxc/build.jinja
Original file line number Diff line number Diff line change
Expand Up @@ -110,6 +110,7 @@ genrule(
srcs = [":libxc.so"],
outs = ["libxc.pyd"],
cmd = "cp $< $@",
visibility = ["//visibility:public"],
)

py_library(
Expand Down
6 changes: 4 additions & 2 deletions gen_repo/wheel.BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,8 @@ py_wheel(
"@jax_xc_repo//jax_xc:utils",
"@jax_xc_repo//jax_xc/impl",
"@jax_xc_repo//jax_xc/libxc",
"@jax_xc_repo//jax_xc/libxc:libxc.so",
],
] + select({
"@platforms//os:windows": ["@jax_xc_repo//jax_xc/libxc:gen_pyd"],
"//conditions:default": ["@jax_xc_repo//jax_xc/libxc:libxc.so"],
}),
)

0 comments on commit 183c96e

Please sign in to comment.