Created
November 6, 2020 17:33
-
-
Save davidlatwe/22dfc40bacd564d49d01f18dc5a6c3fa to your computer and use it in GitHub Desktop.
Testing Allzpark with memory-based package repository
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import os | |
import sys | |
from rez.config import config as rezconfig | |
from allzpark import cli, allzparkconfig | |
os.environ["PATH"] += ";C:/Graphviz/bin" | |
# os.environ["ALLZPARK_NOTHREADING"] = "1" | |
os.environ["REZ_PACKAGES_PATH"] = os.pathsep.join([ | |
"memory@any", | |
# for installed packages | |
"C:/Users/davidlatwe.lai/rez/packages/install", | |
"T:/rez-studio/release", | |
]) | |
rezconfig.platform_map = { | |
"os": { | |
r"windows-6.1(.*)": r"windows-7", | |
r"windows-6.2(.*)": r"windows-8", | |
r"windows-6.3(.*)": r"windows-8.1", | |
r"windows-10(.*)": r"windows-10.0", | |
}, | |
} | |
def memory_repository(packages): | |
from allzpark import _rezapi as rez | |
repository = rez.package_repository_manager.get_repository("memory@any") | |
repository.data = packages | |
PROFILE_NAME = "profile" | |
PROFILE = { | |
"1.0.0": { | |
"name": PROFILE_NAME, | |
"version": "1.0.0", | |
"requires": [ | |
"bar", | |
"~maya==2020|==2018", | |
"~usd", | |
], | |
"_data": { | |
"label": "My Mem Profile" | |
}, | |
"ozark_profile": True, | |
"roles": ["davidlatwe.lai"], | |
# "commands": "", | |
} | |
} | |
if __name__ == "__main__": | |
memory_repository({ | |
PROFILE_NAME: PROFILE, | |
# packages | |
"bar": { | |
"1.0.0": { | |
"name": "bar", | |
"version": "1.0.0", | |
} | |
}, | |
}) | |
def profiles(): | |
return [PROFILE_NAME] | |
allzparkconfig.profiles = profiles | |
sys.exit(cli.main()) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment