Struct pyo3_pack::BuildContext [−][src]
pub struct BuildContext {
pub target: Target,
pub bridge: BridgeModel,
pub metadata21: Metadata21,
pub scripts: HashMap<String, String>,
pub module_name: String,
pub manifest_path: PathBuf,
pub out: PathBuf,
pub debug: bool,
pub skip_auditwheel: bool,
pub cargo_extra_args: Vec<String>,
pub rustc_extra_args: Vec<String>,
}Contains all the metadata required to build the crate
Fields
target: Target
The platform, i.e. os and pointer width
bridge: BridgeModel
Whether to use cffi or pyo3/rust-cpython
metadata21: Metadata21
Python Package Metadata 2.1
scripts: HashMap<String, String>
The [console_scripts] for the entry_points.txt
module_name: String
The name of the module can be distinct from the package name, mostly because package names normally contain minuses while module names have underscores. The package name is part of metadata21
manifest_path: PathBuf
The path to the Cargo.toml. Required for the cargo invocations
out: PathBuf
The directory to store the built wheels in. Defaults to a new "wheels" directory in the project's target directory
debug: bool
Do a debug build (don't pass --release to cargo)
skip_auditwheel: bool
Don't check for manylinux compliance
cargo_extra_args: Vec<String>
Extra arguments that will be passed to cargo as cargo rustc [...] [arg1] [arg2] --
rustc_extra_args: Vec<String>
Extra arguments that will be passed to rustc as cargo rustc [...] -- [arg1] [arg2]
Methods
impl BuildContext[src]
impl BuildContextpub fn build_wheels(
&self
) -> Result<Vec<(PathBuf, Option<PythonInterpreter>)>, Error>[src]
pub fn build_wheels(
&self
) -> Result<Vec<(PathBuf, Option<PythonInterpreter>)>, Error>Checks which kind of bindings we have (pyo3/rust-cypthon vs cffi) and calls the correct builder
pub fn build_binding_wheels(
&self,
interpreter: &[PythonInterpreter]
) -> Result<Vec<(PathBuf, Option<PythonInterpreter>)>, Error>[src]
pub fn build_binding_wheels(
&self,
interpreter: &[PythonInterpreter]
) -> Result<Vec<(PathBuf, Option<PythonInterpreter>)>, Error>Builds wheels for a Cargo project for all given python versions. Returns the paths where the wheels are saved and the Python metadata describing the cargo project
Defaults to 2.7 and 3.{5, 6, 7, 8, 9} if no python versions are given and silently ignores all non-existent python versions. Runs auditwheel_rs() if the auditwheel feature isn't deactivated
pub fn build_cffi_wheel(&self) -> Result<PathBuf, Error>[src]
pub fn build_cffi_wheel(&self) -> Result<PathBuf, Error>Builds a wheel with cffi bindings
Auto Trait Implementations
impl Send for BuildContext
impl Send for BuildContextimpl Sync for BuildContext
impl Sync for BuildContext