Ensure the egg_info directory exists before trying to write to it.

This commit is contained in:
Pradyun S. Gedam 2017-05-18 16:55:55 +05:30
parent dbb5212aa6
commit c6299ea040
1 changed files with 2 additions and 2 deletions

View File

@ -786,9 +786,9 @@ class InstallRequirement(object):
if os.path.isdir(filename):
filename += os.path.sep
new_lines.append(
os.path.relpath(
prepend_root(filename), egg_info_dir)
os.path.relpath(prepend_root(filename), egg_info_dir)
)
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')