Skip to content

Commit ff261d2

Browse files
authored
Merge pull request #54 from junyer/master
Support 32-bit Python/Windows by using `@platforms`.
2 parents b162c7c + 105668e commit ff261d2

File tree

1 file changed

+3
-9
lines changed

1 file changed

+3
-9
lines changed

py/BUILD.tpl

+3-9
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ toolchain(
3535
cc_import(
3636
name = "python_lib",
3737
interface_library = select({
38-
":windows": ":python_import_lib",
38+
"@platforms//os:windows": ":python_import_lib",
3939
# A placeholder for Unix platforms which makes --no_build happy.
4040
"//conditions:default": "not-existing.lib",
4141
}),
@@ -46,7 +46,7 @@ cc_library(
4646
name = "python_headers",
4747
hdrs = [":python_include"],
4848
deps = select({
49-
":windows": [":python_lib"],
49+
"@platforms//os:windows": [":python_lib"],
5050
"//conditions:default": [],
5151
}),
5252
includes = ["python_include"],
@@ -56,19 +56,13 @@ cc_library(
5656
name = "python_embed",
5757
hdrs = [":python_include"],
5858
deps = select({
59-
":windows": [":python_lib"],
59+
"@platforms//os:windows": [":python_lib"],
6060
"//conditions:default": [],
6161
}),
6262
includes = ["python_include"],
6363
linkopts = ["%{PYTHON_EMBED_LINKOPTS}"],
6464
copts = ["%{PYTHON_EMBED_COPTS}"],
6565
)
6666

67-
config_setting(
68-
name = "windows",
69-
values = {"cpu": "x64_windows"},
70-
visibility = ["//visibility:public"],
71-
)
72-
7367
%{PYTHON_INCLUDE_GENRULE}
7468
%{PYTHON_IMPORT_LIB_GENRULE}

0 commit comments

Comments
 (0)