[−][src]Struct pyo3_pack::BuildContext
Contains all the metadata required to build the crate
Fields
target: TargetThe platform, i.e. os and pointer width
bridge: BridgeModelWhether to use cffi or pyo3/rust-cpython
metadata21: Metadata21Python Package Metadata 2.1
scripts: HashMap<String, String>The [console_scripts] for the entry_points.txt
module_name: StringThe 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: PathBufThe path to the Cargo.toml. Required for the cargo invocations
out: PathBufThe directory to store the built wheels in. Defaults to a new "wheels" directory in the project's target directory
release: boolPass --release to cargo
strip: boolStrip the library for minimum file size
manylinux: ManylinuxWhether to use the the manylinux and check compliance (on), use it but don't check compliance (no-auditwheel) or use the native linux tag (off)
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]
interpreter: Vec<PythonInterpreter>The available python interpreter
cargo_metadata: MetadataCargo.toml as resolved by cargo_metadata
Methods
impl BuildContext[src]
pub fn build_wheels(
&self
) -> Result<Vec<(PathBuf, String, Option<PythonInterpreter>)>, Error>[src]
&self
) -> Result<Vec<(PathBuf, String, Option<PythonInterpreter>)>, Error>
Checks which kind of bindings we have (pyo3/rust-cypthon or cffi or bin) and calls the correct builder. Returns a Vec that contains location, python tag (e.g. py2.py3 or cp35) and for bindings the python interpreter they bind against.
pub fn build_binding_wheels(
&self
) -> Result<Vec<(PathBuf, String, Option<PythonInterpreter>)>, Error>[src]
&self
) -> Result<Vec<(PathBuf, String, Option<PythonInterpreter>)>, Error>
Builds wheels for a Cargo project for all given python versions. Return type is the same as BuildContext::build_wheels()
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 not deactivated
pub fn compile_cdylib(
&self,
python_interpreter: Option<&PythonInterpreter>
) -> Result<PathBuf, Error>[src]
&self,
python_interpreter: Option<&PythonInterpreter>
) -> Result<PathBuf, Error>
Runs cargo build, extracts the cdylib from the output, runs auditwheel and returns the artifact
pub fn build_cffi_wheel(&self) -> Result<PathBuf, Error>[src]
Builds a wheel with cffi bindings
pub fn build_bin_wheel(&self) -> Result<PathBuf, Error>[src]
Builds a wheel that contains a binary
Runs auditwheel_rs() if not deactivated
Auto Trait Implementations
impl Send for BuildContext
impl Sync for BuildContext
Blanket Implementations
impl<T> From for T[src]
impl<T, U> Into for T where
U: From<T>, [src]
U: From<T>,
impl<T, U> TryFrom for T where
U: Into<T>, [src]
U: Into<T>,
type Error = !
try_from)The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>[src]
impl<T> Borrow for T where
T: ?Sized, [src]
T: ?Sized,
impl<T> Any for T where
T: 'static + ?Sized, [src]
T: 'static + ?Sized,
impl<T> BorrowMut for T where
T: ?Sized, [src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T[src]
impl<T, U> TryInto for T where
U: TryFrom<T>, [src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
try_from)The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>[src]
impl<T> Erased for T
impl<T> Same for T
type Output = T
Should always be Self