MCPcopy Create free account
hub / github.com/catboost/catboost / make_record

Function make_record

catboost/python-package/mk_wheel.py:228–240  ·  view source on GitHub ↗
(dir_path, dist_info_dir)

Source from the content-addressed store, hash-verified

226
227
228def make_record(dir_path, dist_info_dir):
229 record_filename = os.path.join(dist_info_dir, 'RECORD')
230 with open(record_filename, 'w') as record:
231 wheel_items = []
232 for root, dirnames, filenames in os.walk(dir_path):
233 for filename in filenames:
234 wheel_items.append(os.path.join(root, filename))
235 tmp_dir_length = len(dir_path) + 1
236 for item in wheel_items:
237 if item != record_filename:
238 record.write(item[tmp_dir_length:] + ',sha256=' + urlsafe_b64encode(calc_sha256_digest(item)).decode('ascii').rstrip('=') + ',' + str(os.path.getsize(item)) + '\n')
239 else:
240 record.write(item[tmp_dir_length:] + ',,\n')
241
242
243def make_wheel(wheel_name, pkg_name, ver, build_system, arc_root, dst_so_modules, should_build_widget):

Callers 1

make_wheelFunction · 0.85

Calls 8

lenFunction · 0.85
calc_sha256_digestFunction · 0.85
openFunction · 0.50
strClass · 0.50
joinMethod · 0.45
appendMethod · 0.45
writeMethod · 0.45
decodeMethod · 0.45

Tested by

no test coverage detected