This package does not support Python 3.11. Please test it with Python 3.11 as a matter of urgency as the default will change in early June, as per message on gentoo-dev: https://archives.gentoo.org/gentoo-dev/message/abb5788ea81c7bbf4d40a2995b682eb9. Please check the information provided in the tracker. Ask in #gentoo-python on IRC if need any help.
Ping. Python 3.11 is now default.
Patches exist in Fedora, Debian and Arch... but they are a bit hacky: https://gitlab.archlinux.org/archlinux/packaging/packages/0ad/-/blob/main/fix_python_3.11_ftbfs.patch?ref_type=heads#L95 I am unsure then about how to proceed :/ I was wondering about maybe applying all the patches and changes to the sources and simply providing a full tarball with them (if LICENSES would allow it) Other option could be to try to use a snapshot, but I don't know how latest git is working
Given we're at 3.12 already, it's time to seriously consider removing packages that still haven't managed to get to 3.11 even.
Sorry, this package was enthusiastically maintained by others in the past, so I figured someone would pick it up before long. It would be a great shame to lose this, so I'll see what can be done. Does look awkward though.
Yeah, there's bug 773475 too and I have been putting off starting the discussion with upstream about it :|
I was able to make a tarball of the patched libraries/source/spidermonkey that just extracts over the top and works out of the box, but that only solves things for Python 3.11. More is needed for later versions. Working on it.
It isn't looking great. I updated six, urllib3, and virtualenv in the bundle, but the mozjs build scripts reference distutils all over the place. setuptools might be able to fill the gap, but it's not using system-wide modules, and I can't figure out how to make setuptools appear in the environment that it's using.
Perhaps try to make it use system packages entirely? If it's using venv, the trick is to get: include-system-site-packages = true into pyvenv.cfg
Managed to get past that. There were a couple of lines explicitly skipping setuptools for 3.12+. And now... File "/var/tmp/portage/games-strategy/0ad-0.0.26_alpha-r2/work/0ad-0.0.26-alpha/libraries/source/spidermonkey/mozjs-78.6.0/python/mozbuild/mozbuild/action/file_generate.py", line 12, in <module> import imp ModuleNotFoundError: No module named 'imp' Arrgh!
Upstream Bug: https://trac.wildfiregames.com/ticket/6895 "Bundled spidermonkey fails to build with python 3.12" It is marked as a 'Release Blocker' for the next version. The bug also contains a patch "Tentative support for building sm91 with py3.12" https://code.wildfiregames.com/D5227 Should this (Gentoo-)Bug merged with Bug 929595 "games-strategy/0ad: needs upgrade to Python 3.12 (PythonCompatUpdate)"?
*** Bug 929595 has been marked as a duplicate of this bug. ***
Thanks. I have already talked to the former 0ad lead about it. We have a plan, I just didn't have any energy left to act on it last weekend.
Today I have tried building and running it with python 3.11 to see if I can reproduce the upstream bug. sure enough: Exception: Failed to create virtualenv: /var/tmp/portage/games-strategy/0ad-0.0.26_alpha-r2/work/0ad-0.0.26-alpha/libraries/source/spidermonkey/mozjs-78.6.0/build-debug/_virtualenvs/init_py3 (virtualenv.py retcode: 100) * ERROR: games-strategy/0ad-0.0.26_alpha-r2::local failed (compile phase): * Failed to build bundled SpiderMonkey The message was the same for 3.11 and 3.12.