Is there a repo with example packages for the more standard things?

159 views
Skip to first unread message

Thorsten Kaufmann

unread,
Apr 12, 2016, 4:55:54 PM4/12/16
to rez-config
Hey there,

i am especially aiming at how to properly wrap external apps like nuke, maya and the more difficult patients like Max on windows.

If not this may be worth thinking about.

Cheers,
Thorsten

Sebastian Kral

unread,
Apr 12, 2016, 11:15:43 PM4/12/16
to rez-config
I was wondering the same thing. Anybody?

Marcin Klusek

unread,
Apr 13, 2016, 4:19:07 AM4/13/16
to rez-config
Hi
I'm using very simple wrappers that points to app
"/usr/autodesk/maya2014-x64/bin/maya" "$@"  
"C:\Program Files\Autodesk\Maya2014\bin\maya.exe" %*
People also use symlinks  (check HERE)


Allan Johns

unread,
Apr 13, 2016, 11:53:36 AM4/13/16
to rez-c...@googlegroups.com
So, there's nothing really stopping you from having your package.py point right at an existing installation (of nuke, maya etc). If your installation path is well formed, you can do something like this:

# package.py

name = "maya"

version = "2016.sp2"

variants = [ ["platform-linux", "arch-x86_64", "os-Ubuntu-12.04"] ]

def commands():
    import os.path
    path = os.path.join("/installs/maya/{resolve.platform.version}.{resolve.arch.version}.{resolve.os.version}")
    env.PATH.append(os.path.join(path, "bin"))
    # and so on...


Or, you can take the symlink route, where your rez package contains symlinks (I usually use 'ext' as a convention) and your package's commands refer to paths within your rez package payload. Neither approach is necessarily better.

Hth
A






--
You received this message because you are subscribed to the Google Groups "rez-config" group.
To unsubscribe from this group and stop receiving emails from it, send an email to rez-config+...@googlegroups.com.
To post to this group, send email to rez-c...@googlegroups.com.
Visit this group at https://groups.google.com/group/rez-config.
For more options, visit https://groups.google.com/d/optout.

Thorsten Kaufmann

unread,
Apr 14, 2016, 8:23:55 AM4/14/16
to rez-config
Great! Is there a list of available tokens somewhere?

Also is is there a way to define commands easily? e.g. for nuke the exe is different by version (e.g. Nuke9.0.exe). So when calling without fixed version requirement i do not know which command to use when calling rez-env.

Cheers and sorry for the wealth of stupid questions!
Thorsten

Allan Johns

unread,
Apr 14, 2016, 11:35:22 AM4/14/16
to rez-c...@googlegroups.com
Do you mean you want to create an alias for the actual tool? So if you have nuke-9.0 resolved and you run 'nuke', it runs Nuke9.0.exe?

Rez does not have its own mechanism for this (it does in suites though). It's up to you to provide the alias. On Linux, you'd typically do this either by providing a wrapper script yourself in your own /bin dir in the package; or, you can create aliases like so:

def commands():
    alias("nuke", "Nuke{this.version.major}.{this.version.minor}")

Perhaps some Windows peeps can chime in as to how they achieve tool aliasing?

I need to write the docs for what objects are available in the commands() function (env, this etc); in the meantime you can take a look at the "rex" unit test code (rex is what we call this shell-like API), I think it tests almost every object/function available.

A

Thorsten Kaufmann

unread,
Apr 14, 2016, 11:56:08 AM4/14/16
to rez-config
Perfect, thanks. Will check that out. Will also try and see what the major differences are between Sebastian's "windows_ready" fork and master.
Reply all
Reply to author
Forward
0 new messages