Patch - mottosso/bleeding-rez GitHub Wiki
Modify an existing context.
- Add a package
- Remove a package
- Increase specificity of a request
$ rez env python git 7zip PyQt5
> $ rez env python-2.7 --patch
This will establish an environment with the latest version of Python available, let's say it's 3.7. Then, it will patch this environment, with a specific version of Python, 2.7. As a result, the available python package changes to - as opposed to co-exists with - Python 3.7. Since PySide2 is dependent on a specific version of Python, it too must change to accommodate this new requirement.
A package can also be removed from a context.
$ rez env python-3 git
> $ rez env ^python-3 --patch
> $ python --version
# `python` not found
However, only packages part of the request may be removed which means that if you request mkdocs and get tornado as a requirement, you aren't able to remove tornado but may remove mkdocs itself.