Note that the build backend has changed from py-packaging to py-hatch between py-jupyter-server versions 1 and 2, therefore this bug fix is restricted to version 1.
I tested installing py-jupyter-server@1.21.1 on my macOS with a broken local npm/node installation (to mimick the problem described in https://github.com/JCSDA/spack-stack/issues/995. I was able to install it successfully with the default variant ~typescript, and also with +typescript (which added npm and node as dependencies).
It also fixed the problem on Narwhal with the existing but broken npm/node installation.
Description
Add variant typescript for
py-jupyter-server@:1
, which then requiresnpm
/node
. Patch the build system for~typescript
so that it doesn't autodetect any systemnpm
/node
installations. That is because if it does findnpm
somewhere in the path, it attempts to build the typescript extension even though it shouldn't, and this can cause problems as described in https://github.com/JCSDA/spack-stack/issues/995, https://github.com/JCSDA/spack-stack/issues/928, and https://github.com/spack/spack/issues/41899.Note that the build backend has changed from
py-packaging
topy-hatch
betweenpy-jupyter-server
versions 1 and 2, therefore this bug fix is restricted to version 1.Corresponding spack develop PR: https://github.com/spack/spack/pull/43279 (merged 2024/03/20)
Testing
I tested installing
py-jupyter-server@1.21.1
on my macOS with a broken localnpm
/node
installation (to mimick the problem described in https://github.com/JCSDA/spack-stack/issues/995. I was able to install it successfully with the default variant~typescript
, and also with+typescript
(which addednpm
andnode
as dependencies).It also fixed the problem on Narwhal with the existing but broken
npm
/node
installation.Also testing default
~typescript
in https://github.com/JCSDA/spack-stack/pull/1033Issue(s) addressed
Resolves https://github.com/JCSDA/spack-stack/issues/995 Resolves https://github.com/JCSDA/spack-stack/issues/928
Dependencies
n/a
Impact
n/a
Checklist