requirementslib
requirementslib copied to clipboard
Support parsing and formatting PEP 345-style dependency strings
https://www.python.org/dev/peps/pep-0345/#requires-dist-multiple-use
Not sure whether this is a good idea, but just throwing it out here. This would be useful to interface with other tools e.g. Flit, which uses this style to specify requirements.
The parsing part is probably already supported (because packaging is used), but the formatting would need additional implementation.
is this for resolution or for creating a requirement? IF the latter, what doesn't work atm?
Specifically I’m experimenting on a PEP 517 build system that interfaces with Pipfile. That means I’ll need to extract Pipfile entries and convert them into Wheel and SDist metadata. They both specify dependencies in PEP 345 format.
you're talking about pyproject.toml style implementations though right? Pep 345 metadata is already parsed somewhere, I just need to see an example project that has it implemented
The parsing part is likely already supported, but it’d be helpful to be about to output to that form. Currently I’m formatting the line myself.
I believe this is supported now, but willing to re-open if I am off-base.