A library for dependency specifiers
previously known as PEP 508
Usage
use std::str::FromStr;
use uv_pep508::{Requirement, VerbatimUrl};
use uv_normalize::ExtraName;
let marker = r#"requests [security,tests] >= 2.8.1, == 2.8.* ; python_version > "3.8""#;
let dependency_specification = Requirement::<VerbatimUrl>::from_str(marker).unwrap();
assert_eq!(dependency_specification.name.as_ref(), "requests");
assert_eq!(dependency_specification.extras, vec![ExtraName::from_str("security").unwrap(), ExtraName::from_str("tests").unwrap()].into());