MCPcopy Create free account
hub / github.com/RenderKit/oidn / create_package

Function create_package

scripts/common.py:47–55  ·  view source on GitHub ↗
(filename, input_dir)

Source from the content-addressed store, hash-verified

45 package.close()
46
47def create_package(filename, input_dir):
48 print('Creating package:', filename)
49 if filename.endswith('.tar.gz'):
50 with tarfile.open(filename, "w:gz") as package:
51 package.add(input_dir, arcname=os.path.basename(input_dir))
52 elif filename.endswith('.zip'):
53 shutil.make_archive(filename[:-4], 'zip', os.path.dirname(input_dir), os.path.basename(input_dir))
54 else:
55 raise Exception('unsupported package format')
56
57# Detect the OS and architecture
58OS = {'Windows' : 'windows', 'Linux' : 'linux', 'Darwin' : 'macos'}[platform.system()]

Callers 2

build.pyFile · 0.85
build_src.pyFile · 0.85

Calls 4

printFunction · 0.85
ExceptionFunction · 0.85
openMethod · 0.45
addMethod · 0.45

Tested by

no test coverage detected