Struct maturin::BuildOptions
source · pub struct BuildOptions {
pub platform_tag: Vec<PlatformTag>,
pub interpreter: Vec<PathBuf>,
pub find_interpreter: bool,
pub bindings: Option<String>,
pub out: Option<PathBuf>,
pub skip_auditwheel: bool,
pub zig: bool,
pub universal2: bool,
pub cargo: CargoOptions,
}
Expand description
High level API for building wheels from a crate which is also used for the CLI
Fields
platform_tag: Vec<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
and manylinux2010
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: Vec<PathBuf>
The python versions to build wheels for, given as the names of the interpreters.
find_interpreter: bool
Find interpreters from the host machine
bindings: Option<String>
Which kind of bindings to use.
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
zig: bool
For manylinux targets, use zig to ensure compliance for the chosen manylinux version
Default to manylinux2014/manylinux_2_17 if you do not specify an --compatibility
Make sure you installed zig with pip install maturin[zig]
universal2: bool
Control whether to build universal2 wheel for macOS or not. Only applies to macOS targets, do nothing otherwise.
cargo: CargoOptions
Cargo build options
Implementations
sourceimpl BuildOptions
impl BuildOptions
sourcepub 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
Methods from Deref<Target = CargoOptions>
sourcepub fn merge_with_pyproject_toml(
&mut self,
tool_maturin: ToolMaturin
) -> Vec<&'static str> ⓘ
pub fn merge_with_pyproject_toml(
&mut self,
tool_maturin: ToolMaturin
) -> Vec<&'static str> ⓘ
Merge options from pyproject.toml
Trait Implementations
sourceimpl Args for BuildOptions
impl Args for BuildOptions
sourcefn group_id() -> Option<Id>
fn group_id() -> Option<Id>
ArgGroup::id
for this set of argumentssourcefn augment_args<'b>(__clap_app: Command) -> Command
fn augment_args<'b>(__clap_app: Command) -> Command
sourceimpl Clone for BuildOptions
impl Clone for BuildOptions
sourcefn clone(&self) -> BuildOptions
fn clone(&self) -> BuildOptions
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moresourceimpl CommandFactory for BuildOptions
impl CommandFactory for BuildOptions
sourceimpl Debug for BuildOptions
impl Debug for BuildOptions
sourceimpl Default for BuildOptions
impl Default for BuildOptions
sourcefn default() -> BuildOptions
fn default() -> BuildOptions
sourceimpl Deref for BuildOptions
impl Deref for BuildOptions
type Target = CargoOptions
type Target = CargoOptions
sourceimpl DerefMut for BuildOptions
impl DerefMut for BuildOptions
sourceimpl<'de> Deserialize<'de> for BuildOptionswhere
BuildOptions: Default,
impl<'de> Deserialize<'de> for BuildOptionswhere
BuildOptions: Default,
sourcefn 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>,
sourceimpl FromArgMatches for BuildOptions
impl FromArgMatches for BuildOptions
sourcefn from_arg_matches(__clap_arg_matches: &ArgMatches) -> Result<Self, Error>
fn from_arg_matches(__clap_arg_matches: &ArgMatches) -> Result<Self, Error>
sourcefn from_arg_matches_mut(
__clap_arg_matches: &mut ArgMatches
) -> Result<Self, Error>
fn from_arg_matches_mut(
__clap_arg_matches: &mut ArgMatches
) -> Result<Self, Error>
sourcefn update_from_arg_matches(
&mut self,
__clap_arg_matches: &ArgMatches
) -> Result<(), Error>
fn update_from_arg_matches(
&mut self,
__clap_arg_matches: &ArgMatches
) -> Result<(), Error>
ArgMatches
to self
.sourcefn update_from_arg_matches_mut(
&mut self,
__clap_arg_matches: &mut ArgMatches
) -> Result<(), Error>
fn update_from_arg_matches_mut(
&mut self,
__clap_arg_matches: &mut ArgMatches
) -> Result<(), Error>
ArgMatches
to self
.sourceimpl Parser for BuildOptions
impl Parser for BuildOptions
sourcefn try_parse() -> Result<Self, Error<RichFormatter>>
fn try_parse() -> Result<Self, Error<RichFormatter>>
std::env::args_os()
, return Err on error.sourcefn parse_from<I, T>(itr: I) -> Selfwhere
I: IntoIterator<Item = T>,
T: Into<OsString> + Clone,
fn parse_from<I, T>(itr: I) -> Selfwhere
I: IntoIterator<Item = T>,
T: Into<OsString> + Clone,
sourcefn try_parse_from<I, T>(itr: I) -> Result<Self, Error<RichFormatter>>where
I: IntoIterator<Item = T>,
T: Into<OsString> + Clone,
fn try_parse_from<I, T>(itr: I) -> Result<Self, Error<RichFormatter>>where
I: IntoIterator<Item = T>,
T: Into<OsString> + Clone,
sourcefn update_from<I, T>(&mut self, itr: I)where
I: IntoIterator<Item = T>,
T: Into<OsString> + Clone,
fn update_from<I, T>(&mut self, itr: I)where
I: IntoIterator<Item = T>,
T: Into<OsString> + Clone,
sourcefn try_update_from<I, T>(&mut self, itr: I) -> Result<(), Error<RichFormatter>>where
I: IntoIterator<Item = T>,
T: Into<OsString> + Clone,
fn try_update_from<I, T>(&mut self, itr: I) -> Result<(), Error<RichFormatter>>where
I: IntoIterator<Item = T>,
T: Into<OsString> + Clone,
sourceimpl PartialEq<BuildOptions> for BuildOptions
impl PartialEq<BuildOptions> for BuildOptions
sourcefn eq(&self, other: &BuildOptions) -> bool
fn eq(&self, other: &BuildOptions) -> bool
sourceimpl Serialize for BuildOptions
impl Serialize for BuildOptions
impl Eq for BuildOptions
impl StructuralEq for BuildOptions
impl StructuralPartialEq for BuildOptions
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
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
impl<T> Container<T> for Twhere
T: Clone,
impl<T> Container<T> for Twhere
T: Clone,
sourceimpl<Q, K> Equivalent<K> for Qwhere
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
impl<Q, K> Equivalent<K> for Qwhere
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
sourcefn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key
and return true
if they are equal.