(self)
| 28 | |
| 29 | class BuildCmd(build, object): |
| 30 | def run(self): |
| 31 | log.info("Creating {}".format(TAR_LZMA_PATH)) |
| 32 | tar_stream = BytesIO() |
| 33 | borders_path = os.path.join(DATA_PATH, "borders") |
| 34 | with chdir(borders_path): |
| 35 | with tarfile.open(fileobj=tar_stream, mode="w") as tar: |
| 36 | for f in os.listdir(borders_path): |
| 37 | tar.add(f) |
| 38 | |
| 39 | tar_stream.seek(0) |
| 40 | with lzma.open(TAR_LZMA_PATH, mode="w") as f: |
| 41 | f.write(tar_stream.read()) |
| 42 | |
| 43 | super(BuildCmd, self).run() |
| 44 | |
| 45 | |
| 46 | class CleanCmd(clean, object): |