Skip to content

Commit

Permalink
flux-sched: adds comments describing external spec check
Browse files Browse the repository at this point in the history
  • Loading branch information
ilumsden committed Jun 20, 2024
1 parent 43867c1 commit 0688842
Showing 1 changed file with 19 additions and 19 deletions.
38 changes: 19 additions & 19 deletions var/spack/repos/builtin/packages/flux-sched/package.py
Original file line number Diff line number Diff line change
Expand Up @@ -176,25 +176,25 @@ def lua_lib_dir(self):
return os.path.join("lib", "lua", str(self.lua_version))

def setup_run_environment(self, env):
if not self.spec.external:
env.prepend_path(
"LUA_PATH",
os.path.join(self.spec.prefix, self.lua_share_dir, "?.lua"),
separator=";",
)
env.prepend_path(
"LUA_CPATH",
os.path.join(self.spec.prefix, self.lua_lib_dir, "?.so"),
separator=";",
)

env.prepend_path("FLUX_MODULE_PATH", self.prefix.lib.flux.modules)
env.prepend_path("FLUX_MODULE_PATH", self.prefix.lib.flux.modules.sched)
# On some systems modules are in lib64 and lib
env.prepend_path("FLUX_MODULE_PATH", self.prefix.lib64.flux.modules)
env.prepend_path("FLUX_MODULE_PATH", self.prefix.lib64.flux.modules.sched)
env.prepend_path("FLUX_EXEC_PATH", self.prefix.libexec.flux.cmd)
env.prepend_path("FLUX_RC_EXTRA", self.prefix.etc.flux)
# If this package is external, we expect the external provider to set things like LUA paths.
# So, we early return. If the package is not external, properly set these environment variables
# to make sure the user environment is configured correctly
if self.spec.external:
return
env.prepend_path(
"LUA_PATH", os.path.join(self.spec.prefix, self.lua_share_dir, "?.lua"), separator=";"
)
env.prepend_path(
"LUA_CPATH", os.path.join(self.spec.prefix, self.lua_lib_dir, "?.so"), separator=";"
)

env.prepend_path("FLUX_MODULE_PATH", self.prefix.lib.flux.modules)
env.prepend_path("FLUX_MODULE_PATH", self.prefix.lib.flux.modules.sched)
# On some systems modules are in lib64 and lib
env.prepend_path("FLUX_MODULE_PATH", self.prefix.lib64.flux.modules)
env.prepend_path("FLUX_MODULE_PATH", self.prefix.lib64.flux.modules.sched)
env.prepend_path("FLUX_EXEC_PATH", self.prefix.libexec.flux.cmd)
env.prepend_path("FLUX_RC_EXTRA", self.prefix.etc.flux)


class CMakeBuilder(CMakeBuilder):
Expand Down

0 comments on commit 0688842

Please sign in to comment.