bootstrap0python.module
fault.system

Bootstrapping for applications that depend on the fault.system.factors loader.

Rationale

While fault.io/python has alignment with the standard filesystem module protocol, sys.path compatible directory structure, it is preferred to load from the compiled bytecode when available so that any construction context dependent features are available to applications and so that the fault python context project is available under system.factors.context.

types
import

sys0
import

join0
import

Load0
import

Execute0
import

Compile0
import

pkglist0
data

pkglist = ['context', 'system', 'route', 'project']

modlist0
data

modlist = [
	'context.tools',
	'context.types',
	'context.string',

	'route.rewrite',
	'route.core',
	'route.types',
	'system.files',

	'project.types',
	'project.system',
	'project.polynomial',

	'system.factors', # Must be final.
]

package_import0
function

package_import(bytecode, path, root, pkg)

module_import0
function

module_import(bytecode, path, root, mod)

load_code0
function

load_code(name, bc, src)

Given a marshalled bytecode path and source file, load or compile whichever resource is available prioritizing the compiled form.

name is ignored but required in order to allow overrides to use it as a key instead of the file paths.

install_packages0
function

install_packages(rename, modules, bytecode, path, root, package_list)

Allocate new package module instances and assign them into modules.

install_modules0
function

install_modules(rename, modules, bytecode, path, root, module_list)

Allocate new module instances and assign them into modules.

install_operations0
data

install_operations = [
	(install_packages, pkglist),
	(install_modules, modlist),
]

install0
function

install(modules, bytecode, path, root)

Install the bootstrap factors into modules. Normally, sys.modules.

finish0
function

finish(factors, finder, modules)

Given an activated fault.system.factors module, assign specs and loaders to the previously bootstrapped modules and to the factors module itself.

integrate0
function

integrate(faultpath, faultname, faultform, images, system, python, arch, form, *products)

Integrate the factor environment into Python's import system.