It seems relying on a `python_distribution` causes...
# general
c
It seems relying on a
python_distribution
causes the 3rd-party dependencies to not be pulled into the pex when running
pants test
on Pants
2.11.0
h
c
in-repo module A relies on in-repo module B. Module B imports
requests
and therefore depends on
3rd-party:requirements#requests
. When I run
./pants test moduleA:tests
, I get an error like:
Copy code
requests
    Required by:
      FingerprintedDistribution(distribution=<module b> (/home/noah/.cache/pants/named_caches/pex_root/installed_wheels/ae2ba9abca520ff2fa23cb26a38330425f4437d0b6be8f0b85b74333a92829e4/module-b.whl), fingerprint='ab7ec30f071d8409df133ec1165fb54382eab9c4aea5c1715e9b65d1714c8638')
    But this pex had no 'requests' distributions.
Though I think the issue might be that some transitive in-module dependencies rely on the module B
python_distribution
while others rely on some files directly in module B instead of the distribution, potentially via dependency inference
I think the issue is that there's this scenario Module A depends on Module B and C Module B depends on
requests
Module A depends on Module B's
python_distribution
Module C depends on moduleB/some/inner/target