|Summary:||www/node10 and www/node12 are dependent on python27 which is EOL|
|Product:||Ports & Packages||Reporter:||Vincent Bentley <vince>|
|Component:||Individual Port(s)||Assignee:||Bradley T. Hughes <bhughes>|
|Status:||Closed Overcome By Events|
|Severity:||Affects Many People||CC:||bhughes, igor.polovykh, lwhsu, matt, me, rene, swills|
|Bug Depends on:|
Description Vincent Bentley 2020-06-17 11:36:34 UTC
The node package has been fixed for python3 but the npm package still has a dependency on python27. See https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=246036 Python 2.7 is end of life upstream and the FreeBSD package is due to expire on 31 December 2020.
Comment 1 Li-Wen Hsu 2020-06-17 11:57:01 UTC
Do you mean www/npm? I don't see it depends on python2. Could you explain more? Thanks!
Comment 2 Rene Ladan 2020-07-11 20:15:39 UTC
(In reply to Li-Wen Hsu from comment #1) Ah, www/node10 and www/node12 have USES=python2.7:build but www/node (14.5.0), www/npm, www/npm-node10 and www/npm-node12 depend on Python 3.
Comment 3 Bradley T. Hughes 2020-08-20 21:31:29 UTC
I am aware of this, and unfortunately upstream does not support Python 3 (yet) for building Node.js 10.x and 12.x.
Comment 4 Matt Simerson 2020-09-22 20:00:47 UTC
Issue #1: The importance "Affects Only Me" should be increased on this issue. Issue #2: "and unfortunately upstream does not support Python 3 (yet) for building Node.js 10.x and 12.x." I did a little poking and the situation is a little more complex than that. I just built node10 (10.22.0) with python3.7 and it worked fine. I did so my modifying the port Makefile and changing the python version number. I was also able to 'npm install node-gyp' afterwards. There are however potential issues with *some* npm modules needing python27 to build. Since python27 is officially EOL, I believe the correct course of action today is to update the port to use python3.
Comment 5 Mina Galić 2020-09-22 21:53:33 UTC
I'd like to add that i was able to successfully build SQLite with npm-node12, by making the following setting ``` npm config set python /usr/local/bin/python3 ``` of course that is only one out of 17 million or so npm packages, so it's hard to say how confident we can be in this… LTS release of node
Comment 6 Bradley T. Hughes 2020-09-24 19:05:15 UTC
*** Bug 249789 has been marked as a duplicate of this bug. ***
Comment 7 Bradley T. Hughes 2020-09-24 19:05:24 UTC
*** Bug 249790 has been marked as a duplicate of this bug. ***
Comment 8 Bradley T. Hughes 2020-09-24 19:09:50 UTC
I will have another look at building www/node10 and www/node12 with Python 3.x. Node.js 10.x will be maintained until 2021-04-30, so it only makes sense to get it sorted. Thanks for the info :)
Comment 9 Bradley T. Hughes 2020-09-29 11:59:26 UTC
Just changing the python version number in the ports' Makefile isn't enough, it seems. The Node.js configure shell script looks for python2.7, then python2, then falls back to python when trying to execute the configure.py script. Running python3 on configure.py results in numerous errors. I do not know Python, so it's hard for me to decipher what these errors mean. For reference, here is the upstream issue opened for dropping Python2 support: https://github.com/nodejs/node/issues/32814. It appears that the discussion is leaning towards going away from a Python based build to something cmake based, but I doubt that will happen for the Node.js 10.x and 12.x release lines.
Comment 10 Matt Simerson 2020-09-29 21:50:22 UTC
Oh, it's hard coded and I failed to delete the python 2.7 port, and so it worked for me. Bummer, sorry I wasted your time Bradley. Thanks for looking into it.
Comment 11 Rene Ladan 2021-01-01 00:19:57 UTC
Expired port, will be removed soon.