MCPcopy Create free account
hub / github.com/numpy/numpy / unpack_targz

Function unpack_targz

tools/openblas_support.py:203–211  ·  view source on GitHub ↗
(fname)

Source from the content-addressed store, hash-verified

201
202
203def 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
214def extract_tarfile_to(tarfileobj, target_path, archive_path):

Callers 1

setup_openblasFunction · 0.85

Calls 4

extract_tarfile_toFunction · 0.85
joinMethod · 0.45
existsMethod · 0.45
openMethod · 0.45

Tested by

no test coverage detected