Jump to content

package environment variables


probiner

Recommended Posts

Hi
I'm trying to tidy up a collection of assets and scripts done over the years across different licensings and python versions and I'm not being able to have the package system to conditionally load a python path according to the houdini license and python version being used.


I was successful to use houdini_version, for example, to have different renderman versions loaded depending:

   
{
"HOUDINI_PATH":
        [
            {"houdini_version  == '18.5.351'": "$RFHTREE/18.5.351"},
            {"houdini_version == '18.5.596'": "$RFHTREE/18.5.596"},
            {"houdini_version == '18.5.633'": "$RFHTREE/18.5.633"}
    ]}

I also tested houdini_os sucessfully, but what I was interested in, houdini_python, doesn't seem to work. Anyone used it successfully?

Simple example:

{
    "env": [
        {"bar":
            [
                {"houdini_os == 'windows'": "windows"},
                {"houdini_os == 'linux'": "linux"}
            ]
        },
        {"foo":
            [
                {"houdini_python == 'python2'": "pypath2"},
                {"houdini_python == 'python3'": "pypath3"}
            ]
        }
    ]
}

Which results in no print for the one using houdini_python in a Houdini Python Shell:
image.png.93b53a27387b2accc4ddb9573ff72800.png

No clue why it prints nothing instead of 'pypath2'
.json attached.

Another thing I was looking for would be to have different HOUDINI_PATH's depending on the license is being used. But I can't find a variable that provides distinction between Houdini session license. Am I missing something? https://www.sidefx.com/docs/houdini/ref/plugins.html

Thanks
prb
 

test.json

Edited by probiner
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...