420 raise PluginLoadError(name) |
420 raise PluginLoadError(name) |
421 else: |
421 else: |
422 self.__onDemandInactiveModules[name] = module |
422 self.__onDemandInactiveModules[name] = module |
423 module.eric6PluginModuleName = name |
423 module.eric6PluginModuleName = name |
424 module.eric6PluginModuleFilename = fname |
424 module.eric6PluginModuleFilename = fname |
|
425 if hasattr(module, "installDependencies"): |
|
426 # ask the module to install its dependencies |
|
427 module.installDependencies(self.pipInstall) |
425 self.__modulesCount += 1 |
428 self.__modulesCount += 1 |
426 if reload_: |
429 if reload_: |
427 importlib.reload(module) |
430 importlib.reload(module) |
428 self.initOnDemandPlugin(name) |
431 self.initOnDemandPlugin(name) |
429 with contextlib.suppress(KeyError, AttributeError): |
432 with contextlib.suppress(KeyError, AttributeError): |
1414 if ( |
1417 if ( |
1415 getattr(module, "pluginType", "") == type_ and |
1418 getattr(module, "pluginType", "") == type_ and |
1416 hasattr(module, "clearPrivateData") |
1419 hasattr(module, "clearPrivateData") |
1417 ): |
1420 ): |
1418 module.clearPrivateData() |
1421 module.clearPrivateData() |
|
1422 |
|
1423 ######################################################################## |
|
1424 ## Methods to install a plug-in module dependency via pip |
|
1425 ######################################################################## |
|
1426 |
|
1427 def pipInstall(self, packageName): |
|
1428 """ |
|
1429 Public method to install the given package via pip. |
|
1430 |
|
1431 @param packageName name of the package to be installed |
|
1432 @type str |
|
1433 @return flag indicating a successful installation |
|
1434 @rtype bool |
|
1435 """ |
|
1436 # TODO: implement this |
|
1437 return False |
1419 |
1438 |
1420 # |
1439 # |
1421 # eflag: noqa = M801 |
1440 # eflag: noqa = M801 |