Exemple #1
0
    def run(self):
        
        # Do the standard installation.
        base.run(self)
        
        config_file = join(self.install_dir, 'qm', 'config.py')
        self.announce("adjusting config parameters")
        i = self.distribution.get_command_obj('install')
        prefix = i.prefix
        extension_path = join('share',
                              'qmtest',
                              'site-extensions-%d.%d'%sys.version_info[:2])
        reset_config_variables(config_file,
                               version=self.distribution.get_version(),
                               prefix=prefix, extension_path=extension_path)

        # Make sure the new config file gets recompiled, or else python may
        # not notice it is in fact different from the original config file.
        files = [config_file]

        from distutils.util import byte_compile
        install_root = self.get_finalized_command('install').root

        if self.compile:
            byte_compile(files, optimize=0,
                         force=1, prefix=install_root,
                         dry_run=self.dry_run)
        if self.optimize > 0:
            byte_compile(files, optimize=self.optimize,
                         force=1, prefix=install_root,
                         verbose=self.verbose, dry_run=self.dry_run)
Exemple #2
0
    def run(self):

        # Do the default actions.
        base.run(self)
        config_file = os.path.join(self.build_lib, 'qm', 'config.py')
        self.announce("adjusting config parameters")
        reset_config_variables(config_file,
                               version=self.distribution.get_version(),
                               prefix=os.getcwd(),
                               extension_path=os.path.join('qm',
                                                           'test',
                                                           'classes'))
Exemple #3
0
    def run(self):

        # Do the standard installation.
        base.run(self)

        config_file = join(self.install_dir, 'qm', 'config.py')
        self.announce("adjusting config parameters")
        i = self.distribution.get_command_obj('install')
        prefix = i.prefix
        extension_path = join('share', 'qmtest',
                              'site-extensions-%d.%d' % sys.version_info[:2])
        reset_config_variables(config_file,
                               version=self.distribution.get_version(),
                               prefix=prefix,
                               extension_path=extension_path)

        # Make sure the new config file gets recompiled, or else python may
        # not notice it is in fact different from the original config file.
        files = [config_file]

        from distutils.util import byte_compile
        install_root = self.get_finalized_command('install').root

        if self.compile:
            byte_compile(files,
                         optimize=0,
                         force=1,
                         prefix=install_root,
                         dry_run=self.dry_run)
        if self.optimize > 0:
            byte_compile(files,
                         optimize=self.optimize,
                         force=1,
                         prefix=install_root,
                         verbose=self.verbose,
                         dry_run=self.dry_run)