| 35 | |
| 36 | |
| 37 | def _download_and_extract(root, url, version): |
| 38 | root = os.getcwd() if root is None or root == "." else root |
| 39 | builtins.print(url) |
| 40 | with url_lib.urlopen(url) as response: |
| 41 | data = response.read() |
| 42 | with zipfile.ZipFile(io.BytesIO(data), "r") as wheel: |
| 43 | for zip_info in wheel.infolist(): |
| 44 | # Ignore dist info since we are merging multiple wheels |
| 45 | if ".dist-info/" in zip_info.filename: |
| 46 | continue |
| 47 | builtins.print("\t" + zip_info.filename) |
| 48 | wheel.extract(zip_info.filename, root) |
| 49 | |
| 50 | |
| 51 | def main(root): |