forked from AcademySoftwareFoundation/rez
-
Notifications
You must be signed in to change notification settings - Fork 10
Misc
Marcus Ottosson edited this page Jul 3, 2019
·
6 revisions
- Utilises
doskey
, which works similar toalias
on Linux - Does not work with
rez env -- arbitrary command
- Does not carry across shell, e.g.
start
- Does not respect cmd.exe scope, e.g.
cmd /Q /K doskey python=c:\python27\python.exe $*
affects parent too
-
--%
as argument bypasses interpretation of special characters from thereon out
Rez runs in a shell like cmd
, powershell
and bash
which spawns a Python process, spawning another shell. Here's what spawning your own Python session from within a Rez context looks like.
- Single-digit versions, e.g.
v001
- Representations stored as minor, patch e.g.
v001.fx
for particles,v001.rbd
for collision mesh,v001.lod0
for LODs - Metadata stored in
package.py
, e.g.label
,icon
,comment
andtimestamp
from rez import api
new_context = api.env("python-3", "alita", "six")
current_context = api.context()
loaded_context = api.context("mycontext.rxt")
versions = api.search("maya")
latest = next(versions)
api.call("mayapy", context)
- Repository
- Package
- Resource
- Variant
- FileSystemPackageResource
- FileSystemVariantResource
- Family
You'll want to use a brutal platform_map
for your Windows setup, because of stunts like this.
Machine A
$ C:\Users\marcus\Desktop>systeminfo | findstr /B /C:"OS Name" /C:"OS Version"
OS Name: Microsoft Windows 10 Pro
OS Version: 10.0.17134 N/A Build 17134
$ python
>>> import platform
>>> platform.platform()
'Windows-8-6.2.9200'
>>> from rez.utils.platform_ import platform_
>>> platform_.os
'windows-6.2.9200'
Machine B
$ C:\Users\marcus\Desktop>systeminfo | findstr /B /C:"OS Name" /C:"OS Version"
OS Name: Microsoft Windows 10 Pro
OS Version: 10.0.18362 N/A Build 18362
$ python
>>> import platform
>>> platform.platform()
'Windows-10-10.0.18362'
>>> from rez.utils.platform_ import platform_
>>> platform_.os
'windows-10.0.18362.SP0'
rezconfig.py
For a platform_map
, try this one on for size. I'll make any modern version of Windows (8-10) into Windows 10.
platform_map = {
"os": {
r"windows-6(.*)": r"windows-10",
r"windows-10(.*)": r"windows-10",
},
}
Reproducible software environments
for Windows, Linux and MacOS, written in and for Python
Feel free to edit this wiki
Guides
Table of Contents
- Home
- Getting Started
- Basic Concepts
- Shells
- Patch
- Configuring Rez
- Package Commands
- Package Definition Guide
- Variants
- Contexts
- Suites
- Building Packages
- Environment Variables
- Releasing Packages
- Rez GUI
- Command Line Tools
- Glossary
- Misc
Todo