flux-core,flux-sched: fix environments with external flux (#44775)
This commit is contained in:
parent
5541a184d5
commit
ad26dcfbfc
@ -181,6 +181,12 @@ def setup_build_environment(self, env):
|
|||||||
env.append_path("LUA_PATH", "./?.lua", separator=";")
|
env.append_path("LUA_PATH", "./?.lua", separator=";")
|
||||||
|
|
||||||
def setup_run_environment(self, env):
|
def setup_run_environment(self, env):
|
||||||
|
# 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(
|
env.prepend_path(
|
||||||
"LUA_PATH", os.path.join(self.spec.prefix, self.lua_share_dir, "?.lua"), separator=";"
|
"LUA_PATH", os.path.join(self.spec.prefix, self.lua_share_dir, "?.lua"), separator=";"
|
||||||
)
|
)
|
||||||
|
@ -166,6 +166,12 @@ def lua_lib_dir(self):
|
|||||||
return os.path.join("lib", "lua", str(self.lua_version))
|
return os.path.join("lib", "lua", str(self.lua_version))
|
||||||
|
|
||||||
def setup_run_environment(self, env):
|
def setup_run_environment(self, env):
|
||||||
|
# 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(
|
env.prepend_path(
|
||||||
"LUA_PATH", os.path.join(self.spec.prefix, self.lua_share_dir, "?.lua"), separator=";"
|
"LUA_PATH", os.path.join(self.spec.prefix, self.lua_share_dir, "?.lua"), separator=";"
|
||||||
)
|
)
|
||||||
|
Loading…
Reference in New Issue
Block a user