big-xylophone-43403
05/03/2021, 6:20 PMbig-xylophone-43403
05/03/2021, 6:21 PMextra_requires
dependency of A.big-xylophone-43403
05/03/2021, 6:21 PMbig-xylophone-43403
05/03/2021, 6:21 PMbig-xylophone-43403
05/03/2021, 6:21 PMhundreds-father-404
05/03/2021, 6:38 PMextra_requires
, then you would want to update your requirements.txt
to say my_req[the_extra]
, rather than my_req
. Otherwise Pants won't install that extra for youbig-xylophone-43403
05/03/2021, 7:26 PMbig-xylophone-43403
05/03/2021, 7:34 PMrequirements.txt
file and build a new requirements.pex?hundreds-father-404
05/03/2021, 7:48 PMbig-xylophone-43403
05/03/2021, 7:54 PMbig-xylophone-43403
05/03/2021, 7:55 PMreq[extra_req]
format. But the test that depends on extra_req
still failedbig-xylophone-43403
05/03/2021, 7:56 PM14:42:29.24 [INFO] Completed: Building requirements.pex with 2 requirements: CherryPy[routes], six
hundreds-father-404
05/03/2021, 7:56 PMIt did not. I had to clear the ~/.cache/pants directory for it to pick up the requirements.txt changeHm, where is your
requirements.txt
located in your repo?big-xylophone-43403
05/03/2021, 8:01 PMbig-xylophone-43403
05/03/2021, 8:02 PMsrc/python/ns/pkg-1/requirements.txt
and src/python/ns/pkg-2/requirements.txt
. ns
being the namespace.big-xylophone-43403
05/03/2021, 8:03 PMBUILD
file with python_requirements
at root of both packageshundreds-father-404
05/03/2021, 8:06 PMpants.toml
as a temporary workaround
[GLOBAL]
pantsd_invalidation_globs.add = ["**/requirements.txt"]
This is a long standing bug that causes the pants daemon to not be invalidated properly. ~/.cache/pants
shouldn't be the issue, but the daemon is memoizing things such that even wiping that folder wouldn't invalidate things because it's still memoized
Please try running the test again with that change madebig-xylophone-43403
05/03/2021, 8:19 PMhundreds-father-404
05/03/2021, 8:21 PM./pants dependencies path/to/test.py
show? You said the requirement you do import is showing up, right?
Solely to get the test working, you can try adding to the dependencies
field that other req that isn't being installed. It will help confirm what the issue is:
python_tests(..., dependencies=["src/python/ns/pkg-2:dep_b"])
big-xylophone-43403
05/03/2021, 9:59 PM./pants dependencies
lists the source file that the test importsbig-xylophone-43403
05/03/2021, 10:37 PMpython_tests
target in the pkg BUILD file