# eric4.install

Installation script for the eric4 IDE and all eric4 related tools.

### Global Attributes

BlackLists
PlatformsBlackLists
apisDir
cfg
configLength
configName
currDir
distDir
doCleanup
doCompile
modDir
platBinDir
progLanguages
progName
pyModDir
sourceDir

### Classes

None

### Functions

cleanUp | Uninstall the old eric files.
compileUiDir | Creates Python modules from Qt Designer .ui files in a directory or directory tree.
compileUiFiles | Compile the .ui files to Python sources.
compile_ui | Local function to compile a single .ui file.
copyToFile | Copy a string to a file.
copyTree | Copy Python, translation, documentation, wizards configuration, designer template files and DTDs of a directory tree.
createConfig | Create a config file with the respective config entries.
createGlobalPluginsDir | Create the global plugins directory, if it doesn't exist.
createInstallConfig | Create the installation config dictionary.
createMacAppBundle | Create a Mac application bundle.
createPyWrapper | Create an executable wrapper for a Python script.
doDependancyChecks | Perform some dependency checks.
exit | Exit the install script.
initGlobals | Sets the values of globals that need more than a simple assignment.
installEric | Actually perform the installation steps.
main | The main function of the script.
pyName | Local function to create the Python source file name for the compiled .ui file.
shutilCopy | Wrapper function around shutil.copy() to ensure the permissions.
usage | Display a usage message and exit.
wrapperName | Create the platform specific name for the wrapper script.

## cleanUp

cleanUp()

Uninstall the old eric files.

Up

## compileUiDir

compileUiDir(dir, recurse = False, map = None, **compileUi_args)

Creates Python modules from Qt Designer .ui files in a directory or directory tree.

Note: This function is a modified version of the one found in PyQt4.

dir
  Name of the directory to scan for files whose name ends with '.ui'. By default the generated Python module is created in the same directory ending with '.py'.
recurse
  flag indicating that any sub-directories should be scanned.
map
  an optional callable that is passed the name of the directory containing the '.ui' file and the name of the Python module that will be created. The callable should return a tuple of the name of the directory in which the Python module will be created and the (possibly modified) name of the module.
compileUi_args
  any additional keyword arguments that are passed to the compileUi() function that is called to create each Python module.

Up

## compileUiFiles

compileUiFiles()

Compile the .ui files to Python sources.

Up

## compile_ui

compile_ui(ui_dir, ui_file)

Local function to compile a single .ui file.

ui_dir
  directory containing the .ui file (string)
ui_file
  file name of the .ui file (string)

Up

## copyToFile

copyToFile(name, text)

Copy a string to a file.

name
  the name of the file.
text
  the contents to copy to the file.

Up

## copyTree

copyTree(src, dst, filters, excludeDirs=[], excludePatterns=[])

Copy Python, translation, documentation, wizards configuration, designer template files and DTDs of a directory tree.

src
  name of the source directory
dst
  name of the destination directory
filters
  list of filter pattern determining the files to be copied
excludeDirs
  list of (sub)directories to exclude from copying
excludePatterns=
  list of filter pattern determining the files to be skipped

Up

## createConfig

createConfig()

Create a config file with the respective config entries.

Up

## createGlobalPluginsDir

createGlobalPluginsDir()

Create the global plugins directory, if it doesn't exist.

Up

## createInstallConfig

createInstallConfig()

Create the installation config dictionary.

Up

## createMacAppBundle

createMacAppBundle(pydir)

Create a Mac application bundle.

pydir
  the name of the directory where the Python script will eventually be installed

Up

## createPyWrapper

createPyWrapper(pydir, wfile, isGuiScript = True)

Create an executable wrapper for a Python script.

pydir
  the name of the directory where the Python script will eventually be installed
wfile
  the basename of the wrapper
isGuiScript
  flag indicating a wrapper script for a GUI application (boolean)

Returns:
  the platform specific name of the wrapper

Up

## doDependancyChecks

doDependancyChecks()

Perform some dependency checks.

Up

## exit

exit(rcode=0)

Exit the install script.

Up

## initGlobals

initGlobals()

Sets the values of globals that need more than a simple assignment.

Up

## installEric

installEric()

Actually perform the installation steps.

Up

## main

main(argv)

The main function of the script.

argv
  the list of command line arguments.

Up

## pyName

pyName(py_dir, py_file)

Local function to create the Python source file name for the compiled .ui file.

py_dir
  suggested name of the directory (string)
py_file
  suggested name for the compile source file (string)

Returns:
  tuple of directory name (string) and source file name (string)

Up

## shutilCopy

shutilCopy(src, dst, perm=0o644)

Wrapper function around shutil.copy() to ensure the permissions.

src
  source file name (string)
dst
  destination file name or directory name (string)
perm=
  permissions to be set (integer)

Up

## usage

usage(rcode = 2)

Display a usage message and exit.

rcode
  the return code passed back to the calling process.

Up

## wrapperName

wrapperName(dname, wfile)

Create the platform specific name for the wrapper script.

dname
  name of the directory to place the wrapper into
wfile
  basename (without extension) of the wrapper script

Returns:
  the name of the wrapper script

Up