Skip to main content

distrib_python/
load.rs

1// This is free and unencumbered software released into the public domain.
2
3use super::{Contact, License, LoadPyprojectError, PyprojectToml};
4use std::path::Path;
5
6pub fn load_pyproject_toml(path: impl AsRef<Path>) -> Result<PyprojectToml, LoadPyprojectError> {
7    let input = std::fs::read_to_string(path.as_ref())?;
8    Ok(pyproject_toml::PyProjectToml::new(&input)?)
9}