

def zip(target, source, env):
    compression = env.get('ZIPCOMPRESSION', 0)
    zf = zipfile.ZipFile(str(target[0]), 'w', compression)
    for s in source:
        if s.isdir():
            for (dirpath, dirnames, filenames) in os.walk(str(s)):
                for fname in filenames:
                    path = os.path.join(dirpath, fname)
                    if os.path.isfile(path):
                        zf.write(path, os.path.relpath(path, str(compression.get('ZIPROOT', ''))))
        else:
            zf.write(str(s), os.path.relpath(str(s), str(env.get('ZIPROOT', ''))))
    zf.close()

dataset/ETHPy150Open kayhayen/Nuitka/nuitka/build/inline_copy/lib/scons-2.3.2/SCons/Tool/zip.py zip/VarMisuse@129/144 `env`->`compression`