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

Deprecated module #22

Open
MiaouKING opened this issue Aug 18, 2024 · 0 comments
Open

Deprecated module #22

MiaouKING opened this issue Aug 18, 2024 · 0 comments

Comments

@MiaouKING
Copy link

MiaouKING commented Aug 18, 2024

The file in system/lib/pvr-tex-tool.py seems to be using distutils, but the module has been deprecated ever since Python 1.12.
Replacing:

def _get_executable_path(*paths: str) -> str | None:
    from distutils.spawn import find_executable

    for path in paths:
        executable_path = find_executable(path)
        if executable_path is not None:
            return path

    return None

by:

import shutil

def _get_executable_path(*paths: str) -> str | None:
    for path in paths:
        executable_path = shutil.which(path)
        if executable_path is not None:
            return path

    return None

fixed the problem for me.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant