You are not logged in.

#1 2019-12-18 13:09:40

Trilby
Inspector Parrot
Registered: 2011-11-29
Posts: 29,442
Website

[SOLVED] [community]/wesnoth - unneeded python2 dep.

It seems some python2-specific packages are being dropped from the repos and I've heard that python2 itself may soon be on it's way out.

I checked my system and [community]/wesnoth is the only package that depends on python2 for me.  I checked whether a rebuild of wesnoth may be in [testing], but nothing yet.  I checked upstream to see if wesnoth could build against python3 instead but neither wesnoth's wiki nor the install info in it's git repo note any version of python as a requirement.

So I removed python2 (via `pacman -Rdd python2`) and tested wesnoth.  It started and ran just fine - though I can't rule out an effect on some additional feature that I don't typically use.

Should this be raised as a packaging issue on the bug tracker to have the python(2) dependency removed from wesnoth?

Last edited by Trilby (2019-12-19 20:34:50)


"UNIX is simple and coherent..." - Dennis Ritchie, "GNU's Not UNIX" -  Richard Stallman

Offline

#2 2019-12-18 13:14:39

loqs
Member
Registered: 2014-03-06
Posts: 17,192

Re: [SOLVED] [community]/wesnoth - unneeded python2 dep.

Online

#3 2019-12-18 13:23:25

Trilby
Inspector Parrot
Registered: 2011-11-29
Posts: 29,442
Website

Re: [SOLVED] [community]/wesnoth - unneeded python2 dep.

Ah, thanks, missed that.  Though there's still an oddity in the dependencies.  It could be argued that python2 could be an optional dep for these features that even the above listed issue suggests may not even be used anymore.  But other scripts that are used more often require python3, yet [community]/wesnoth depends on python2 only, and not python(3).

Of the python scripts included in the wesnoth package, 17 of them use python3 and 9 use python2.  So it seems odd that the latter is a dependencie and the former not even an optional dep.


"UNIX is simple and coherent..." - Dennis Ritchie, "GNU's Not UNIX" -  Richard Stallman

Offline

#4 2019-12-18 15:54:35

Lone_Wolf
Member
From: Netherlands, Europe
Registered: 2005-10-04
Posts: 11,868

Re: [SOLVED] [community]/wesnoth - unneeded python2 dep.

wesnoth uses cmake to configure things.

Many projects using cmake will use python2 unless they have no other choice then to use python 3.


Disliking systemd intensely, but not satisfied with alternatives so focusing on taming systemd.


(A works at time B)  && (time C > time B ) ≠  (A works at time C)

Offline

#5 2019-12-18 16:54:03

eschwartz
Fellow
Registered: 2014-08-08
Posts: 4,097

Re: [SOLVED] [community]/wesnoth - unneeded python2 dep.

Trilby wrote:

Of the python scripts included in the wesnoth package, 17 of them use python3 and 9 use python2.  So it seems odd that the latter is a dependencie and the former not even an optional dep.

That's definitely a bug then, but most likely it was simply never noticed by the packager that some of them were migrated. Even running the tools wouldn't point that out, because most people probably already have python3 for... one reason or another. big_smile

I wonder how this works... https://github.com/wesnoth/wesnoth/blob … s.txt#L171

Lone_Wolf wrote:

wesnoth uses cmake to configure things.

Many projects using cmake will use python2 unless they have no other choice then to use python 3.

Where does this statement come from? I don't think I've ever heard that claim before.


Managing AUR repos The Right Way -- aurpublish (now a standalone tool)

Offline

#6 2019-12-18 16:54:48

loqs
Member
Registered: 2014-03-06
Posts: 17,192

Re: [SOLVED] [community]/wesnoth - unneeded python2 dep.

Perhaps compare a clean chroot built wesnorth with and without python2 as a dependency.

Online

#7 2019-12-19 11:20:37

Lone_Wolf
Member
From: Netherlands, Europe
Registered: 2005-10-04
Posts: 11,868

Re: [SOLVED] [community]/wesnoth - unneeded python2 dep.

I encountered it by chance due to llvm-git users that build on systems with both python2 & python3 installed.

Had to add

-D PYTHON_EXECUTABLE=/usr/bin/python

to prevent cmake from using python2 in that situation.


It's not really a bug in cmake, more an incorrect use.

https://cmake.org/cmake/help/latest/mod … nLibs.html .
Especially software using/targeting older cmake versions suffer from this.

Last edited by Lone_Wolf (2019-12-19 11:26:30)


Disliking systemd intensely, but not satisfied with alternatives so focusing on taming systemd.


(A works at time B)  && (time C > time B ) ≠  (A works at time C)

Offline

#8 2019-12-19 20:09:14

eschwartz
Fellow
Registered: 2014-08-08
Posts: 4,097

Re: [SOLVED] [community]/wesnoth - unneeded python2 dep.

Lone_Wolf wrote:

I encountered it by chance due to llvm-git users that build on systems with both python2 & python3 installed.

Had to add

-D PYTHON_EXECUTABLE=/usr/bin/python

to prevent cmake from using python2 in that situation.


It's not really a bug in cmake, more an incorrect use.

https://cmake.org/cmake/help/latest/mod … nLibs.html .
Especially software using/targeting older cmake versions suffer from this.

Other than the fact that that's deprecated, I don't see why this should inherently "not use python3 unless there is no other choice". It takes a function argument consisting of the versions of python that the CMakeLists.txt author wants to support, and people whose CMakeLists.txt state "only python2 is supported" is hardly the fault of cmake.

So getting back to "Many projects using cmake will use python2 unless they have no other choice then to use python 3."

It seems what you actually meant is "by sheer coincidence, many projects using cmake happen to also be written by terrible software developers who explicitly specify that their software shall only be used with the 2.x release line of python".

Which... okay, whatever, I don't care enough to argue, so you may feel free to create illogical guilt-by-associations. Not like I even consider cmake to be a good build system, although that's for completely different reasons.

autotools and meson projects can specify PKG_CHECK_MODULES(PYTHON, [python2]), or python = dependency('python2'), as well. In that case, with autotools you can define PYTHON_CFLAGS and PYTHON_LIBS. There is no option you can pass to meson to override the dependency, though.


Managing AUR repos The Right Way -- aurpublish (now a standalone tool)

Offline

#9 2019-12-19 20:36:32

Trilby
Inspector Parrot
Registered: 2011-11-29
Posts: 29,442
Website

Re: [SOLVED] [community]/wesnoth - unneeded python2 dep.

I'm marking this as SOLVED as my initial curiosity about the reasons is satiated.  When I get time - hopefully this evening - I will submit a low priority packaging bug requesting consistency between python2/3: if python2 is a dep, python3 definitely should be too, though I'd advocate for making them both optional deps at best.


"UNIX is simple and coherent..." - Dennis Ritchie, "GNU's Not UNIX" -  Richard Stallman

Offline

Board footer

Powered by FluxBB