Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This pull request refactors the
tk_build_qt_resourcesmodule to improve the handling of compiler arguments and environment variables. The most important changes include switching from string-based command construction to list-based argument handling for subprocess calls, updating environment variable defaults, and refining paths for PySide2 tools.Refactoring compiler argument handling:
tk_toolchain/cmd_line_tools/tk_build_qt_resources/__init__.py: Modifiedbuild_qtto usecompiler.extend()for adding arguments and switched subprocess calls to pass a list for better handling of command-line arguments.tk_toolchain/cmd_line_tools/tk_build_qt_resources/__init__.py: Updatedbuild_uiandbuild_resfunctions to constructcompileras a list instead of a formatted string, ensuring safer and more flexible argument handling. [1] [2]Environment variable updates:
tk_toolchain/cmd_line_tools/tk_build_qt_resources/__init__.py: Changed the default value for the--pyenvargument to prioritizePYENV_VIRTUAL_ENVorVIRTUAL_ENVoverPYTHONPATH, aligning with modern virtual environment practices.Refinement of PySide2 tool paths:
tk_toolchain/cmd_line_tools/tk_build_qt_resources/__init__.py: Updated the paths forpyside2-uicandpyside2-rccto explicitly include thebindirectory, ensuring compatibility with virtual environments.