bleeding-rez
bleeding-rez copied to clipboard
rez venv
Goal
Provide a virtual environment to Rez
Motivation
The command docker run -ti centos:7
creates an isolated environment for a given OS and puts you inside of it.
An empty rez env
establishes a clean environment for the end user, but packages from within this location still reference the default ~/packages
path; for both search and install of packages. The same goes for any rezconfig.py
in the users home directory and anything else related to the current user, like the PowerShell $profile
.
The benefit of the isolated environment provided by Docker is that you can use it to experiment with software in a new environment. To make sure that your program runs on any machine other than yours. rez env
almost accomplishes this, and just needs a nudge in the right direction to be almost identical to a Docker environment, except still bound to the current OS.
Implementation
rez venv myenv
would work like rez env
, except it would also establish the REZ_PACKAGES_PATH
, REZ_LOCAL_PACKAGES_PATH
and REZ_RELEASE_PACKAGES_PATH
in the created myenv
directory. Similar to python -m virtualenv myenv
, except for Rez packages.
rez venv myenv
# ... creating virtual environment ...
myenv\activate
> $ cd my_package
> $ rez build --install
# ... installing into virtual environment ..
Features
- Persistent environment, like Python's venv and Conda
- Install Rez packages in this environment
- Install system software (?)
- Unique executables, such as
python.exe
andsite-packages
(?) - Unique REZ_PACKAGES_PATH and friends
- Unique home directory, for local Rez packages and other user-specific files