Function pyoxidizerlib::project_building::run_from_build [−][src]
pub fn run_from_build(
env: &Environment,
logger: &Logger,
build_script: &str,
resolve_target: Option<&str>,
extra_vars: HashMap<String, Option<String>>
) -> Result<()>
Runs packaging/embedding from the context of a Rust build script.
This function should be called by the build script for the package
that wishes to embed a Python interpreter/application. When called,
a PyOxidizer configuration file is found and read. The configuration
is then applied to the current build. This involves obtaining a
Python distribution to embed (possibly by downloading it from the Internet),
analyzing the contents of that distribution, extracting relevant files
from the distribution, compiling Python bytecode, and generating
resources required to build the pyembed
crate/modules.
If everything works as planned, this whole process should be largely invisible and the calling application will have an embedded Python interpreter when it is built.
Receives a logger for receiving log messages, the path to the Rust build script invoking us, and an optional named target in the config file to resolve.
For this to work as expected, the target resolved in the config file must
return a PythonEmbeddeResources
starlark type.