|
42 | 42 | "manylinux2014_aarch64": "aarch64-unknown-linux-gnu", |
43 | 43 | "macosx_11_0_arm64": "aarch64-apple-darwin", |
44 | 44 | "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", |
45 | 49 | } |
46 | 50 |
|
47 | 51 |
|
@@ -87,10 +91,18 @@ def __repr__(self): |
87 | 91 | return "{{\n{}\n}}".format(textwrap.indent("\n".join(parts), prefix=" ")) |
88 | 92 |
|
89 | 93 |
|
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 |
94 | 106 |
|
95 | 107 |
|
96 | 108 | def _map( |
@@ -172,8 +184,6 @@ def main(): |
172 | 184 |
|
173 | 185 | platforms = _get_platforms( |
174 | 186 | u["filename"], |
175 | | - args.name, |
176 | | - args.version, |
177 | 187 | u["python_version"], |
178 | 188 | ) |
179 | 189 |
|
|
0 commit comments