Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Retire distutils from Python code #3389

Open
fhechtAdobe opened this issue Nov 1, 2024 · 2 comments
Open

Retire distutils from Python code #3389

fhechtAdobe opened this issue Nov 1, 2024 · 2 comments
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

Comments

@fhechtAdobe
Copy link

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 launching usdview.

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 with shutil.which. And distutils.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!

@nvmkuruc
Copy link
Collaborator

nvmkuruc commented Nov 1, 2024

Agree that this would be helpful. 👍

@asluk asluk added the build Build-related issue/PR label Nov 1, 2024
@nvmkuruc nvmkuruc added help wanted Indicates an issue where help and/or a pull request from the community would be very welcome good first issue Indicates a good issue for first-time contributors labels Nov 2, 2024
@jesschimein
Copy link
Contributor

Filed as internal issue #USD-10385

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
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
Projects
None yet
Development

No branches or pull requests

4 participants