MCPcopy Create free account
hub / github.com/cloud-annotations/cloud-annotations / move_zip

Function move_zip

setup.py:45–52  ·  view source on GitHub ↗
(zip_file, name)

Source from the content-addressed store, hash-verified

43
44
45def move_zip(zip_file, name):
46 with tarfile.open('dist/{}-0.1.tar.gz'.format(name)) as tar:
47 for member in tar.getmembers():
48 if member.name.startswith('{}-0.1/{}/'.format(name, name)) and member.isfile():
49 print('in: {}'.format(member.name))
50 f = tar.extractfile(member)
51 rel_path = os.path.relpath(member.name, '{}-0.1'.format(name))
52 zip_file.writestr(rel_path, f.read())
53
54
55def pack():

Callers 1

packFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected