Merge pull request #54 from junyer/master
Support 32-bit Python/Windows by using `@platforms`.
diff --git a/py/BUILD.tpl b/py/BUILD.tpl
index 653fe38..7c06d41 100644
--- a/py/BUILD.tpl
+++ b/py/BUILD.tpl
@@ -35,7 +35,7 @@
cc_import(
name = "python_lib",
interface_library = select({
- ":windows": ":python_import_lib",
+ "@platforms//os:windows": ":python_import_lib",
# A placeholder for Unix platforms which makes --no_build happy.
"//conditions:default": "not-existing.lib",
}),
@@ -46,7 +46,7 @@
name = "python_headers",
hdrs = [":python_include"],
deps = select({
- ":windows": [":python_lib"],
+ "@platforms//os:windows": [":python_lib"],
"//conditions:default": [],
}),
includes = ["python_include"],
@@ -56,7 +56,7 @@
name = "python_embed",
hdrs = [":python_include"],
deps = select({
- ":windows": [":python_lib"],
+ "@platforms//os:windows": [":python_lib"],
"//conditions:default": [],
}),
includes = ["python_include"],
@@ -64,11 +64,5 @@
copts = ["%{PYTHON_EMBED_COPTS}"],
)
-config_setting(
- name = "windows",
- values = {"cpu": "x64_windows"},
- visibility = ["//visibility:public"],
-)
-
%{PYTHON_INCLUDE_GENRULE}
%{PYTHON_IMPORT_LIB_GENRULE}