https://pantsbuild.org/ logo
#general
Title
# general
h

high-yak-85899

05/04/2022, 6:33 PM
I think I know the answer to this, but is there any way to do a
pip install
and point to the pex-based constraints file pants can generate? My context is that I'd really like to switch to the native lockfile generation pants offers, but we still have some tests that rely on a venv-style setup. We currently have
requirements.txt
,
requirements-dev.txt
(which contains things like
pytest
, etc.) and
constraints.txt
generated by
pip-tools
based on those two source files. Pants is happy to use
constraints.txt
even though it contains more information than it actually needs right now. If I generate the lockfile from
generate-lockfiles
, that only reflects
requirements.txt
. I can
./pants export
to get a venv, and then
pip install -r requirements-dev.txt
in that venv, but I'm losing some reproduceability there as that pip install command no longer has a lockfile to look at.
1