glamorous-accountant-97217
12/07/2022, 11:11 PM./pants export ::
and got some interpreters for tools under virtualenvs
as well as a virtualenv
that comes with message Wrote virtualenv (using Python 3.10.8) to dist/export/python/virtualenv
. the pytest env had pytest and some dependencies on my project’s sources, but it was missing numpy, which is a transitively required third party dependency. am I doing something wrong?glamorous-accountant-97217
12/12/2022, 7:24 PMenough-analyst-54434
12/12/2022, 7:25 PMglamorous-accountant-97217
12/13/2022, 4:52 PMenough-analyst-54434
12/13/2022, 4:53 PMglamorous-accountant-97217
12/13/2022, 4:53 PMexport
doesn’t recognize the flag --resolve
. the flag doesn’t seem to be documented: https://www.pantsbuild.org/docs/reference-exportenough-analyst-54434
12/13/2022, 4:56 PMenough-analyst-54434
12/13/2022, 4:57 PMglamorous-accountant-97217
12/13/2022, 4:57 PMenough-analyst-54434
12/13/2022, 4:58 PMpython-default
is just the default resolve name with you enable_resolves (https://www.pantsbuild.org/docs/reference-python#enable_resolves), if you've set up a custom resolve name, use that.enough-analyst-54434
12/13/2022, 4:58 PMglamorous-accountant-97217
12/13/2022, 4:59 PMenable_resolves
in any pants configurationenough-analyst-54434
12/13/2022, 4:59 PMpython-default
. The 2.15 improvement is to be able to export just 1 venv instead of all tools venvs + all your own.enough-analyst-54434
12/13/2022, 5:00 PMenough-analyst-54434
12/13/2022, 5:00 PMenough-analyst-54434
12/13/2022, 5:00 PMglamorous-accountant-97217
12/13/2022, 5:01 PMglamorous-accountant-97217
12/13/2022, 5:03 PMenough-analyst-54434
12/13/2022, 5:05 PMglamorous-accountant-97217
12/13/2022, 5:06 PMenable_resolves = true
, rm -rf ~/.cache/pants ~/.pex dist .pids .pants.d
, then ./pants generate-lockfiles --resolve=pytest
and ./pants export
. The only outputs I get are my test tools in dist/export/python/virtualenvs/tools/glamorous-accountant-97217
12/13/2022, 5:07 PMglamorous-accountant-97217
12/13/2022, 5:12 PMsources
field: “3rdparty/python/default.lock”`enough-analyst-54434
12/13/2022, 5:12 PMenough-analyst-54434
12/13/2022, 5:13 PM./pants generate-lockfiles
glamorous-accountant-97217
12/13/2022, 5:13 PM./pants generate-lockfiles --lockfile=pytest
already. i need to remove the flagenough-analyst-54434
12/13/2022, 5:13 PMenough-analyst-54434
12/13/2022, 5:13 PMenough-analyst-54434
12/13/2022, 5:14 PMenough-analyst-54434
12/13/2022, 5:14 PMenough-analyst-54434
12/13/2022, 5:15 PMenough-analyst-54434
12/13/2022, 5:16 PMpython-default
venv.glamorous-accountant-97217
12/13/2022, 5:21 PMpytest
as you said it might. isn’t that the correct behavior since my project itself shouldn’t depend on pytest?glamorous-accountant-97217
12/13/2022, 5:26 PM./pants generate-lockfiles --lockfile=pytest
since the very beginning (even before solving this IDE problem) just to run my ./pants test
commandsenough-analyst-54434
12/13/2022, 5:33 PMisn’t that the correct behavior since my project itself shouldn’t depend on pytest?Yes, it's the correct behavior. Just not useful for you. So this is where I led with "If that venv does not include pytest itself you'll need to add deps for it as a hack."
enough-analyst-54434
12/13/2022, 5:35 PMglamorous-accountant-97217
12/13/2022, 5:35 PMglamorous-accountant-97217
12/13/2022, 5:35 PM