(working_dir: Path, url: str, expected_shasum: str)
| 298 | |
| 299 | |
| 300 | def download_and_unpack(working_dir: Path, url: str, expected_shasum: str): |
| 301 | with tempfile.NamedTemporaryFile( |
| 302 | suffix=".tar.gz", delete_on_close=False |
| 303 | ) as tmp_file: |
| 304 | with urlopen(url) as response: |
| 305 | shutil.copyfileobj(response, tmp_file) |
| 306 | tmp_file.close() |
| 307 | check_shasum(tmp_file.name, expected_shasum) |
| 308 | shutil.unpack_archive(tmp_file.name, working_dir) |
| 309 | |
| 310 | |
| 311 | def should_build_library(prefix, name, config, quiet): |
no test coverage detected
searching dependent graphs…