|
6 | 6 |
|
7 | 7 | bazel_dep(name = "bazel_features", version = "1.21.0") |
8 | 8 | bazel_dep(name = "bazel_skylib", version = "1.8.2") |
9 | | -bazel_dep(name = "rules_cc", version = "0.1.5") |
| 9 | +bazel_dep(name = "package_metadata", version = "0.0.7") |
10 | 10 | bazel_dep(name = "platforms", version = "0.0.11") |
| 11 | +bazel_dep(name = "rules_cc", version = "0.1.5") |
11 | 12 |
|
12 | 13 | # Those are loaded only when using py_proto_library |
13 | 14 | # Use py_proto_library directly from protobuf repository |
@@ -64,141 +65,6 @@ register_toolchains("@pythons_hub//:all") |
64 | 65 | # Install twine for our own runfiles wheel publishing and allow bzlmod users to use it. |
65 | 66 |
|
66 | 67 | pip = use_extension("//python/extensions:pip.bzl", "pip") |
67 | | - |
68 | | -# NOTE @aignas 2025-07-06: we define these platforms to keep backwards compatibility. Whilst we |
69 | | -# stabilize the API this list may be updated with a mention in the CHANGELOG. |
70 | | -[ |
71 | | - pip.default( |
72 | | - arch_name = cpu, |
73 | | - config_settings = [ |
74 | | - "@platforms//cpu:{}".format(cpu), |
75 | | - "@platforms//os:linux", |
76 | | - "//python/config_settings:_is_py_freethreaded_{}".format( |
77 | | - "yes" if freethreaded else "no", |
78 | | - ), |
79 | | - ], |
80 | | - env = {"platform_version": "0"}, |
81 | | - marker = "python_version >= '3.13'" if freethreaded else "", |
82 | | - os_name = "linux", |
83 | | - platform = "linux_{}{}".format(cpu, freethreaded), |
84 | | - whl_abi_tags = ["cp{major}{minor}t"] if freethreaded else [ |
85 | | - "abi3", |
86 | | - "cp{major}{minor}", |
87 | | - ], |
88 | | - whl_platform_tags = [ |
89 | | - "linux_{}".format(cpu), |
90 | | - "manylinux_*_{}".format(cpu), |
91 | | - ], |
92 | | - ) |
93 | | - for cpu in [ |
94 | | - "x86_64", |
95 | | - "aarch64", |
96 | | - ] |
97 | | - for freethreaded in [ |
98 | | - "", |
99 | | - "_freethreaded", |
100 | | - ] |
101 | | -] |
102 | | - |
103 | | -[ |
104 | | - pip.default( |
105 | | - arch_name = cpu, |
106 | | - config_settings = [ |
107 | | - "@platforms//cpu:{}".format(cpu), |
108 | | - "@platforms//os:osx", |
109 | | - "//python/config_settings:_is_py_freethreaded_{}".format( |
110 | | - "yes" if freethreaded else "no", |
111 | | - ), |
112 | | - ], |
113 | | - # We choose the oldest non-EOL version at the time when we release `rules_python`. |
114 | | - # See https://endoflife.date/macos |
115 | | - env = {"platform_version": "14.0"}, |
116 | | - marker = "python_version >= '3.13'" if freethreaded else "", |
117 | | - os_name = "osx", |
118 | | - platform = "osx_{}{}".format(cpu, freethreaded), |
119 | | - whl_abi_tags = ["cp{major}{minor}t"] if freethreaded else [ |
120 | | - "abi3", |
121 | | - "cp{major}{minor}", |
122 | | - ], |
123 | | - whl_platform_tags = [ |
124 | | - "macosx_*_{}".format(suffix) |
125 | | - for suffix in platform_tag_cpus |
126 | | - ], |
127 | | - ) |
128 | | - for cpu, platform_tag_cpus in { |
129 | | - "aarch64": [ |
130 | | - "universal2", |
131 | | - "arm64", |
132 | | - ], |
133 | | - "x86_64": [ |
134 | | - "universal2", |
135 | | - "x86_64", |
136 | | - ], |
137 | | - }.items() |
138 | | - for freethreaded in [ |
139 | | - "", |
140 | | - "_freethreaded", |
141 | | - ] |
142 | | -] |
143 | | - |
144 | | -[ |
145 | | - pip.default( |
146 | | - arch_name = cpu, |
147 | | - config_settings = [ |
148 | | - "@platforms//cpu:{}".format(cpu), |
149 | | - "@platforms//os:windows", |
150 | | - "//python/config_settings:_is_py_freethreaded_{}".format( |
151 | | - "yes" if freethreaded else "no", |
152 | | - ), |
153 | | - ], |
154 | | - env = {"platform_version": "0"}, |
155 | | - marker = "python_version >= '3.13'" if freethreaded else "", |
156 | | - os_name = "windows", |
157 | | - platform = "windows_{}{}".format(cpu, freethreaded), |
158 | | - whl_abi_tags = ["cp{major}{minor}t"] if freethreaded else [ |
159 | | - "abi3", |
160 | | - "cp{major}{minor}", |
161 | | - ], |
162 | | - whl_platform_tags = whl_platform_tags, |
163 | | - ) |
164 | | - for cpu, whl_platform_tags in { |
165 | | - "x86_64": ["win_amd64"], |
166 | | - }.items() |
167 | | - for freethreaded in [ |
168 | | - "", |
169 | | - "_freethreaded", |
170 | | - ] |
171 | | -] |
172 | | - |
173 | | -[ |
174 | | - pip.default( |
175 | | - arch_name = cpu, |
176 | | - config_settings = [ |
177 | | - "@platforms//cpu:{}".format(cpu), |
178 | | - "@platforms//os:windows", |
179 | | - "//python/config_settings:_is_py_freethreaded_{}".format( |
180 | | - "yes" if freethreaded else "no", |
181 | | - ), |
182 | | - ], |
183 | | - env = {"platform_version": "0"}, |
184 | | - marker = "python_version >= '3.13'" if freethreaded else "python_version >= '3.11'", |
185 | | - os_name = "windows", |
186 | | - platform = "windows_{}{}".format(cpu, freethreaded), |
187 | | - whl_abi_tags = ["cp{major}{minor}t"] if freethreaded else [ |
188 | | - "abi3", |
189 | | - "cp{major}{minor}", |
190 | | - ], |
191 | | - whl_platform_tags = whl_platform_tags, |
192 | | - ) |
193 | | - for cpu, whl_platform_tags in { |
194 | | - "aarch64": ["win_arm64"], |
195 | | - }.items() |
196 | | - for freethreaded in [ |
197 | | - "", |
198 | | - "_freethreaded", |
199 | | - ] |
200 | | -] |
201 | | - |
202 | 68 | pip.parse( |
203 | 69 | hub_name = "rules_python_publish_deps", |
204 | 70 | python_version = "3.11", |
@@ -246,6 +112,8 @@ use_repo( |
246 | 112 | "somepkg_with_build_files", |
247 | 113 | "whl_library_extras_direct_dep", |
248 | 114 | "whl_with_build_files", |
| 115 | + "whl_with_data1", |
| 116 | + "whl_with_data2", |
249 | 117 | ) |
250 | 118 |
|
251 | 119 | dev_rules_python_config = use_extension( |
|
0 commit comments