Parse Python package metadata from sdist and bdists and etc. A Rust port of the pkginfo Python library.
Add it to your Cargo.toml
:
[dependencies]
python-pkginfo = "0.5"
then you are good to go. If you are using Rust 2015 you have to add extern crate python_pkginfo
to your crate root as well.
use python_pkginfo::Distribution;
fn main() {
let dist = Distribution::new("path/to/package.whl").unwrap();
println!("{:#?}", dist.metadata());
}
This work is released under the MIT license. A copy of the license is provided in the LICENSE file.