(from_, to_)
| 749 | with zipfile.ZipFile(path, 'w', self.wheel_compression, self.wheel_compresslevel) as z: |
| 750 | |
| 751 | def add(from_, to_): |
| 752 | if isinstance(from_, str): |
| 753 | z.write(from_, to_) |
| 754 | record.add_file(from_, to_) |
| 755 | elif isinstance(from_, bytes): |
| 756 | z.writestr(to_, from_) |
| 757 | record.add_content(from_, to_) |
| 758 | else: |
| 759 | assert 0 |
| 760 | |
| 761 | def add_str(content, to_): |
| 762 | add(content.encode('utf8'), to_) |