scipion.install.plugin_funcs module

class scipion.install.plugin_funcs.PluginInfo(pipName='', name='', pluginSourceUrl='', remote=True, plugin=None, **kwargs)[source]

Bases: object

getAuthor()[source]

Return the plugin author

getBinVersions()[source]

Get list with names of binaries of this plugin

getCompatiblePipReleases(pipJsonData=None)[source]

Get pip releases of this plugin that are compatible with current Scipion version. Returns dict with all compatible releases and a special key “latest” with the most recent one.

getDirName()[source]

Get the name of the folder that contains the plugin code itself (e.g. to import the _plugin object.)

getHomePage()[source]

Return the plugin Home page

getInstallenv(envArgs=None)[source]

Reads the defineBinaries function from Plugin class and returns an Environment object with the plugin’s binaries.

getLatestRelease()[source]

Get the plugin latest release

getPipJsonData()[source]

“Request json data from pypi, return json content

getPipName()[source]

Return the plugin pip name

getPipVersion()[source]

Return the plugin pip version

getPluginClass()[source]

Tries to find the Plugin object.

getPluginName()[source]

Return the plugin name

getReleaseDate(release)[source]

Return the uploaded date from the release

getSourceUrl()[source]

Return the plugin source url

getSummary()[source]

Return the plugin summary

hasPipPackage()[source]

Checks if the current plugin is installed via pip

install()[source]

Installs both pip module and default binaries of the plugin

installBin(args=None)[source]

Install binaries of the plugin. Args is the list of args to be passed to the install environment.

installPipModule(version='')[source]

Installs the version specified of the pip plugin, as long as it is compatible with the current Scipion version. If no version specified, will install latest compatible one.

isInstalled()[source]

Checks if the current plugin is installed (i.e. has pip package). NOTE: we might want to change definition of isInstalled, hence the extra function.

printBinInfoStr()[source]

Returns string with info of binaries installed to print in console with flag –help

setFakedRemotePluginInfo()[source]

Sets value for the attributes that need to be obtained from json file

setLocalPluginInfo()[source]

Sets value for the attributes that can be obtained locally if the plugin is installed.

setRemotePluginInfo()[source]

Sets value for the attributes that need to be obtained from pypi

uninstallBins(binList=None)[source]

Uninstall binaries of the plugin.

Parameters

binList – if given, will uninstall the binaries in it. The binList

may contain strings with only the name of the binary or name and version in the format name-version

:returns None

uninstallPip()[source]

Removes pip package from site-packages

class scipion.install.plugin_funcs.PluginRepository(repoUrl='plugins.json')[source]

Bases: object

static getBinToPluginDict()[source]
getPlugins(pluginList=None, getPipData=False)[source]

Reads available plugins from self.repoUrl and returns a dict with PluginInfo objects. Params: - pluginList: A list with specific plugin pip-names we want to get. - getPipData: If true, each PluginInfo object will try to get the data of the plugin from pypi.

printPluginInfoStr(withBins=False, withUpdates=False)[source]

Returns string to print in console which plugins are installed.

Parameters
  • withBins – If true, will add binary info for the plugins installed

  • withUpdates – If true, will check if the installed plugins have new releases.

:return A string with the plugin information summarized

scipion.install.plugin_funcs.installBinsDefault()[source]

Returns the default behaviour for installing binaries By default it is TRUE, define “SCIPION_DONT_INSTALL_BINARIES” to anything to deactivate binaries installation