Page 1 of 1

Is python 2.7 a *RUNTIME* dependency?

Posted: 2020-08-01, 05:41
by Walter Dnes
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 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.

Re: Is python 2.7 a *RUNTIME* dependency?

Posted: 2020-08-01, 06:24
by athenian200
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.

Re: Is python 2.7 a *RUNTIME* dependency?

Posted: 2020-08-01, 11:21
by vannilla
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.

Re: Is python 2.7 a *RUNTIME* dependency?

Posted: 2020-08-01, 11:57
by New Tobin Paradigm
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.

Re: Is python 2.7 a *RUNTIME* dependency?

Posted: 2020-08-01, 13:49
by Lunokhod
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.

Re: Is python 2.7 a *RUNTIME* dependency?

Posted: 2020-08-01, 14:26
by Walter Dnes
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 tarball, it should be "100% official".

For those who want to "roll your own", it's easy to install a local python 2.7.

Re: Is python 2.7 a *RUNTIME* dependency?

Posted: 2020-08-01, 15:20
by New Tobin Paradigm
For once Dnes is actually 100% correct. Mark this day.