(fname)
| 201 | |
| 202 | |
| 203 | def unpack_targz(fname): |
| 204 | target = os.path.join(gettempdir(), 'openblas') |
| 205 | if not os.path.exists(target): |
| 206 | os.mkdir(target) |
| 207 | with tarfile.open(fname, 'r') as zf: |
| 208 | # Strip common prefix from paths when unpacking |
| 209 | prefix = os.path.commonpath(zf.getnames()) |
| 210 | extract_tarfile_to(zf, target, prefix) |
| 211 | return target |
| 212 | |
| 213 | |
| 214 | def extract_tarfile_to(tarfileobj, target_path, archive_path): |
no test coverage detected