(self)
Runs the command.
Runs the command.
Runs the command .
def run(self):
        """Runs the command."""
        # Obviously have to build before we can install
        if not self.skip_build:
            self.run_command('build')
            # If we built for any other platform, we can't install.
            build_plat = self.distribution.get_command_obj('build').plat_name
            # check warn_dir - it is a clue that the 'install' is happening
            # internally, and not to sys.path, so we don't check the platform
            # matches what we are running.
            if self.warn_dir and build_plat != get_platform():
                raise DistutilsPlatformError("Can't install when "
                                             "cross-compiling")

        # Run all sub-commands (at least those that need to be run)
        for cmd_name in self.get_sub_commands():
            self.run_command(cmd_name)

        if self.path_file:
            self.create_path_file()

        # write list of installed files, if requested.
        if self.record:
            outputs = self.get_outputs()
            if self.root:               # strip any package prefix
                root_len = len(self.root)
                for counter in range(len(outputs)):
                    outputs[counter] = outputs[counter][root_len:]
            self.execute(write_file,
                         (self.record, outputs),
                         "writing list of installed files to '%s'" %
                         self.record)

        sys_path = map(os.path.normpath, sys.path)
        sys_path = map(os.path.normcase, sys_path)
        install_lib = os.path.normcase(os.path.normpath(self.install_lib))
        if (self.warn_dir and
            not (self.path_file and self.install_path_file) and
            install_lib not in sys_path):
            log.debug(("modules installed to '%s', which is not in "
                       "Python's module search path (sys.path) -- "
                       "you'll have to change the search path yourself"),
                       self.install_lib)
def run ( self ) : # Obviously have to build before we can install if not self . skip_build : self . run_command ( 'build' ) # If we built for any other platform, we can't install. build_plat = self . distribution . get_command_obj ( 'build' ) . plat_name # check warn_dir - it is a clue that the 'install' is happening # internally, and not to sys.path, so we don't check the platform # matches what we are running. if self . warn_dir and build_plat != get_platform ( ) : raise DistutilsPlatformError ( "Can't install when " "cross-compiling" ) # Run all sub-commands (at least those that need to be run) for cmd_name in self . get_sub_commands ( ) : self . run_command ( cmd_name ) if self . path_file : self . create_path_file ( ) # write list of installed files, if requested. if self . record : outputs = self . get_outputs ( ) if self . root : # strip any package prefix root_len = len ( self . root ) for counter in range ( len ( outputs ) ) : outputs [ counter ] = outputs [ counter ] [ root_len : ] self . execute ( write_file , ( self . record , outputs ) , "writing list of installed files to '%s'" % self . record ) sys_path = map ( os . path . normpath , sys . path ) sys_path = map ( os . path . normcase , sys_path ) install_lib = os . path . normcase ( os . path . normpath ( self . install_lib ) ) if ( self . warn_dir and not ( self . path_file and self . install_path_file ) and install_lib not in sys_path ) : log . debug ( ( "modules installed to '%s', which is not in " "Python's module search path (sys.path) -- " "you'll have to change the search path yourself" ) , self . install_lib )