Skip to content

Commit fc3a8e7

Browse files
authored
Merge pull request #4495 from pradyunsg/installed-files-bug-373
Fix for #373
2 parents 9923c1a + 501b774 commit fc3a8e7

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

news/4495.bugfix

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Fix a "No such file or directory" error when using --prefix.

pip/req/req_install.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -789,9 +789,9 @@ def prepend_root(path):
789789
if os.path.isdir(filename):
790790
filename += os.path.sep
791791
new_lines.append(
792-
os.path.relpath(
793-
prepend_root(filename), egg_info_dir)
792+
os.path.relpath(prepend_root(filename), egg_info_dir)
794793
)
794+
ensure_dir(egg_info_dir)
795795
inst_files_path = os.path.join(egg_info_dir, 'installed-files.txt')
796796
with open(inst_files_path, 'w') as f:
797797
f.write('\n'.join(new_lines) + '\n')

0 commit comments

Comments
 (0)