]> granicus.if.org Git - python/commitdiff
Fix SF#1566719: not creating site-packages (or other target directory) when
authorPhillip J. Eby <pje@telecommunity.com>
Fri, 10 Nov 2006 00:33:36 +0000 (00:33 +0000)
committerPhillip J. Eby <pje@telecommunity.com>
Fri, 10 Nov 2006 00:33:36 +0000 (00:33 +0000)
installing .egg-info for a project that contains no modules or packages,
while using --root (as in bdist_rpm).

Lib/distutils/command/install_egg_info.py

index c31ac29668337739f3d48cdc5b78ab87f7e974d2..c8880310dfcf645fb5728dfb5ad90de79d24c17a 100644 (file)
@@ -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')