How to Build and Release packages with OS/Platform variants #1547
-
Hello everyone! In the last couple weeks I have been trying to set rez up for my already existing Maya plugins. I ran into an issue when handling the different platforms with Variants. However, when I now want to call I could do Am I missing something obvious here? Thank you for your help! |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
One way to solve this is to use the @early
def variants():
import platform
from rez.package_py_utils import expand_requires
if platform.system() not in ["Linux", "Windows"]:
# I'm not 100% sure what exception we should raise though.
raise RuntimeError("asdasd")
return [["maya-2022"] + expand_requires("platform-**")] See https://rez.readthedocs.io/en/stable/api/rez.package_py_utils.html#rez.package_py_utils.expand_requires and https://rez.readthedocs.io/en/stable/package_definition.html#early-binding-functions. |
Beta Was this translation helpful? Give feedback.
One way to solve this is to use the
expand_requires
function like this:See https://rez.readthedocs.io/en/stable/api/rez.package_py_utils.html#rez.package_py_utils.expand_requires and https://rez.readthedocs.io/en/stable/package_definition.html#early-binding-functions.