Skip to content

Commit 0651c56

Browse files
Replace outdated select() on --cpu with platform API equivalent.
change selects to be based on the platform constraints PiperOrigin-RevId: 757948613
1 parent 26cc90c commit 0651c56

File tree

1 file changed

+16
-4
lines changed

1 file changed

+16
-4
lines changed

python/BUILD.bazel

Lines changed: 16 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -52,20 +52,26 @@ config_setting(
5252

5353
config_setting(
5454
name = "full_api_3.9_win32",
55+
constraint_values = [
56+
"@platforms//cpu:x86_32",
57+
"@platforms//os:windows",
58+
],
5559
flag_values = {
5660
":limited_api": "False",
5761
":python_version": "39",
5862
},
59-
values = {"cpu": "win32"},
6063
)
6164

6265
config_setting(
6366
name = "full_api_3.9_win64",
67+
constraint_values = [
68+
"@platforms//cpu:x86_64",
69+
"@platforms//os:windows",
70+
],
6471
flag_values = {
6572
":limited_api": "False",
6673
":python_version": "39",
6774
},
68-
values = {"cpu": "win64"},
6975
)
7076

7177
selects.config_setting_group(
@@ -78,20 +84,26 @@ selects.config_setting_group(
7884

7985
config_setting(
8086
name = "limited_api_3.10_win32",
87+
constraint_values = [
88+
"@platforms//cpu:x86_32",
89+
"@platforms//os:windows",
90+
],
8191
flag_values = {
8292
":limited_api": "True",
8393
":python_version": "310",
8494
},
85-
values = {"cpu": "win32"},
8695
)
8796

8897
config_setting(
8998
name = "limited_api_3.10_win64",
99+
constraint_values = [
100+
"@platforms//cpu:x86_64",
101+
"@platforms//os:windows",
102+
],
90103
flag_values = {
91104
":limited_api": "True",
92105
":python_version": "310",
93106
},
94-
values = {"cpu": "win64"},
95107
)
96108

97109
selects.config_setting_group(

0 commit comments

Comments
 (0)