Installer

Abstract base class for installers, and also a generic installer that will run off config files in the .egg-info directory of a distribution.

Packages that simply refer to this installer can provide a file *.egg-info/paste_deploy_config.ini_tmpl that will be interpreted by Cheetah. They can also provide websetup modules with a setup_app(command, conf, vars) (or the now-deprecated setup_config(command, filename, section, vars)) function, that will be called.

In the future other functions or configuration files may be called.


Attributes

a default_config_filename

None

a expect_config_directory

False

a use_cheetah

True

Methods

f __init__(self, dist, ep_group, ep_name) ...

f description(self, config) ...

f write_config(self, command, filename, vars) ...

Writes the content to the filename (directory or single file). You should use the command object, which respects things like simulation and interactive. vars is a dictionary of user-provided variables.

f editable_config_files(self, filename) ...

Return a list of filenames; this is primarily used when the filename is treated as a directory and several configuration files are created. The default implementation returns the file itself. Return None if you don't know what files should be edited on installation.

f config_content(self, command, vars) ...

Called by self.write_config, this returns the text content for the config file, given the provided variables.

The default implementation reads Package.egg-info/paste_deploy_config.ini_tmpl and fills it with the variables.

f template_renderer(self, content, vars, filename=None) ...

Subclasses may override this to provide different template substitution (e.g., use a different template engine).

f simple_config(self, vars) ...

Return a very simple configuration file for this application.

f setup_config(self, command, filename, section, vars) ...

Called to setup an application, given its configuration file/directory.

The default implementation calls package.websetup.setup_config(command, filename, section, vars) or package.websetup.setup_app(command, config, vars)

With setup_app the config object is a dictionary with the extra attributes global_conf, local_conf and filename

See the source for more information.