Struct maturin::BuildOptions [−][src]
pub struct BuildOptions {
pub platform_tag: Option<PlatformTag>,
pub interpreter: Option<Vec<PathBuf>>,
pub bindings: Option<String>,
pub manifest_path: PathBuf,
pub out: Option<PathBuf>,
pub skip_auditwheel: bool,
pub target: Option<String>,
pub cargo_extra_args: Vec<String>,
pub rustc_extra_args: Vec<String>,
pub universal2: bool,
}
Expand description
High level API for building wheels from a crate which is also used for the CLI
Fields
platform_tag: Option<PlatformTag>
Control the platform tag on linux.
Options are manylinux
tags (for example manylinux2014
/manylinux_2_24
)
or musllinux
tags (for example musllinux_1_2
)
and linux
for the native linux tag.
Note that manylinux1
is unsupported by the rust compiler. Wheels with the native linux
tag
will be rejected by pypi, unless they are separately validated by auditwheel
.
The default is the lowest compatible manylinux
tag, or plain linux
if nothing matched
This option is ignored on all non-linux platforms
interpreter: Option<Vec<PathBuf>>
The python versions to build wheels for, given as the names of the interpreters. Uses autodiscovery if not explicitly set.
bindings: Option<String>
Which kind of bindings to use. Possible values are pyo3, rust-cpython, cffi and bin
manifest_path: PathBuf
The path to the Cargo.toml
out: Option<PathBuf>
The directory to store the built wheels in. Defaults to a new “wheels” directory in the project’s target directory
skip_auditwheel: bool
Don’t check for manylinux compliance
target: Option<String>
The –target option for cargo
cargo_extra_args: Vec<String>
Extra arguments that will be passed to cargo as cargo rustc [...] [arg1] [arg2] -- [...]
Use as --cargo-extra-args="--my-arg"
Note that maturin invokes cargo twice: Once as cargo metadata
and then as cargo rustc
.
maturin tries to pass only the shared subset of options to cargo metadata, but this is may
be a bit flaky.
rustc_extra_args: Vec<String>
Extra arguments that will be passed to rustc as cargo rustc [...] -- [...] [arg1] [arg2]
Use as --rustc-extra-args="--my-arg"
universal2: bool
Control whether to build universal2 wheel for macOS or not. Only applies to macOS targets, do nothing otherwise.
Implementations
pub fn into_build_context(
self,
release: bool,
strip: bool,
editable: bool
) -> Result<BuildContext>
pub fn into_build_context(
self,
release: bool,
strip: bool,
editable: bool
) -> Result<BuildContext>
Tries to fill the missing metadata for a BuildContext by querying cargo and python
Trait Implementations
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
This method tests for self
and other
values to be equal, and is used
by ==
. Read more
This method tests for !=
.
Builds the struct from clap::ArgMatches
. It’s guaranteed to succeed
if matches
originates from an App
generated by StructOpt::clap
called on
the same type, otherwise it must panic. Read more
Builds the struct from the command line arguments (std::env::args_os
).
Calls clap::Error::exit
on failure, printing the error message and aborting the program. Read more
Builds the struct from the command line arguments (std::env::args_os
).
Unlike StructOpt::from_args
, returns clap::Error
on failure instead of aborting the program,
so calling .exit
is up to you. Read more
fn from_iter<I>(iter: I) -> Self where
I: IntoIterator,
<I as IntoIterator>::Item: Into<OsString>,
<I as IntoIterator>::Item: Clone,
fn from_iter<I>(iter: I) -> Self where
I: IntoIterator,
<I as IntoIterator>::Item: Into<OsString>,
<I as IntoIterator>::Item: Clone,
Gets the struct from any iterator such as a Vec
of your making.
Print the error message and quit the program in case of failure. Read more
fn from_iter_safe<I>(iter: I) -> Result<Self, Error> where
I: IntoIterator,
<I as IntoIterator>::Item: Into<OsString>,
<I as IntoIterator>::Item: Clone,
fn from_iter_safe<I>(iter: I) -> Result<Self, Error> where
I: IntoIterator,
<I as IntoIterator>::Item: Into<OsString>,
<I as IntoIterator>::Item: Clone,
Gets the struct from any iterator such as a Vec
of your making. Read more
Auto Trait Implementations
impl RefUnwindSafe for BuildOptions
impl Send for BuildOptions
impl Sync for BuildOptions
impl Unpin for BuildOptions
impl UnwindSafe for BuildOptions
Blanket Implementations
Mutably borrows from an owned value. Read more
Compare self to key
and return true
if they are equal.
pub fn vzip(self) -> V
Attaches the provided Subscriber
to this type, returning a
WithDispatch
wrapper. Read more
Attaches the current default Subscriber
to this type, returning a
WithDispatch
wrapper. Read more