• Stars
    star
    939
  • Rank 48,667 (Top 1.0 %)
  • Language
    Python
  • License
    Apache License 2.0
  • Created over 12 years ago
  • Updated 2 months ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

An integrated package configuration, build and deployment system for software

Release Pypy Release
Core Ubuntu Mac Windows
Installation Flake8 Wiki Pypi Benchmark
Quality Gate Status Bugs Vulnerabilities Maintainability Rating Reliability Rating Security Rating

What Is Rez?

Rez is a cross-platform package manager with a difference. Using Rez you can create standalone environments configured for a given set of packages. However, unlike many other package managers, packages are not installed into these standalone environments. Instead, all package versions are installed into a central repository, and standalone environments reference these existing packages. This means that configured environments are lightweight, and very fast to create, often taking just a few seconds to configure despite containing hundreds of packages.

See the wiki for full documentation.


Typical package managers install packages into an environment



Rez installs packages once, and configures environments dynamically


Rez takes a list of package requests, and constructs the target environment, resolving all the necessary package dependencies. Any type of software package is supported - compiled, python, applications and libraries.

The Basics

Packages are stored in repositories on disk. Each package has a single concise definition file (package.py) that defines its dependencies, its commands (how it configures the environment containing it), and other metadata. For example, the following is the package definition file for the popular requests python module:

name = "requests"

version = "2.8.1"

authors = ["Kenneth Reitz"]

requires = [
    "python-2.7+"
]

def commands():
    env.PYTHONPATH.append("{root}/python")

This package requires python-2.7 or greater. When used, the 'python' subdirectory within its install location is appended to the PYTHONPATH environment variable.

When an environment is created with the rez API or rez-env tool, a dependency resolution algorithm tracks package requirements and resolves to a list of needed packages. The commands from these packages are concatenated and evaluated, resulting in a configured environment. Rez is able to configure environments containing hundreds of packages, often within a few seconds. Resolves can also be saved to file, and when re-evaluated later will reconstruct the same environment once more.

Examples

This example places the user into a resolved shell containing the requested packages, using the rez-env tool:

]$ rez-env requests-2.2+ python-2.6 'pymongo-0+<2.7'

You are now in a rez-configured environment.

resolved by [email protected], on Wed Feb 26 15:56:20 2014, using Rez v2.0.0

requested packages:
requests-2.2+
python-2.6
pymongo-0+<2.7

resolved packages:
python-2.6.8    /software/ext/python/2.6.8
platform-linux  /software/ext/platform/linux
requests-2.2.1  /software/ext/requests/2.2.1/python-2.6
pymongo-2.6.3   /software/ext/pymongo/2.6.3
arch-x86_64     /software/ext/arch/x86_64

> ]$ _

This example creates an environment containing the package 'houdini' version 12.5 or greater, and runs the command 'hescape -h' inside that environment:

]$ rez-env houdini-12.5+ -- hescape -h
Usage: hescape [-foreground] [-s editor] [filename ...]
-h: output this usage message
-s: specify starting desktop by name
-foreground: starts process in foreground

Resolved environments can also be created via the API:

>>> import subprocess
>>> from rez.resolved_context import ResolvedContext
>>>
>>> r = ResolvedContext(["houdini-12.5+", "houdini-0+<13", "java", "!java-1.8+"])
>>> p = r.execute_shell(command='which hescape', stdout=subprocess.PIPE)
>>> out, err = p.communicate()
>>>
>>> print(out)
'/software/ext/houdini/12.5.562/bin/hescape'

Quickstart

First, install Rez. Download the source, and from the source directory, run (with DEST_DIR replaced with your install location):

]$ python ./install.py -v DEST_DIR

This installs the Rez command line tools. It will print a message at the end telling you how to use Rez when the installation has completed. Rez is not a normal Python package and so you do not typically install it with pip or setup.py. Do not move the installation - re-install to a new location if you want to change the install path. If you want to install rez for multiple operating systems, perform separate installs for each of those systems.

Next, you need to create some essential Rez packages. The rez-bind tool creates Rez packages that are based on software already installed on your system. Try binding the following list of packages (note that for Python, you may need administrative privileges):

]$ rez-bind platform
]$ rez-bind arch
]$ rez-bind os
]$ rez-bind python

Now you should be able to create an environment containing Python. Try this:

]$ rez-env python -- which python
/home/ajohns/packages/python-2.7.8/platform-linux/arch-x86_64/os-Ubuntu-12.04/bin/python

Building Your First Package

The rez-build tool is used to build packages and install them locally (typically to $HOME/packages). Once you've done that, you can use them via rez-env, just like any other package:

]$ cd example_packages/hello_world
]$ rez-build --install
...
]$ rez-env hello_world -- hello
Hello world!

