|
12 | 12 | from distutils.errors import * |
13 | 13 | from distutils.core import Extension, setup |
14 | 14 | from distutils.command.build_ext import build_ext |
| 15 | +from distutils.command.install import install |
15 | 16 |
|
16 | 17 | # This global variable is used to hold the list of modules to be disabled. |
17 | 18 | disabled_module_list = [] |
@@ -598,10 +599,18 @@ def detect_tkinter(self, inc_dirs, lib_dirs): |
598 | 599 | # *** Uncomment these for TOGL extension only: |
599 | 600 | # -lGL -lGLU -lXext -lXmu \ |
600 | 601 |
|
| 602 | +class PyBuildInstall(install): |
| 603 | + # Suppress the warning about installation into the lib_dynload |
| 604 | + # directory, which is not in sys.path when running Python during |
| 605 | + # installation: |
| 606 | + def initialize_options (self): |
| 607 | + install.initialize_options(self) |
| 608 | + self.warn_dir=0 |
| 609 | + |
601 | 610 | def main(): |
602 | 611 | setup(name = 'Python standard library', |
603 | 612 | version = '%d.%d' % sys.version_info[:2], |
604 | | - cmdclass = {'build_ext':PyBuildExt}, |
| 613 | + cmdclass = {'build_ext':PyBuildExt, 'install':PyBuildInstall}, |
605 | 614 | # The struct module is defined here, because build_ext won't be |
606 | 615 | # called unless there's at least one extension module defined. |
607 | 616 | ext_modules=[Extension('struct', ['structmodule.c'])], |
|
0 commit comments