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

[Bug]: distutils is deprecated #10719

Open
2 of 5 tasks
makubacki opened this issue Feb 4, 2025 · 1 comment
Open
2 of 5 tasks

[Bug]: distutils is deprecated #10719

makubacki opened this issue Feb 4, 2025 · 1 comment
Labels
package:basetools priority:medium Moderate impact. Should be prioritized over lower priority issues. state:needs-maintainer-feedback state:needs-owner state:needs-triage type:bug Something isn't working

Comments

@makubacki
Copy link
Member

Is there an existing issue for this?

  • I have searched existing issues

Bug Type

  • Firmware
  • Tool
  • Unit Test

Code first?

  • Yes

What packages are impacted?

BaseTools

Which targets are impacted by this bug?

No response

Current Behavior

The pythonx.x-distutils package provided the standard distutils module.

We are using an Ubuntu 22.04 container and found distutils is deprecated. In the deadsnakes PPA python3.12.7-1+jammy1 to python3.12.8-1+jammy1 update on 12/04/2024, the following diff was made:

https://launchpadlibrarian.net/761821028/python3.12_3.12.7-1+jammy1_3.12.8-1+jammy1.diff.gz

In that, python3.12-distutils is no longer a built package per PEP-0632.


The only code found to be using distutils in edk2 is:

  • PyEfiCompressor
    • BaseTools/Source/C/PyEfiCompressor/setup.py
  • Brotli
    • BaseTools/Source/C\BrotliCompres/brotli/python/tests/_test_utils.py
    • MdeModulePkg/Library/BrotliCustomDecompressLib/brotli/setup.py

Expected Behavior

The codebase needs to no longer depend on distutils.

Migration advice is here: https://peps.python.org/pep-0632/#migration-advice

Steps To Reproduce

Search the edk2 codebase *.py files for distutils.

Build Environment

- OS(s): Ubuntu 22.04
- python3.12.8-1+jammy1

Version Information

Commit: 258f2d1563c366bf73932f80737776baa71b7ab5 (master)

Urgency

Medium

Are you going to fix this?

Someone else needs to fix it

Do you need maintainer feedback?

Maintainer feedback requested

Anything else?

No response

@makubacki makubacki added state:needs-triage type:bug Something isn't working labels Feb 4, 2025
@github-actions github-actions bot added priority:medium Moderate impact. Should be prioritized over lower priority issues. state:needs-maintainer-feedback package:basetools state:needs-owner labels Feb 4, 2025
@makubacki
Copy link
Member Author

@bexcran & @mdkinney - It looks like BaseTool/Source/C/PyEfiCompressor/setup.py has not been used in a while. Do you know its current status?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
package:basetools priority:medium Moderate impact. Should be prioritized over lower priority issues. state:needs-maintainer-feedback state:needs-owner state:needs-triage type:bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant