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: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All All
: Normal normal
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: 2025-03-10 02:21 UTC (History)
5 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.
Comment 13 Filip Kobierski 2024-08-20 13:33:22 UTC
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.
Comment 14 Larry the Git Cow gentoo-dev 2025-03-10 02:21:27 UTC
The bug has been closed via the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=c08ce8c1e9d5c04878738f6ca9f12dccd5bfda52

commit c08ce8c1e9d5c04878738f6ca9f12dccd5bfda52
Author:     Ralph Sennhauser <ralph.sennhauser@gmail.com>
AuthorDate: 2025-01-22 12:32:49 +0000
Commit:     Sam James <sam@gentoo.org>
CommitDate: 2025-03-10 02:19:19 +0000

    games-strategy/0ad: bump to version 0.27.0
    
    Bump to version 0.27.0 and add support for rc builds.
    
    Use system spidermonkey as the minor version restriction was dropped
    upstream, unlike in the early days of spidermonkey it's unlikely that
    version differences lead to different results. Update checkreqs as the
    needed space is reduced quite a bit by using system spidermonkey.
    
    Use verify-sig eclass and drop custom unpack.
    
    Use wxgtk 3.2, there is no reason not to and move wx-setup to
    src_configure.
    
    Install libCollada.so, fixes pyrogenesis so it can actually generate
    models from collada files if mods require it. Don't install various
    unused files on the other hand.
    
    Fix building and running tests. Also replace perl dep with python as
    cxxtestgen was rewitten in python long time ago.
    
    With the move to git and gitea the github repo was archived, so drop it
    from metadata.xml
    
    LTO still doen't work but not for the original reason
    
    Address some qa items, like http to https, line length or outdated
    blocker and remove no longer needed QA_PRESTRIPPED.
    
    Closes: https://bugs.gentoo.org/774153
    Closes: https://bugs.gentoo.org/873058
    Closes: https://bugs.gentoo.org/896964
    Closes: https://bugs.gentoo.org/909509
    Closes: https://bugs.gentoo.org/912838
    Closes: https://bugs.gentoo.org/917626
    Closes: https://bugs.gentoo.org/921324
    Closes: https://bugs.gentoo.org/935474
    Closes: https://bugs.gentoo.org/945956
    Closes: https://bugs.gentoo.org/946468
    Closes: https://bugs.gentoo.org/949122
    Signed-off-by: Ralph Sennhauser <ralph.sennhauser@gmail.com>
    Closes: https://github.com/gentoo/gentoo/pull/40383
    Signed-off-by: Sam James <sam@gentoo.org>

 games-strategy/0ad/0ad-0.27.0.ebuild               | 235 +++++++++++++++++++++
 games-strategy/0ad/Manifest                        |   4 +
 .../0ad/files/0ad-0.27.0-fix-tests.patch           |  78 +++++++
 games-strategy/0ad/files/0ad-minisign.pub          |   1 +
 games-strategy/0ad/metadata.xml                    |   1 -
 5 files changed, 318 insertions(+), 1 deletion(-)