mottosso / bleeding-rez

Rez - Reproducible software environments for Windows, Linux and MacOS
GNU Lesser General Public License v3.0
72 stars 10 forks source link

rez venv #76

Open mottosso opened 5 years ago

mottosso commented 5 years ago

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