xemu-project / xemu

Original Xbox Emulator for Windows, macOS, and Linux (Active Development)
https://xemu.app
Other
2.57k stars 258 forks source link

Lack of Distutils (deprecated since python 3.10, removed in 3.12) prevents building #1640

Closed theofficialgman closed 2 weeks ago

theofficialgman commented 2 months ago

Bug Description

Distutils has been removed from python3 and can no longer be used. You need to modify the codebase to not depend on it. See the upstream documentation for transitioning to other APIs https://docs.python.org/3.10/whatsnew/3.10.html#distutils-deprecated

../meson.build:83:0: ERROR: <PythonExternalProgram 'python3' -> ['/usr/bin/python3']> is not a valid python or it is missing distutils

Expected Behavior

Ability to build on python 3.12+

xemu Version

latest git master

System Information

No response

Additional Context

No response

mborgerson commented 2 months ago

It's been fixed on deb packaging branch. Feel free to send me a pr elsewhere to update the dep

theofficialgman commented 2 months ago

It's been fixed on deb packaging branch. Feel free to send me a pr elsewhere to update the dep

Its most certainly not fixed. This doesn't work of course https://github.com/xemu-project/xemu/commit/721fca5ef32d86645cb541c9231d01f63421affa . Read the link posted. distutils has been entirely removed. It does not exist in a separate package either.

theofficialgman commented 2 months ago

I see no reason why the builtin python version comparison can't be used https://packaging.pypa.io/en/latest/version.html#packaging.version.Version

CC @elmarco as the author of this addition https://github.com/xemu-project/xemu/commit/73e6aec6522e1edd63f631c52577b49a39bc234f for correction to use some other supported method for version comparison

mborgerson commented 2 months ago

@theofficialgman xemu is a based on QEMU, and it looks like they have already migrated from distutils upstream. We are just a bit behind in versions. It'll get fixed eventually when I rebase again or when either I or someone else finds time to fix it before then. If you are very motivated, feel free to send a PR to fix the build in the mean time.