saving dependency work

This commit is contained in:
2022-12-10 21:17:54 -06:00
parent bf923c3406
commit c2c19e5382
5636 changed files with 666283 additions and 8587 deletions
@@ -52,7 +52,7 @@ def install(
with TempDirectory(kind="record") as temp_dir:
try:
record_filename = os.path.join(temp_dir.path, 'install-record.txt')
record_filename = os.path.join(temp_dir.path, "install-record.txt")
install_args = make_setuptools_install_args(
setup_py_path,
global_options=global_options,
@@ -77,7 +77,7 @@ def install(
)
if not os.path.exists(record_filename):
logger.debug('Record file %s not found', record_filename)
logger.debug("Record file %s not found", record_filename)
# Signal to the caller that we didn't install the new package
return False
@@ -102,7 +102,7 @@ def install(
for line in record_lines:
directory = os.path.dirname(line)
if directory.endswith('.egg-info'):
if directory.endswith(".egg-info"):
egg_info_dir = prepend_root(directory)
break
else:
@@ -118,13 +118,11 @@ def install(
filename = line.strip()
if os.path.isdir(filename):
filename += os.path.sep
new_lines.append(
os.path.relpath(prepend_root(filename), egg_info_dir)
)
new_lines.append(os.path.relpath(prepend_root(filename), egg_info_dir))
new_lines.sort()
ensure_dir(egg_info_dir)
inst_files_path = os.path.join(egg_info_dir, 'installed-files.txt')
with open(inst_files_path, 'w') as f:
f.write('\n'.join(new_lines) + '\n')
inst_files_path = os.path.join(egg_info_dir, "installed-files.txt")
with open(inst_files_path, "w") as f:
f.write("\n".join(new_lines) + "\n")
return True