Struct maturin::Metadata23
source · pub struct Metadata23 {Show 28 fields
pub metadata_version: String,
pub name: String,
pub version: Version,
pub platform: Vec<String>,
pub supported_platform: Vec<String>,
pub summary: Option<String>,
pub description: Option<String>,
pub description_content_type: Option<String>,
pub keywords: Option<String>,
pub home_page: Option<String>,
pub download_url: Option<String>,
pub author: Option<String>,
pub author_email: Option<String>,
pub maintainer: Option<String>,
pub maintainer_email: Option<String>,
pub license: Option<String>,
pub license_files: Vec<PathBuf>,
pub classifiers: Vec<String>,
pub requires_dist: Vec<Requirement>,
pub provides_dist: Vec<String>,
pub obsoletes_dist: Vec<String>,
pub requires_python: Option<VersionSpecifiers>,
pub requires_external: Vec<String>,
pub project_url: IndexMap<String, String>,
pub provides_extra: Vec<String>,
pub scripts: IndexMap<String, String>,
pub gui_scripts: IndexMap<String, String>,
pub entry_points: IndexMap<String, IndexMap<String, String>>,
}
Expand description
Python Package Metadata 2.3 as specified in https://packaging.python.org/specifications/core-metadata/ Maturin writes static metadata and does not support dynamic fields atm.
Fields§
§metadata_version: String
§name: String
§version: Version
§platform: Vec<String>
§supported_platform: Vec<String>
§summary: Option<String>
§description: Option<String>
§description_content_type: Option<String>
§keywords: Option<String>
§home_page: Option<String>
§download_url: Option<String>
§maintainer: Option<String>
§maintainer_email: Option<String>
§license: Option<String>
§license_files: Vec<PathBuf>
§classifiers: Vec<String>
§requires_dist: Vec<Requirement>
§provides_dist: Vec<String>
§obsoletes_dist: Vec<String>
§requires_python: Option<VersionSpecifiers>
§requires_external: Vec<String>
§project_url: IndexMap<String, String>
§provides_extra: Vec<String>
§scripts: IndexMap<String, String>
§gui_scripts: IndexMap<String, String>
§entry_points: IndexMap<String, IndexMap<String, String>>
Implementations§
source§impl Metadata23
impl Metadata23
source§impl Metadata23
impl Metadata23
sourcepub fn merge_pyproject_toml(
&mut self,
pyproject_dir: impl AsRef<Path>,
pyproject_toml: &PyProjectToml
) -> Result<()>
pub fn merge_pyproject_toml( &mut self, pyproject_dir: impl AsRef<Path>, pyproject_toml: &PyProjectToml ) -> Result<()>
Merge metadata with pyproject.toml, where pyproject.toml takes precedence
pyproject_dir must be the directory containing pyproject.toml
sourcepub fn from_cargo_toml(
manifest_path: impl AsRef<Path>,
cargo_metadata: &Metadata
) -> Result<Metadata23>
pub fn from_cargo_toml( manifest_path: impl AsRef<Path>, cargo_metadata: &Metadata ) -> Result<Metadata23>
Uses a Cargo.toml to create the metadata for python packages
manifest_path must be the directory, not the file
sourcepub fn to_vec(&self) -> Vec<(String, String)>
pub fn to_vec(&self) -> Vec<(String, String)>
Formats the metadata into a list where keys with multiple values become multiple single-valued key-value pairs. This format is needed for the pypi uploader and for the METADATA file inside wheels
sourcepub fn to_file_contents(&self) -> Result<String>
pub fn to_file_contents(&self) -> Result<String>
Writes the format for the metadata file inside wheels
sourcepub fn get_distribution_escaped(&self) -> String
pub fn get_distribution_escaped(&self) -> String
Returns the distribution name according to PEP 427, Section “Escaping and Unicode”
sourcepub fn get_version_escaped(&self) -> String
pub fn get_version_escaped(&self) -> String
Returns the version encoded according to PEP 427, Section “Escaping and Unicode”
sourcepub fn get_dist_info_dir(&self) -> PathBuf
pub fn get_dist_info_dir(&self) -> PathBuf
Returns the name of the .dist-info directory as defined in the wheel specification
Trait Implementations§
source§impl Clone for Metadata23
impl Clone for Metadata23
source§fn clone(&self) -> Metadata23
fn clone(&self) -> Metadata23
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moresource§impl Debug for Metadata23
impl Debug for Metadata23
source§impl<'de> Deserialize<'de> for Metadata23
impl<'de> Deserialize<'de> for Metadata23
source§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>,
source§impl PartialEq for Metadata23
impl PartialEq for Metadata23
source§fn eq(&self, other: &Metadata23) -> bool
fn eq(&self, other: &Metadata23) -> bool
self
and other
values to be equal, and is used
by ==
.source§impl Serialize for Metadata23
impl Serialize for Metadata23
impl Eq for Metadata23
impl StructuralPartialEq for Metadata23
Auto Trait Implementations§
impl Freeze for Metadata23
impl RefUnwindSafe for Metadata23
impl Send for Metadata23
impl Sync for Metadata23
impl Unpin for Metadata23
impl UnwindSafe for Metadata23
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key
and return true
if they are equal.source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key
and return true
if they are equal.