Closed szabgab closed 7 months ago
I have the same issue. In fact this REGEX does not cover the simplest case: -e path/to/package
.
Of course, in such case we cannot get metadata. However, all we need is the pkg name (last bit of the path).
I would have proposed a different fix for this:
I believe the regular expression from https://github.com/madpah/requirements-parser/blob/1ce923617147dd984c280d56cb1f02fcd3589a7c/requirements/requirement.py#L41
should be corrected to
LOCAL_REGEX = re.compile(r'^((?P<scheme>file)://)?(?P<path>[^#]+)(#(?P<fragment>\S+))?')
Also
The first example can be found in https://github.com/jerryjliu/llama_index and pip seems to allow https://pip.pypa.io/en/stable/reference/requirements-file-format/