[Pkg-javascript-devel] Bug#962469: node-gyp broken because it uses the wrong Python version
Ralf Jung
post at ralfj.de
Mon Jun 8 14:37:44 BST 2020
Package: node-gyp
Version: 6.1.0-3
Severity: normal
Dear Maintainer,
current node-gyp on Debian seems to be broken: trying to build a package that relies on node-gyp fails, saying
Traceback (most recent call last):
File "/usr/share/nodejs/node-gyp/gyp/gyp_main.py", line 6, in <module>
from pkg_resources import load_entry_point
File "/usr/lib/python2.7/dist-packages/pkg_resources/__init__.py", line 3251, in <module>
@_call_aside
File "/usr/lib/python2.7/dist-packages/pkg_resources/__init__.py", line 3235, in _call_aside
f(*args, **kwargs)
File "/usr/lib/python2.7/dist-packages/pkg_resources/__init__.py", line 3264, in _initialize_master_working_set
working_set = WorkingSet._build_master()
File "/usr/lib/python2.7/dist-packages/pkg_resources/__init__.py", line 583, in _build_master
ws.require(__requires__)
File "/usr/lib/python2.7/dist-packages/pkg_resources/__init__.py", line 900, in require
needed = self.resolve(parse_requirements(requirements))
File "/usr/lib/python2.7/dist-packages/pkg_resources/__init__.py", line 786, in resolve
raise DistributionNotFound(req, requirers)
pkg_resources.DistributionNotFound: The 'gyp==0.1' distribution was not found and is required by the application
This is after I had to install the Python 2 version of pkg_resources to even get to far. Probably, node-gyp is using Python 2, even though its own dependencies point to Python 2.
I think I got everything to work by patching lib/find-python.js to disable the "python" and "python2" detectors.
Kind regards,
Ralf
-- System Information:
Debian Release: bullseye/sid
APT prefers testing
APT policy: (990, 'testing'), (500, 'testing-debug'), (100, 'unstable')
Architecture: amd64 (x86_64)
Foreign Architectures: i386
Kernel: Linux 5.6.13 (SMP w/8 CPU cores)
Kernel taint flags: TAINT_USER, TAINT_OOT_MODULE, TAINT_UNSIGNED_MODULE
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8), LANGUAGE= (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
Init: systemd (via /run/systemd/system)
LSM: AppArmor: enabled
Versions of packages node-gyp depends on:
ii gyp 0.1+20200513gitcaa6002-1
ii libnode-dev 12.13.1~dfsg-1
ii node-glob 7.1.6-1
ii node-graceful-fs 4.2.4-1
ii node-mkdirp 0.5.1-2
ii node-nopt 3.0.6-4
ii node-npmlog 4.1.2-2
ii node-osenv 0.1.5-1
ii node-request 2.88.1-4
ii node-rimraf 2.6.3-1
ii node-semver 7.1.3-1
ii node-tar 4.4.10+ds1-2
ii node-which 2.0.2-1
ii nodejs 12.13.1~dfsg-1
Versions of packages node-gyp recommends:
ii build-essential 12.8
node-gyp suggests no packages.
-- no debconf information
More information about the Pkg-javascript-devel
mailing list