<#17759 Visibility: cannot match `python_requireme...
# github-notifications
q
#17759 Visibility: cannot match `python_requirements` specified at the root level Issue created by jake-sigtech Describe the bug Using the new visibility feature
__dependencies_rules__
I cannot target a requirements file at the root project level. Example:
//:requirements#numpy
A workaround for now is to use a glob:
//**/:requirements#numpy
. I think the issue is related to this line here. I'm not sure it should remove the
//
prefix. I think the intention is to remove
./././
and
/././.
prefixes. Pants version 2.16.0.dev1 OS MacOS. Additional info My repo layout is:
Copy code
core/BUILD
pants
pants.toml
<http://requirements.in|requirements.in>
BUILD
In `BUILD`:
python_requirements
are specified as
python_requirements(name="requirements", source="<http://requirements.in|requirements.in>")
In `core/BUILD`: Visibility is defined as: This doesn't work:
Copy code
__dependencies_rules__(
      (
        "*",
        "/**",
        "//:requirements#numpy",
        "!*"
      ),
)
This does work:
Copy code
__dependencies_rules__(
      (
        "*",
        "/**",
        "//**/:requirements#numpy",
        "!*"
      ),
)
pantsbuild/pants