JCSDA / spack

A flexible package manager that supports multiple versions, configurations, platforms, and compilers.
https://spack.io
Other
0 stars 14 forks source link

Bug fix for py-jupyter-server and hidden npm/node dependency #417

Closed climbfuji closed 8 months ago

climbfuji commented 8 months ago

Description

Add variant typescript for py-jupyter-server@:1, which then requires npm/node. Patch the build system for ~typescript so that it doesn't autodetect any system npm/node installations. That is because if it does find npm 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 to py-hatch between py-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 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.

Also testing default ~typescript in https://github.com/JCSDA/spack-stack/pull/1033

Issue(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