Skip to content

Commit

Permalink
Merge python package metadata with pyproject.toml
Browse files Browse the repository at this point in the history
  • Loading branch information
messense committed May 29, 2021
1 parent e708a89 commit 9eac488
Showing 1 changed file with 16 additions and 1 deletion.
17 changes: 16 additions & 1 deletion src/metadata.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
use crate::CargoToml;
use crate::{CargoToml, PyProjectToml};
use anyhow::{Context, Result};
use fs_err as fs;
use regex::Regex;
Expand Down Expand Up @@ -76,6 +76,21 @@ fn path_to_content_type(path: &Path) -> String {
}

impl Metadata21 {
/// Merge metadata with pyproject.toml
///
/// manifest_path must be the directory, not the file
pub fn merge_pyproject_toml(
&mut self,
pyproject_toml: &PyProjectToml,
manifest_path: impl AsRef<Path>,
) -> Result<()> {
// FIXME: where to find `pyproject.toml`? relative to manifest_path? relative to working directory?
if let Some(project) = &pyproject_toml.project {

}
Ok(())
}

/// Uses a Cargo.toml to create the metadata for python packages
///
/// manifest_path must be the directory, not the file
Expand Down

0 comments on commit 9eac488

Please sign in to comment.