diff setup.py @ 17886:0af824c88203 legacy-trunk

Fix bug #232619: fix misleading warning on installing to lib-dynload
author Andrew M. Kuchling <amk@amk.ca>
date Mon, 21 May 2001 20:29:27 +0000
parents c497fa3fe38a
children fd12e82b7727
line wrap: on
line diff
--- a/setup.py	Mon May 21 20:23:21 2001 +0000
+++ b/setup.py	Mon May 21 20:29:27 2001 +0000
@@ -12,6 +12,7 @@
 from distutils.errors import *
 from distutils.core import Extension, setup
 from distutils.command.build_ext import build_ext
+from distutils.command.install import install
 
 # This global variable is used to hold the list of modules to be disabled.
 disabled_module_list = []
@@ -598,10 +599,18 @@
         # *** Uncomment these for TOGL extension only:
         #       -lGL -lGLU -lXext -lXmu \
 
+class PyBuildInstall(install):
+    # Suppress the warning about installation into the lib_dynload
+    # directory, which is not in sys.path when running Python during
+    # installation:
+    def initialize_options (self):
+        install.initialize_options(self)
+        self.warn_dir=0
+    
 def main():
     setup(name = 'Python standard library',
           version = '%d.%d' % sys.version_info[:2],
-          cmdclass = {'build_ext':PyBuildExt},
+          cmdclass = {'build_ext':PyBuildExt, 'install':PyBuildInstall},
           # The struct module is defined here, because build_ext won't be
           # called unless there's at least one extension module defined.
           ext_modules=[Extension('struct', ['structmodule.c'])],