Features

  • Supports Linux, OSX and Windows;
  • Allows for a fast and efficient build-install-test cycle;
  • Creates shells of type: bash, tcsh, other (shells can be added as plugins);
  • Contains a deployment system supporting git, mercurial and svn (as plugins);
  • Environment resolves can be saved to disk and reused at a later date (a bit like VirtualEnv);
  • Highly pluggable, supports five different plugin types to do things from adding new shell types, to adding new build systems;
  • Contains a version resolving algorithm, for avoiding version clashes;
  • Visualises resolved environments in a rendered dot-graph;
  • Packages are found in a search path, so different packages can be deployed to different locations;
  • Supports alphanumeric version numbers;
  • Has a powerful version requirements syntax, able to describe any version range, and a conflict operator for rejecting version ranges;
  • Package 'variants' - a way to define different flavors of the same package version, for example a plugin built for multiple versions of the host app;
  • Custom release hooks (such as post-release operations) can be added as plugins;
  • Has a time lock feature, which allows old resolves to be recreated (newer packages are ignored);
  • Package definitions are a single, succinct file;
  • Packages define their effect on the environment (adding to PATH etc) in a platform- and shell- agnostic way, using a dedicated python API;
  • Has a memcached-based caching system, for caching environment resolves;
  • Has a package filtering feature, allowing for staged package releases such as alpha and beta packages.

Known issues and limitations

  • Currently CMake builds do not function on Windows with Rez and the related tests are skipped. A fix requires multiple changes that are on the roadmap. Users have successfully implemented workarounds to utilize CMake with Rez under Windows, but the goal is to provide a seamless experience on any platform in the future. For details see this issue

More Repositories

1

openvdb

OpenVDB - Sparse volume data structure and tools
C++
2,599
star
2

OpenShadingLanguage

Advanced shading language for production GI renderers
C++
2,100
star
3

OpenImageIO

Reading, writing, and processing images in a wide variety of file formats, using a format-agnostic API, aimed at VFX applications.
C++
1,966
star
4

MaterialX

MaterialX is an open standard for the exchange of rich material and look-development content across applications and renderers.
C++
1,830
star
5

OpenColorIO

A color management framework for visual effects and animation.
C++
1,781
star
6

openexr

The OpenEXR project provides the specification and reference implementation of the EXR file format, the professional-grade image storage format of the motion picture industry.
C
1,624
star
7

OpenTimelineIO

Open Source API and interchange format for editorial timeline information.
Python
1,457
star
8

OpenCue

A render management system you can deploy for visual effects and animation productions.
Python
824
star
9

xstudio

xSTUDIO is a modern, high performance and feature rich playback and review application designed for organisations and individuals in the post production, VFX and Animation industries.
C++
628
star
10

OpenRV

Open source version of RV, the Sci-Tech award-winning media review and playback software.
C++
575
star
11

OpenPBR

Specification and reference implementation for the OpenPBR Surface shading model
CSS
430
star
12

openfx

OpenFX effects API
C++
406
star
13

Imath

Imath is a C++ and python library of 2D and 3D vector, matrix, and math operations for computer graphics
C++
373
star
14

OpenColorIO-Config-ACES

Python
263
star
15

aswf-docker

Common container configuration
Python
149
star
16

rawtoaces

RAW to ACES Utility
C++
141
star
17

aswf-landscape

๐ŸŒ„Landscape for popular open source projects used in the motion picture industry. This interactive landscape similar to that of the CNCF Landscape (https://l.cncf.io/) that sorts through popular open source projects used for visual effects, animation, and image creation, and shows details including GitHub stars, funding or market cap, first and last commits, contributor count and many more.
121
star
18

openexr-images

Collection of images associated with the OpenEXR distribution
98
star
19

tac

Materials and meeting notes for the ASWF Technical Advisory Council (TAC)
HTML
93
star
20

wg-usd

USD Working Group collaboration and resources
61
star
21

OpenImageIO-images

OpenImageIO test images
Shell
37
star
22

EncodingGuidelines

This site provides guidelines for encoding frames to movie files for review.
Dockerfile
33
star
23

foundation

Academy Software Foundation foundation level resources, such as the charter, FAQ about the project, and other public assets
Python
17
star
24

archived-ci-management

Archived -- April 29, 2020 -- Jenkins job and cloud configuration
Shell
16
star
25

opencue.io

Source for OpenCue website
HTML
15
star
26

openvdb-website

The source code behind https://www.openvdb.org
JavaScript
13
star
27

aswf-sample-project

ASWF Sample Project
CMake
13
star
28

wg-python3

Python 3 Working Group
12
star
29

ori-shared-platform

Python
12
star
30

dpel-website

Website for the Digital Production Example Library
Astro
8
star
31

wg-ci

ASWF Continuous Integration Working Group
8
star
32

artwork

๐ŸŽจASWF related logos and artwork
HTML
8
star
33

ColorInterop

Color Interop Forum
7
star
34

openexr-examples

Example code using the OpenEXR library
C++
6
star
35

wg-review-approval

Review and Approval WG
4
star
36

materialx-website

Source files for www.materialx.org
HTML
3
star
37

aswf-sample-wg

Repository template for a working group
3
star
38

openreviewinitiative-test

Test for CLAs for Open Review Initiative
2
star
39

rez-test

2
star
40

openexr-website

The OpenEXR website
1
star
41

Imath-website

The Imath website
1
star
42

wg-assets

Asset Repository WG
1
star