Struct maturin::PyProjectToml
source · [−]pub struct PyProjectToml {
pub tool: Option<Tool>,
/* private fields */
}
Expand description
A pyproject.toml as specified in PEP 517
Fields
tool: Option<Tool>
PEP 518: The [tool]
table is where any tool related to your Python project, not just build
tools, can have users specify configuration data as long as they use a sub-table within
[tool]
, e.g. the flit tool would store its configuration in [tool.flit]
.
We use it for [tool.maturin]
Implementations
sourceimpl PyProjectToml
impl PyProjectToml
sourcepub fn new(project_root: impl AsRef<Path>) -> Result<PyProjectToml>
pub fn new(project_root: impl AsRef<Path>) -> Result<PyProjectToml>
Returns the contents of a pyproject.toml with a [build-system]
entry or an error
Does no specific error handling because it’s only used to check whether or not to build source distributions
sourcepub fn maturin(&self) -> Option<&ToolMaturin>
pub fn maturin(&self) -> Option<&ToolMaturin>
Returns the values of [tool.maturin]
in pyproject.toml
sourcepub fn sdist_include(&self) -> Option<&Vec<String>>
pub fn sdist_include(&self) -> Option<&Vec<String>>
Returns the value of [tool.maturin.sdist-include]
in pyproject.toml
sourcepub fn bindings(&self) -> Option<&str>
pub fn bindings(&self) -> Option<&str>
Returns the value of [tool.maturin.bindings]
in pyproject.toml
sourcepub fn compatibility(&self) -> Option<PlatformTag>
pub fn compatibility(&self) -> Option<PlatformTag>
Returns the value of [tool.maturin.compatibility]
in pyproject.toml
sourcepub fn skip_auditwheel(&self) -> bool
pub fn skip_auditwheel(&self) -> bool
Returns the value of [tool.maturin.skip-auditwheel]
in pyproject.toml
sourcepub fn manifest_path(&self) -> Option<&Path>
pub fn manifest_path(&self) -> Option<&Path>
Returns the value of [tool.maturin.manifest-path]
in pyproject.toml
sourcepub fn warn_missing_maturin_version(&self) -> bool
pub fn warn_missing_maturin_version(&self) -> bool
Having a pyproject.toml without a version constraint is a bad idea because at some point we’ll have to do breaking changes and then source distributions would break
Returns true if the pyproject.toml has the constraint
sourcepub fn warn_missing_build_backend(&self) -> bool
pub fn warn_missing_build_backend(&self) -> bool
Having a pyproject.toml without build-backend
set to maturin
may result in build errors when build from source distribution
Returns true if the pyproject.toml has build-backend
set to maturin
Trait Implementations
sourceimpl Clone for PyProjectToml
impl Clone for PyProjectToml
sourcefn clone(&self) -> PyProjectToml
fn clone(&self) -> PyProjectToml
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
sourceimpl Debug for PyProjectToml
impl Debug for PyProjectToml
sourceimpl Deref for PyProjectToml
impl Deref for PyProjectToml
type Target = PyProjectToml
type Target = PyProjectToml
The resulting type after dereferencing.
sourceimpl<'de> Deserialize<'de> for PyProjectToml
impl<'de> Deserialize<'de> for PyProjectToml
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>,
Deserialize this value from the given Serde deserializer. Read more
sourceimpl Serialize for PyProjectToml
impl Serialize for PyProjectToml
Auto Trait Implementations
impl RefUnwindSafe for PyProjectToml
impl Send for PyProjectToml
impl Sync for PyProjectToml
impl Unpin for PyProjectToml
impl UnwindSafe for PyProjectToml
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> Instrument for T
impl<T> Instrument for T
sourcefn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
sourcefn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
impl<T> Pointable for T
impl<T> Pointable for T
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
fn vzip(self) -> V
sourceimpl<T> WithSubscriber for T
impl<T> WithSubscriber for T
sourcefn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> where
S: Into<Dispatch>,
fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> where
S: Into<Dispatch>,
Attaches the provided Subscriber
to this type, returning a
WithDispatch
wrapper. Read more
sourcefn with_current_subscriber(self) -> WithDispatch<Self>
fn with_current_subscriber(self) -> WithDispatch<Self>
Attaches the current default Subscriber
to this type, returning a
WithDispatch
wrapper. Read more