Community Packages

Please read this before reporting a bug:
https://wiki.archlinux.org/title/Bug_reporting_guidelines

Do NOT report bugs when a package is just outdated, or it is in the AUR. Use the 'flag out of date' link on the package page, or the Mailing List.

REPEAT: Do NOT report bugs for outdated packages!
Tasklist

FS#70202 - [wesnoth] move python2 to optional dependencies

Attached to Project: Community Packages
Opened by Stefan G (itaton) - Monday, 29 March 2021, 08:00 GMT
Last edited by Sven-Hendrik Haase (Svenstaro) - Sunday, 13 June 2021, 02:12 GMT
Task Type Bug Report
Category Packages
Status Closed
Assigned To Sven-Hendrik Haase (Svenstaro)
Architecture All
Severity Low
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 0
Private No

Details

Description:

Not sure if this is the correct place to report this - if not, feel free to close this.
Wesnoth is currently my only installed package that still has a hard dependency on python2.
According to https://bbs.archlinux.org/viewtopic.php?id=251481 (Thread from 2019) wesnoth should probably not depend on python2. At least the dependency should be optional.
Additionally it seems (https://github.com/wesnoth/wesnoth/issues/1508) that upstream declared the port to python3 as finished.

Additional info:
* package version(s): current (1:1.14.16-1)
This task depends upon

Closed by  Sven-Hendrik Haase (Svenstaro)
Sunday, 13 June 2021, 02:12 GMT
Reason for closing:  Fixed
Comment by loqs (loqs) - Monday, 29 March 2021, 11:37 GMT
See wesnoth-py3-status.xt for the py3 compatibility status of python scripts.
wesnoth-backports.txt is an attempt to backport python3 related commits. commits marked with * may not need to be cherry-picked as the tools they are updating seem more for upstream's internal use and some of them are commented out from my last test.
Comment by Gunnar Bretthauer (Taijian) - Monday, 29 March 2021, 22:53 GMT
Looks like python2 support upstream was switched for good to python3 on 2020-08-05 [1].

[1]: https://github.com/wesnoth/wesnoth/pull/5027/files
Comment by Sven-Hendrik Haase (Svenstaro) - Tuesday, 30 March 2021, 05:54 GMT
I'm sad to say that we probably have to wait until the current in-development version of Wesnoth is declared stable and has made a release. Then we'll be able to use Python 3.
Comment by loqs (loqs) - Tuesday, 30 March 2021, 07:25 GMT
@Svenstaro what about the 33 scripts that are already python3 compatible as marked by their #!/usr/bin/env python3 invocation?
Do you have any objection to moving python2 to optdepends and adding python3 to optdepends as no version of python is used as part of the build process.
Edit:
Attached patch that backports python3 support. Its size is just way too big for a distribution patch.

Attached PKGBUILD.diff:
Move python2 from depends to optdepends.
Add python to optdepends.
Replace lua52 with lua53 [1].
Drop ENABLE_OMP=ON, ENABLE_TOOLS=ON and MANDIR=share/man that have been removed from CMakeLists.txt so cmake does not recognize them.
Change FIFO_DIR from /var/run/wesnothdto to /run/wesnothd.
Remove wesnothd.tmpfiles.conf let the service create and remove /run/wesnothd instead.
Change CMakeLists.txt to package HighContrast icon.

[1] https://raw.githubusercontent.com/wesnoth/wesnoth/1.14.16/src/wesnoth_lua_config.md

Comment by Sven-Hendrik Haase (Svenstaro) - Sunday, 13 June 2021, 02:12 GMT
Upstream actually approached me out of the blue and mentioned to me that the package doesn't need Python 2 at all and that it's apparently not expected to even have it in optdeps as the Python 2 scripts aren't even intended to be in the PATH from what I understood. At any rate, the game works and we have one less package depending on Python 2.

I also modernized the package and applied many of the other changes. Feel free to check it out, loqs.

I'll close this bug report though as the primary issue is solved.

Loading...