Open kousu opened 4 years ago
I tried the pip._internal
version of parse_requirements
, but the function required a PipSession
object, which felt like a sign that I was doing something I shouldn't (re: accessing internal functions/methods).
I then poked around and found https://stackoverflow.com/a/59971236, which suggests pkg_resources.parse_requirements
. This seems like it might be the proper way of accessing the "official" user-facing requirements parser for pip/setuptools?
There are some differences worth noting, though:
Apart from that, they seem pretty comparable?
It looks like this used to be a feature of pip itself: https://stackoverflow.com/questions/25192794/no-module-named-pip-req#49867265
You can still use it with