Skip to content

Commit c2663ba

Browse files
committed
chore: add coverage deps
1 parent a90dd54 commit c2663ba

File tree

2 files changed

+28
-6
lines changed

2 files changed

+28
-6
lines changed

python/private/coverage_deps.bzl

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -80,11 +80,23 @@ _coverage_deps = {
8080
"https://files.pythonhosted.org/packages/b9/67/e1413d5a8591622a46dd04ff80873b04c849268831ed5c304c16433e7e30/coverage-7.6.1-cp313-cp313-macosx_11_0_arm64.whl",
8181
"a6d3adcf24b624a7b778533480e32434a39ad8fa30c315208f6d3e5542aeb6e9",
8282
),
83+
"aarch64-apple-darwin-freethreaded": (
84+
"https://files.pythonhosted.org/packages/c4/ae/b5d58dff26cade02ada6ca612a76447acd69dccdbb3a478e9e088eb3d4b9/coverage-7.6.1-cp313-cp313t-macosx_11_0_arm64.whl",
85+
"502753043567491d3ff6d08629270127e0c31d4184c4c8d98f92c26f65019962",
86+
),
8387
"aarch64-unknown-linux-gnu": (
88+
"https://files.pythonhosted.org/packages/14/5b/9dec847b305e44a5634d0fb8498d135ab1d88330482b74065fcec0622224/coverage-7.6.1-cp313-cp313-manylinux_2_17_aarch64.manylinux2014_aarch64.whl",
89+
"d0c212c49b6c10e6951362f7c6df3329f04c2b1c28499563d4035d964ab8e08c",
90+
),
91+
"aarch64-unknown-linux-gnu-freethreaded": (
8492
"https://files.pythonhosted.org/packages/b8/d7/62095e355ec0613b08dfb19206ce3033a0eedb6f4a67af5ed267a8800642/coverage-7.6.1-cp313-cp313t-manylinux_2_17_aarch64.manylinux2014_aarch64.whl",
8593
"6a89ecca80709d4076b95f89f308544ec8f7b4727e8a547913a35f16717856cb",
8694
),
8795
"x86_64-unknown-linux-gnu": (
96+
"https://files.pythonhosted.org/packages/f7/95/d2fd31f1d638df806cae59d7daea5abf2b15b5234016a5ebb502c2f3f7ee/coverage-7.6.1-cp313-cp313-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl",
97+
"78b260de9790fd81e69401c2dc8b17da47c8038176a79092a89cb2b7d945d060",
98+
),
99+
"x86_64-unknown-linux-gnu-freethreaded": (
88100
"https://files.pythonhosted.org/packages/8b/61/a7a6a55dd266007ed3b1df7a3386a0d760d014542d72f7c2c6938483b7bd/coverage-7.6.1-cp313-cp313t-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl",
89101
"13b0a73a0896988f053e4fbb7de6d93388e6dd292b0d87ee51d106f2c11b465b",
90102
),

tools/private/update_deps/update_coverage_deps.py

Lines changed: 16 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,10 @@
4242
"manylinux2014_aarch64": "aarch64-unknown-linux-gnu",
4343
"macosx_11_0_arm64": "aarch64-apple-darwin",
4444
"macosx_10_9_x86_64": "x86_64-apple-darwin",
45+
("t", "manylinux2014_x86_64"): "x86_64-unknown-linux-gnu-freethreaded",
46+
("t", "manylinux2014_aarch64"): "aarch64-unknown-linux-gnu-freethreaded",
47+
("t", "macosx_11_0_arm64"): "aarch64-apple-darwin-freethreaded",
48+
("t", "macosx_10_9_x86_64"): "x86_64-apple-darwin-freethreaded",
4549
}
4650

4751

@@ -87,10 +91,18 @@ def __repr__(self):
8791
return "{{\n{}\n}}".format(textwrap.indent("\n".join(parts), prefix=" "))
8892

8993

90-
def _get_platforms(filename: str, name: str, version: str, python_version: str):
91-
return filename[
92-
len(f"{name}-{version}-{python_version}-{python_version}-") : -len(".whl")
93-
].split(".")
94+
def _get_platforms(filename: str, python_version: str):
95+
name, _, tail = filename.partition("-")
96+
version, _, tail = tail.partition("-")
97+
got_python_version, _, tail = tail.partition("-")
98+
if python_version != got_python_version:
99+
return []
100+
abi, _, tail = tail.partition("-")
101+
102+
platforms, _, tail = tail.rpartition(".")
103+
platforms = platforms.split(".")
104+
105+
return [("t", p) for p in platforms] if abi.endswith("t") else platforms
94106

95107

96108
def _map(
@@ -172,8 +184,6 @@ def main():
172184

173185
platforms = _get_platforms(
174186
u["filename"],
175-
args.name,
176-
args.version,
177187
u["python_version"],
178188
)
179189

0 commit comments

Comments
 (0)