(
path: std::path::PathBuf,
schema: Option<SourceInfoSchema>,
)
| 32 | #[pyfunction] |
| 33 | #[pyo3(signature = (path, schema = None))] |
| 34 | pub fn source_info_from_file( |
| 35 | path: std::path::PathBuf, |
| 36 | schema: Option<SourceInfoSchema>, |
| 37 | ) -> Result<SourceInfo, crate::srcinfo::error::Error> { |
| 38 | let schema: Option<alpm_srcinfo::SourceInfoSchema> = schema.map(From::from); |
| 39 | let inner = alpm_srcinfo::SourceInfo::from_file_with_schema(&path, schema)?; |
| 40 | Ok(inner.into()) |
| 41 | } |
| 42 | |
| 43 | #[pymodule(gil_used = false, name = "source_info", submodule)] |
| 44 | pub mod py_source_info { |
no outgoing calls