Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 896964 - games-strategy/0ad: needs upgrade to Python 3.12 (PythonCompatUpdate)
Summary: games-strategy/0ad: needs upgrade to Python 3.12 (PythonCompatUpdate)
Status: CONFIRMED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All All
: Normal normal (vote)
Assignee: Gentoo Games
URL:
Whiteboard:
Keywords:
: 929595 (view as bug list)
Depends on:
Blocks: 896398 921826
  Show dependency tree
 
Reported: 2023-02-25 09:45 UTC by Michał Górny
Modified: 2024-06-24 22:22 UTC (History)
4 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2023-02-25 09:45:20 UTC
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.
Comment 1 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2023-05-03 05:25:08 UTC
Ping. Python 3.11 is now default.
Comment 2 Pacho Ramos gentoo-dev 2023-11-20 09:29:50 UTC
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
Comment 3 Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2024-06-08 09:36:36 UTC
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.
Comment 4 James Le Cuirot gentoo-dev 2024-06-08 09:42:19 UTC
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.
Comment 5 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2024-06-08 09:45:10 UTC
Yeah, there's bug 773475 too and I have been putting off starting the discussion with upstream about it :|
Comment 6 James Le Cuirot gentoo-dev 2024-06-08 16:07:31 UTC
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.
Comment 7 James Le Cuirot gentoo-dev 2024-06-08 22:27:01 UTC
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.
Comment 8 Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2024-06-09 03:22:31 UTC
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
Comment 9 James Le Cuirot gentoo-dev 2024-06-09 10:49:52 UTC
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!
Comment 10 Torsten Kaiser 2024-06-15 15:19:09 UTC
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)"?
Comment 11 James Le Cuirot gentoo-dev 2024-06-15 19:10:28 UTC
*** Bug 929595 has been marked as a duplicate of this bug. ***
Comment 12 James Le Cuirot gentoo-dev 2024-06-15 19:11:57 UTC
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.