]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
corrected backport. 'patch' made me sad, it got it horribly wrong
authorAnthony Baxter <anthonybaxter@gmail.com>
Thu, 18 Apr 2002 02:32:25 +0000 (02:32 +0000)
committerAnthony Baxter <anthonybaxter@gmail.com>
Thu, 18 Apr 2002 02:32:25 +0000 (02:32 +0000)
(no idea why, or how)

backport theller's patch

Set the warn_dir option to 0 before running the install command.
This suppresses bogus warnings about modules installed into a directory
not in sys.path.

Bugfix candidate.

Lib/distutils/command/bdist_dumb.py
Lib/distutils/command/bdist_wininst.py

index 13fe27c3aaa656bbf8ad4767c5a5993819ce6e0b..5dd64a6e3b1eedc5fe4e2c13897134b1ce10d0d4 100644 (file)
@@ -75,13 +75,13 @@ class bdist_dumb (Command):
 
         install = self.reinitialize_command('install', reinit_subcommands=1)
         install.root = self.bdist_dir
+        install.warn_dir = 0
 
         self.announce("installing to %s" % self.bdist_dir)
         self.run_command('install')
 
         # And make an archive relative to the root of the
         # pseudo-installation tree.
-        install.warn_dir = 0
         archive_basename = "%s.%s" % (self.distribution.get_fullname(),
                                       self.plat_name)
         self.make_archive(os.path.join(self.dist_dir, archive_basename),
index 58d3c9372593df3737d6ad36a60fe3318d35e2b2..8b72bcba34da64e97f3f8a98c5016ec00c558278 100644 (file)
@@ -84,6 +84,7 @@ class bdist_wininst (Command):
 
         install = self.reinitialize_command('install')
         install.root = self.bdist_dir
+        install.warn_dir = 0
 
         install_lib = self.reinitialize_command('install_lib')
         # we do not want to include pyc or pyo files
@@ -98,7 +99,6 @@ class bdist_wininst (Command):
                 value = value + '/Include/$dist_name'
             setattr(install,
                     'install_' + key,
-        install.warn_dir = 0
                     value)
 
         self.announce("installing to %s" % self.bdist_dir)