Is python 2.7 a *RUNTIME* dependency?

Users and developers helping users with generic and technical Pale Moon issues on all operating systems.

Moderator: trava90

Forum rules
This board is for technical/general usage questions and troubleshooting for the Pale Moon browser only.
Technical issues and questions not related to the Pale Moon browser should be posted in other boards!
Please keep off-topic and general discussion out of this board, thank you!
Walter Dnes
Astronaut
Astronaut
Posts: 650
Joined: 2015-07-30, 20:29
Location: Vaughan, ON, Canada

Is python 2.7 a *RUNTIME* dependency?

Unread post by Walter Dnes » 2020-08-01, 05:41

The Gentoo devs are moving to get rid of python 2.7 which would cause problems for building Pale Moon via Gentoo. Python 2.7 can be installed manually outside of the package manager for now, but who knows what library incompatabilities will show up in future.

Another option is a "-bin" ebuild. There are already "firefox-bin" and "libreoffice-bin" ebuilds, etc. They pull down a precompiled tarball from upstream, and extract and install it, skipping the build stage. One idea being floated on the Gentoo mailing list is a "palemoon-bin" ebuild which would pull down the precompiled tarball from http://linux.palemoon.org/download/mainline/ and extract and install it, skipping the build stage, and buildtime python 2.7 dependency.

The remaining question is whether python 2.7 is a runtime dependency. It lt looks like it's not required according to the download page, but I don't want to risk a wrong guess. That's why I'm asking for an official answer here.
There's a right way
There's a wrong way
And then there's my way

User avatar
athenian200
Contributing developer
Contributing developer
Posts: 1498
Joined: 2018-10-28, 19:56
Location: Georgia

Re: Is python 2.7 a *RUNTIME* dependency?

Unread post by athenian200 » 2020-08-01, 06:24

No, the browser isn't written in Python. That would be really slow and terrible to use...

We just have a Python-based build system that's too large and complex to easily be upgraded to Python 3.x. Honestly we did originally want to get rid of it and go back to Makefiles and Autoconf/M4 type stuff, but we found even that's too big a task and we'll likely have to go out of our way to keep Python 2.7 packages around forever.

There are other things I've looked at though... there are apparently some alternate Python interpreters out there that are sticking to a more 2.7-like syntax, like Jython and IronPython, and plus there's Cython which can allow us to compile Python into C.

I have a feeling none of those will be viable because none are 100% compatible, and we really will have a build dependency a lot of distributions won't be able to meet out of the box, though.
"The Athenians, however, represent the unity of these opposites; in them, mind or spirit has emerged from the Theban subjectivity without losing itself in the Spartan objectivity of ethical life. With the Athenians, the rights of the State and of the individual found as perfect a union as was possible at all at the level of the Greek spirit." -- Hegel's philosophy of Mind

vannilla
Moon Magic practitioner
Moon Magic practitioner
Posts: 2183
Joined: 2018-05-05, 13:29

Re: Is python 2.7 a *RUNTIME* dependency?

Unread post by vannilla » 2020-08-01, 11:21

I decided some time ago to see what was incompatible with python 3 in the build system.
Most of the incompatibilities stem from third party packages, some of which can be changed or even removed and some upgraded; the "importing" of commands performed by mach at startup and the test machinery.
I'm not saying it's easy, but it's also something that a python developer with enough time can do just fine.

New Tobin Paradigm

Re: Is python 2.7 a *RUNTIME* dependency?

Unread post by New Tobin Paradigm » 2020-08-01, 11:57

And I'm saying, it ain't gonna happen. If you can't build the codebase because you don't have python 2 and can't get it working that is YOUR problem. NOT OURS.

User avatar
Lunokhod
Lunatic
Lunatic
Posts: 469
Joined: 2017-04-20, 21:25
Contact:

Re: Is python 2.7 a *RUNTIME* dependency?

Unread post by Lunokhod » 2020-08-01, 13:49

I counted 3606 Python files, although that was in an old git pull I had already downloaded, using this to approximate it:
Pale-Moon$ ls -R |ag "\.py" >listofpythonfiles.txt
Python provides a 2to3 converter, although it might need some manual tweaking afterwards. If you converted 1 file per day it would take about 10 years I guess. If 3606 Gentoo Pale Moon users did a file each then it could be quicker. :D But I think there could still be difficulties with this scale of conversion, could you convert individual files on a progressive basis to test it works OK as you go, and run some with Python 3 and some with 2? If you had to convert the whole thing then debug it, surely that would be difficult too.
Wait, it's all Ohio? Always has been...

Walter Dnes
Astronaut
Astronaut
Posts: 650
Joined: 2015-07-30, 20:29
Location: Vaughan, ON, Canada

Re: Is python 2.7 a *RUNTIME* dependency?

Unread post by Walter Dnes » 2020-08-01, 14:26

This is drifting away from the original question. It looks like Pale Moon can RUN without python 2.7 present, which is enough for most people. Simply pull down the pre-compiled tarball and extract. Since it's from the palemoon.org tarball, it should be "100% official".

For those who want to "roll your own", it's easy to install a local python 2.7.
There's a right way
There's a wrong way
And then there's my way

New Tobin Paradigm

Re: Is python 2.7 a *RUNTIME* dependency?

Unread post by New Tobin Paradigm » 2020-08-01, 15:20

For once Dnes is actually 100% correct. Mark this day.

Locked