(self)
| 205 | """ |
| 206 | |
| 207 | def run(self): |
| 208 | if FORCE_BUILD: |
| 209 | return super().run() |
| 210 | |
| 211 | wheel_url, wheel_filename = get_wheel_url() |
| 212 | print("Guessing wheel URL: ", wheel_url) |
| 213 | try: |
| 214 | urllib.request.urlretrieve(wheel_url, wheel_filename) |
| 215 | |
| 216 | # Make the archive |
| 217 | # Lifted from the root wheel processing command |
| 218 | # https://github.com/pypa/wheel/blob/cf71108ff9f6ffc36978069acb28824b44ae028e/src/wheel/bdist_wheel.py#LL381C9-L381C85 |
| 219 | if not os.path.exists(self.dist_dir): |
| 220 | os.makedirs(self.dist_dir) |
| 221 | |
| 222 | impl_tag, abi_tag, plat_tag = self.get_tag() |
| 223 | archive_basename = f"{self.wheel_dist_name}-{impl_tag}-{abi_tag}-{plat_tag}" |
| 224 | |
| 225 | wheel_path = os.path.join(self.dist_dir, archive_basename + ".whl") |
| 226 | print("Raw wheel path", wheel_path) |
| 227 | shutil.move(wheel_filename, wheel_path) |
| 228 | except urllib.error.HTTPError: |
| 229 | print("Precompiled wheel not found. Building from source...") |
| 230 | # If the wheel could not be downloaded, build from source |
| 231 | super().run() |
| 232 | |
| 233 | |
| 234 | setup( |
no test coverage detected