467 self.tr("Unspecific exception installing plugin."), \ |
467 self.tr("Unspecific exception installing plugin."), \ |
468 False |
468 False |
469 |
469 |
470 # now compile the plugins |
470 # now compile the plugins |
471 if doCompile: |
471 if doCompile: |
472 compileall.compile_dir( |
472 dir = os.path.join(destination, packageName) |
473 os.path.join(destination, packageName), quiet=True) |
473 files = os.path.join(destination, pluginFileName) |
474 compileall.compile_file( |
474 if sys.version_info[0] == 2: |
475 os.path.join(destination, pluginFileName), quiet=True) |
475 dir = dir.encode(sys.getfilesystemencoding()) |
|
476 files = files.encode(sys.getfilesystemencoding()) |
|
477 os.path.join_unicode = False |
|
478 compileall.compile_dir(dir, quiet=True) |
|
479 compileall.compile_file(files, quiet=True) |
|
480 os.path.join_unicode = True |
476 |
481 |
477 if not self.__external: |
482 if not self.__external: |
478 # now load and activate the plugin |
483 # now load and activate the plugin |
479 self.__pluginManager.loadPlugin(installedPluginName, destination, |
484 self.__pluginManager.loadPlugin(installedPluginName, destination, |
480 reload_) |
485 reload_) |