-
-
Notifications
You must be signed in to change notification settings - Fork 642
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
docs: mention that python requirements need to be specified using full address from the root #21293
docs: mention that python requirements need to be specified using full address from the root #21293
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the patch. Seems reasonable to document the current behaviour... but, why do we have this behaviour? Can we allow path/to:requirement
to work too, not just //path/to:requirement
?
cff12ff
to
7ac339a
Compare
I've extended the help to clarify why this is necessary. The reqs might be in the form of VCS requirements that resembles the addresses (with colons in between), see https://pip.pypa.io/en/stable/topics/vcs-support/. So the pants/src/python/pants/backend/python/util_rules/pex.py Lines 476 to 491 in 7ac339a
|
7ac339a
to
b09e482
Compare
…l address from the root
b09e482
to
d2c0d36
Compare
Ah, cool, nice find and good thinking to explain the background in the docs 👍 |
It may be not so obvious that referring to the Python requirements using their "regular" path produced by the
list
goal will not be compatible with the format expected in the[tool].requirements
field, see https://www.pantsbuild.org/2.21/reference/subsystems/ruff#requirements:The target should be referred to as
requirements = ["//3rdparty/python:flake8"]
. If it's not (e.g. using3rdparty/python:flake8
), then an error is raised: