Commit c7e22a45 authored by Godefroid Chapelle's avatar Godefroid Chapelle

Problem: egg installation fails with FileNotFoundError

Solution: create missing dir before `os.rename`
parent 3acbfa2d
Fix FileNotFoundError when renaming files into missing directory.
......@@ -1792,6 +1792,9 @@ def make_egg_after_pip_install(dest, distinfo_dir):
continue
egg_entry = os.path.join(egg_dir, entry)
if os.path.exists(dest_entry) and not os.path.exists(egg_entry):
egg_entry_dir = os.path.dirname(egg_entry)
if not os.path.exists(egg_entry_dir):
os.makedirs(egg_entry_dir)
os.rename(dest_entry, egg_entry)
return [egg_dir]
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment