Hey friends, is it possible to export a new virtua...
# general
r
Hey friends, is it possible to export a new virtualenv with just a subset of dependencies from a lockfile? Also, is it possible to use
-r requirements.txt
inside another
requirements.txt
file to combine subset of requirements using pants? I tried, but differently from what happens using pip, it only installed dependencies from the "child"
requirements.txt
file and it ignored everything that should be imported from the "root" file.
Just a quick reply, so other people can check it in the future: YES, you can create resolves based on other resolves. I was being dumb because I got confused by the
python_requirements
and
python_requirement
docs, hehe. If you have a small set of dependencies and want to build a few resolves with some additions and create venvs from them, just this doc: https://www.pantsbuild.org/docs/reference-python_requirement You can set a target as a dependency and add your new dependencies to create a new resolve. It's pretty cool! 🙂
c
also, if you want to leverage multiple
requirements.txt
files, you can simply have multiple
python_requirements
targets (one for each file) using the same
resolve
for them.