Another export question - I noticed that the ./bin...
# general
l
Another export question - I noticed that the ./bin directory in the venv created by
pants export ::
does not have a "pip" file in it. Is that by design? My use case for it is using e.g.
pip list | more
as a quick test of what's in the venv for when I want to run something outside of running it via pants
e
Its not really by design. For all internal venvs Pants omits pip on purpose. We don;t want internal venvs ever mutated. For export, we should provide pip.
Yeah, this is done here: https://github.com/pantsbuild/pants/blob/793a39e7d6898f9920d264eafaaf4c7b9f37bc44/src/python/pants/backend/python/goals/export.py#L79-L113 So we use the immutable intenral venv infra and then create a symlink to one of these. That has a speed advantage, but robs you of a mutable venv.
I don't think @happy-kitchen-89482 set it up this way intentionally (immutable) and was probably only gunning for speed / re-use. @lively-exabyte-12840 this is certainly a feature that could be implemented. The only real question I can see is if it should be the default or behind an option or both.
l
Thanks, I'll write up a ticket if it seems like a need for my team
👍 2
e
Excellent. Thank you.
c
For the purposes of quickly creating a venv for tinkering in, this has come up when talking to my team as well.. not sure how frequently it would be used, but it helps ease new users into the Pants world, to be able to offer functionality that is familiar (a venv with pip in it).
👍 2
l
I definitely see this as easing new users into the Pants world, where it might be used a lot early on and then rarely used later on once the team is confident with Pants
👍 1
h
That makes sense to me! Given that you both think this would be helpful to newcomers, @lively-exabyte-12840 would you be willing to please open a feature request? https://github.com/pantsbuild/pants/issues/new/choose That helps us a lot with project planning
👍 1
h
Correct - that venv is not immutable on purpose, I just did the easiest thing that works when implementing export...
l
Just closing the loop on this - https://github.com/pantsbuild/pants/issues/14622
👍 1
h
Thanks!
Let me think about how to do this