summaryrefslogtreecommitdiffstats
path: root/Lib/distutils
diff options
context:
space:
mode:
authorPhillip J. Eby <pje@telecommunity.com>2006-11-10 00:33:36 (GMT)
committerPhillip J. Eby <pje@telecommunity.com>2006-11-10 00:33:36 (GMT)
commit305e778a82ad655a36075eaefe557625dc36a707 (patch)
treeda4a0eee0b46236e27d9abc6d4b0d7bf10c97742 /Lib/distutils
parent978d8286ae36ac3570d1a2c6f48187ad9c0919c7 (diff)
downloadcpython-305e778a82ad655a36075eaefe557625dc36a707.zip
cpython-305e778a82ad655a36075eaefe557625dc36a707.tar.gz
cpython-305e778a82ad655a36075eaefe557625dc36a707.tar.bz2
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).
Diffstat (limited to 'Lib/distutils')
-rw-r--r--Lib/distutils/command/install_egg_info.py3
1 files changed, 3 insertions, 0 deletions
diff --git a/Lib/distutils/command/install_egg_info.py b/Lib/distutils/command/install_egg_info.py
index c31ac29..c888031 100644
--- a/Lib/distutils/command/install_egg_info.py
+++ b/Lib/distutils/command/install_egg_info.py
@@ -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')