mirror of
https://github.com/python/cpython.git
synced 2025-08-19 08:11:46 +00:00
Fix SF#1566719: not creating site-packages (or other target directory) when
installing .egg-info for a project that contains no modules or packages, while using --root (as in bdist_rpm). (Backport from trunk)
This commit is contained in:
parent
6d97478449
commit
511350bee9
1 changed files with 3 additions and 0 deletions
|
@ -35,6 +35,9 @@ class install_egg_info(Command):
|
|||
dir_util.remove_tree(target, dry_run=self.dry_run)
|
||||
elif os.path.exists(target):
|
||||
self.execute(os.unlink,(self.target,),"Removing "+target)
|
||||
elif not os.path.isdir(self.install_dir):
|
||||
self.execute(os.makedirs, (self.install_dir,),
|
||||
"Creating "+self.install_dir)
|
||||
log.info("Writing %s", target)
|
||||
if not self.dry_run:
|
||||
f = open(target, 'w')
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue