py-jupyter-core: set environment variables for extensions (#47192)
* py-jupyter-core: set environment variables for extensions * Changes committed by gh-spack-pr --------- Co-authored-by: Bernhard Kaindl <bernhardkaindl7@gmail.com>
This commit is contained in:
parent
c302049b5d
commit
ca48233ef7
@ -3,6 +3,8 @@
|
||||
#
|
||||
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
|
||||
|
||||
import os
|
||||
|
||||
from spack.package import *
|
||||
|
||||
|
||||
@ -45,3 +47,10 @@ class PyJupyterCore(PythonPackage):
|
||||
|
||||
# Historical dependencies
|
||||
depends_on("py-setuptools", when="@:4.9.2", type=("build", "run"))
|
||||
|
||||
def setup_dependent_run_environment(self, env, dependent_spec):
|
||||
# https://docs.jupyter.org/en/stable/use/jupyter-directories.html
|
||||
if os.path.exists(dependent_spec.prefix.etc.jupyter):
|
||||
env.prepend_path("JUPYTER_CONFIG_PATH", dependent_spec.prefix.etc.jupyter)
|
||||
if os.path.exists(dependent_spec.prefix.share.jupyter):
|
||||
env.prepend_path("JUPYTER_PATH", dependent_spec.prefix.share.jupyter)
|
||||
|
Loading…
Reference in New Issue
Block a user