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
sys0
join0
Load0
Execute0
Compile0
pkglist0
pkglist = ['context', 'system', 'route', 'project']
modlist0
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
package_import(bytecode, path, root, pkg)
module_import0
module_import(bytecode, path, root, mod)
load_code0
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
install_packages(rename, modules, bytecode, path, root, package_list)
Allocate new package module instances and assign them into modules.
install_modules0
install_modules(rename, modules, bytecode, path, root, module_list)
Allocate new module instances and assign them into modules.
install_operations0
install_operations = [
(install_packages, pkglist),
(install_modules, modlist),
]
install0
install(modules, bytecode, path, root)
Install the bootstrap factors into modules. Normally, sys.modules.
finish0
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
integrate(faultpath, faultname, faultform, images, system, python, arch, form, *products)
Integrate the factor environment into Python's import system.