On 12/15/19 10:16 AM, DJ Lucas via blfs-dev wrote:
On December 15, 2019 8:14:20 AM CST, Ken Moffat via blfs-dev 
<[email protected]> wrote:
On Fri, Dec 13, 2019 at 08:57:09AM +0000, DJ Lucas via blfs-dev wrote:
On December 12, 2019 11:30:59 PM CST, Ken Moffat via blfs-dev
<[email protected]> wrote:


Going forward, perhaps we need to install python3 as both python3
and python, and find a way to stop python2, if it is installed,
installing as python ?

Maybe as simple as:

1. in LFS ln -sv python3 /usr/bin/python

2. in BLFS, if installign python2 :
rm /usr/bin/python
ln -sv python3 /usr/bin/python

??

Yes, I know that upstream python has claimed that python should
still be python2, but I think we're fast going to reach the point
where that causes more trouble than it is worth.

That's not exactly correct. We are at the point where the majority
use python3. We need to get rid of python2 build instructions for
remaining modules that are not dependencies for something else using
python2, sed/patch the remaining packages to explicitly use
'/usr/bin/python2' or '/usr/bin/env python2' and then we are compliant
with the PEP (84 IIRC) with a python->python3 symlink. The big thing is
the "majority" of packages, though it was worded differently IIRC. Arch
can really help here.


For the moment, I'm giving up on this slithering mess.

Maybe I'll try creating the python symlink, or maybe it would be
easier to just start banging my head agaisnt a brick wall.


--DJ

So, I looked at Arch and they are still using python2 for JS60.

Fedora's build uses raw firefoxi68, I'm reluctant to try that.
As I said in my original post: There is an issue for
spidermonkey68 at gnome:
  https://gitlab.gnome.org/GNOME/gjs/issues/270 which is
apparently waiting for firefox 68.4.0 before it is ready.  That
version of firefox should be released at the start of January.

I suspect that when the new spidermonkey appears it _will_ need
the python -> python3 symlink.

In the meantime I found a patch at
https://code.foxkit.us/adelie/packages/blob/f2b5773da19ab397fbe64fd32dacc383cfe4cd77/user/mozjs/python3.patch
from Adelie linux, originally against 52.4.  A very strange patch, I
could not get it to apply at all, so in the end I've spent some time
manually running seds for some obvious things (e.g. remove from
__future__) and then attempting to manually apply the other changes.
Of course, some of the code has changed, and I'm sure not everything
is right.

What is most odd about the patch is that the first part has (original)
and (refactored) marks for old and new files, but much later many
other more conventional diffs have been appended, often several for
the same file.

But when I gave it a first go, with python symlinked to python3, the
configure immediately failed:

ken@plexi /tmp/mozjs-60.8.0/mozjs-build $../js/src/configure
--prefix=/usr       \
                     --with-intl-api     \
                     --with-system-zlib  \
                     --with-system-icu   \
                     --disable-jemalloc  \
                     --enable-readline
  File "../js/src/../../configure.py", line 65
    print("Creating config.status", file=sys.stderr)

Sorry, I missed this. Yes this is python3 syntax so something is calling 
python2 explicitly.

A quick check finds 93 files in mozjs-60.8.0 referencing python2. Some instances:

python/mozboot/mozboot/base.py:
  MODERN_PYTHON_VERSION = LooseVersion('2.7.3')

python/mozboot/mozboot/archlinux.py:
    SYSTEM_PACKAGES = [
        'autoconf2.13',
        ...
        'python2',
        'python2-setuptools',
        ...

js/src/devtools/rootAnalysis/analyze.py:
  ((os.environ.get('PYTHON', 'python2.7'),

It looks like mozjs needs a major overhaul to eliminate python2.

  -- Bruce
--
http://lists.linuxfromscratch.org/listinfo/blfs-dev
FAQ: http://www.linuxfromscratch.org/blfs/faq.html
Unsubscribe: See the above information page

Reply via email to