Retire distutils
from Python code
#3389
Labels
build
Build-related issue/PR
good first issue
Indicates a good issue for first-time contributors
help wanted
Indicates an issue where help and/or a pull request from the community would be very welcome
Description of Issue
The
distutils
module is considered deprecated and has been removed in Python 3.12. That means the OpenUSD code (v24.11) compiles against Python 3.12, but then hits a runtime error when launchingusdview
.I understand that the VFX platform for CY2025 is still targeting Python 3.11.x, but this was fixed for the build script (even though this ticket about the issue was closed: #2817) and there are only two functions from
distutils
still in use:from distutils.spawn import find_executable
which is easily replaceable withshutil.which
. Anddistutils.util.strtobool
, which does not have a direct replacement, but should be easy. See also https://peps.python.org/pep-0632/It would be nice to improve the Python 3.12 support by taking this small extra step. Thanks!
The text was updated successfully, but these errors were encountered: