Struct maturin::pyproject_toml::PyProjectToml
source · 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(pyproject_file: impl AsRef<Path>) -> Result<PyProjectToml>
pub fn new(pyproject_file: 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 project_name(&self) -> Option<&str>
pub fn project_name(&self) -> Option<&str>
Returns the value of [project.name]
in pyproject.toml
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>>
👎Deprecated since 0.14.0: please use PyProjectToml::include
(https://github.com/PyO3/maturin/pulls/1255)
pub fn sdist_include(&self) -> Option<&Vec<String>>
PyProjectToml::include
(https://github.com/PyO3/maturin/pulls/1255)Returns the value of [tool.maturin.sdist-include]
in pyproject.toml
sourcepub fn include(&self) -> Option<&[GlobPattern]>
pub fn include(&self) -> Option<&[GlobPattern]>
Returns the value of [tool.maturin.include]
in pyproject.toml
sourcepub fn exclude(&self) -> Option<&[GlobPattern]>
pub fn exclude(&self) -> Option<&[GlobPattern]>
Returns the value of [tool.maturin.exclude]
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 python_source(&self) -> Option<&Path>
pub fn python_source(&self) -> Option<&Path>
Returns the value of [tool.maturin.python-source]
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
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read more