You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

21 lines
548 B
Python

# Copyright (C) 2019-2020 Intel Corporation
#
# SPDX-License-Identifier: MIT
import inspect
import os, os.path as osp
import zipfile
def current_function_name(depth=1):
return inspect.getouterframes(inspect.currentframe())[depth].function
def make_zip_archive(src_path, dst_path):
with zipfile.ZipFile(dst_path, 'w') as archive:
for (dirpath, _, filenames) in os.walk(src_path):
for name in filenames:
path = osp.join(dirpath, name)
archive.write(path, osp.relpath(path, src_path))