ynput / ayon-houdini

Houdini addon for AYON
Apache License 2.0
11 stars 9 forks source link

Support Houdini 20.5+ with Py3.11 #3

Closed BigRoy closed 4 months ago

BigRoy commented 5 months ago

Transferred from https://github.com/ynput/ayon-core/pull/625


Changelog Description

This adds support for Houdini version with Py3.11 like Houdini 20.5.262 which is currently in beta available to all users on an active subscription starting today.

Additional info

Note that the trick for Houdini 20.0.xxx application environment where we prepended the Houdini Python libs to the environment seemed redundant for 20.5.xxx since I got no python library conflicts with AYON so it seemed. However, if you do find anything. You might need something like:

{
    "HOUDINI_VERSION": "20.5.262",
    "PYTHONPATH": [
        "C:/Program Files/Side Effects Software/Houdini {HOUDINI_VERSION}/python311/lib/site-packages",
        "{PYTHONPATH}"
    ]
}

More details on that Houdini 20 workaround here.

There are some other Py3.11 notes to consider, I'm getting e.g. these warnings:

On start:

C:\Users\User\AppData\Local\Ynput\AYON\dependency_packages\ayon_2403061937_windows.zip\dependencies\future\standard_library\__init__.py:65: DeprecationWarning: the imp module is deprecated in favour of importlib and slated for removal in Python 3.12; see the module's documentation for alternative uses
  import imp
<frozen importlib._bootstrap>:1047: ImportWarning: _SixMetaPathImporter.find_spec() not found; falling back to find_module()

In publisher UI:

E:\dev\ayon-core\client\ayon_core\tools\utils\lib.py:49: DeprecationWarning: QDesktopWidget.screenGeometry(int screen) const is deprecated
  screen_geo = desktop.screenGeometry(screen_idx)
E:\dev\ayon-core\client\ayon_core\plugins\publish\extract_review.py:1905: DeprecationWarning: invalid escape sequence '\g'
  string_value = re.sub(r"^([\+\-])[ ]+", "\g<1>", string_value)
E:\dev\ayon-core\server_addon\deadline\client\ayon_deadline\plugins\publish\submit_harmony_deadline.py:399: DeprecationWarning: invalid escape sequence '\.'
  '}1\.[a-zA-Z]{3}'

In Library Loader:

Using existing QApplication..
E:\dev\ayon-core\client\ayon_core\tools\common_models\cache.py:20: DeprecationWarning: Used 'NestedCacheItem' from deprecated location 'ayon_core.tools.common_models', use 'ayon_core.lib' instead.
  warnings.warn(
E:\dev\ayon-core\client\ayon_core\tools\common_models\cache.py:10: DeprecationWarning: Used 'CacheItem' from deprecated location 'ayon_core.tools.common_models', use 'ayon_core.lib' instead.
  warnings.warn(

(This isn't really Py3.11 or Houdini related I suppose)

Aside of that all the tools do seem to work completely fine.

Testing notes:

  1. Install Houdini 20.5.262
  2. Add the application to settings and your project
  3. Launch within AYON
  4. Everything should work in the integration
MustafaJafar commented 4 months ago

Additional info

Note that the trick for Houdini 20.0.xxx application environment where we prepended the Houdini Python libs to the environment seemed redundant for 20.5.xxx since I got no python library conflicts with AYON so it seemed. However, if you do find anything.

For information, The point above is being discussed in https://github.com/ynput/ayon-houdini/issues/24