Skip to content

CI: Windows build fails on Python 3.12 due to missing 'distutils' in native-doc-tooling #3895

Description

@forzayt

What happened?

The Windows CI build is currently broken during the native-doc-tooling installation phase. The yarn install command for ffi-napi fails because it uses an older version of node-gyp that requires distutils . Since the GitHub Actions environment was recently updated to Python 3.12 , which removed distutils , the build fails with: ModuleNotFoundError: No module named 'distutils' refer --> #3894

Expected result

The CI build should complete the native-doc-tooling setup successfully.

Reproduction steps

  1. Push any change to trigger the Windows CI.
  2. The build will fail at the ffi-napi installation step in the native-doc-tooling directory.

Importancy

Crash

Area(s)

FiveM

Specific version(s)

Current GitHub Actions runner environment (Python 3.12.x)

Additional information

This is a global CI issue. It can be resolved by forcing the CI runner to use Python 3.11 or by installing setuptools (which includes the distutils shim) before running the build scripts.
The error occurs here: gyp info find Python using Python version 3.12.10 ModuleNotFoundError: No module named 'distutils'

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions