fierce-crowd-57292
11/05/2022, 8:35 AM├── README.md
├── pants
├── pants.toml
└── projectdir
├── BUILD
├── requirements.txt
└── tool
├── BUILD
├── __main__.py
└── backend.py
projectdir/requirements.txt
specify dependenceis, used in projectdir/tool/backend.py
The projectbuild/BUILD
has
python_requirements(
name="reqs",
)
That should parse requireements.txt.
But if query the dependencies from projectdir/tool/backend.py
it’s nothing there../pants dependencies --transitive projectdir/tool/backend.py
I’ve create very simple repo that demonstrates it.
https://github.com/golovasteek/pants_sample_project
How do I ensure that dependencies in the projectdir/tool
are properly inferred with respect to projectdir/requirements.txt
?high-magician-46188
11/05/2022, 12:38 PMpants dependencies --transitive projectdir/tool/backend.py
and got:
13:30:58.53 [INFO] Initializing scheduler...
13:30:58.81 [INFO] Scheduler initialized.
projectdir/requirements.txt:reqs
projectdir:reqs#requests
If you get a different result, what is it?
If it’s the same, what did you expect to happen differently?fierce-crowd-57292
11/05/2022, 1:24 PMenough-analyst-54434
11/05/2022, 5:50 PMdependencies
goal doesn't warn, but other goals should by default IIUC: https://www.pantsbuild.org/docs/reference-python-infer#unowned_dependency_behavior