How does `./pants export --resolve=...` (or more l...
# general
p
How does
./pants export --resolve=...
(or more likely the underlying
pex
?) determine which version of
pip
and
setuptools
gets installed in the exported venv? The version of
pip
is not locked, so I'm not surprised to see a different version when exported with any of
python3.6
,
python3.7
, and
python3.8
. But
setuptools
is in the lockfile. When I export with
python3.6
or
python3.7
, I get the version of setuptools in my lockfile. With
python3.8
, I get a newer version of
setuptools
. NB: This is with the default
--py-resolve-format=mutable_virtualenv
. With
--py-resolve-format=symlinked_immutable_virtualenv
then all of them have the correct locked version of
setuptools
and do not have
pip
.
I'm on pants 2.16.0a0
e
For Python 3, venvs are bootstrapped via
-m venv
and Pip is installed via: https://github.com/pantsbuild/pex/blob/86ecdeb52a3f8ce434339cdf6d62d382fb99dfd0/pex/venv/virtualenv.py#L350-L379