-
From reading PEP-508 it would appear to me that I should be able to use a relative path to specify an The relevant parts of the grammar from PEP-508 are below
The pkg_resources docs state that the requirements syntax is specified by PEP 508
But the implementation shows that no scheme paths are explicitly not allowed and raise an ...
if req.url:
parsed_url = urllib.parse.urlparse(req.url)
if parsed_url.scheme == "file":
if urllib.parse.urlunparse(parsed_url) != req.url:
raise InvalidRequirement("Invalid URL given")
elif not (parsed_url.scheme and parsed_url.netloc) or (
not parsed_url.scheme and not parsed_url.netloc
):
raise InvalidRequirement(f"Invalid URL: {req.url}") Is not supporting relative paths intentional? Right now the only way to work around this is using a Perhaps the work to move I would love to see setuptools and the larger PyPA ecosystem support relative path based dependencies similar to how they are supported in Rust's Cargo. Finally I think |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
Looks like this has been discussed previously in this thread and the conclusion was to disallow relative paths from install_requires https://discuss.python.org/t/what-is-the-correct-interpretation-of-path-based-pep-508-uri-reference/2815/18 |
Beta Was this translation helpful? Give feedback.
Looks like this has been discussed previously in this thread and the conclusion was to disallow relative paths from install_requires https://discuss.python.org/t/what-is-the-correct-interpretation-of-path-based-pep-508-uri-reference/2815/18