From 690073e61bcf916e516e3406a31d64b9e1963441 Mon Sep 17 00:00:00 2001 From: ruki Date: Sun, 4 Sep 2022 22:16:54 +0800 Subject: add target runenvs for xrepo.env --- xmake/modules/private/xrepo/action/env.lua | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/xmake/modules/private/xrepo/action/env.lua b/xmake/modules/private/xrepo/action/env.lua index 02ef2c4e7..4b5bb319e 100644 --- a/xmake/modules/private/xrepo/action/env.lua +++ b/xmake/modules/private/xrepo/action/env.lua @@ -27,6 +27,7 @@ import("core.project.config") import("core.project.project") import("core.tool.toolchain") import("lib.detect.find_tool") +import("private.action.run.make_runenvs") import("private.action.require.impl.package") import("private.action.require.impl.utils.get_requires") @@ -307,6 +308,11 @@ function _target_addenvs(envs) _addenvs(envs, "DYLD_LIBRARY_PATH", target:targetdir()) end end + -- add run environments + local addrunenvs = make_runenvs(target) + for name, values in pairs(addrunenvs) do + _addenvs(envs, name, table.unpack(table.wrap(values))) + end end end -- cgit v1.3.1 From 19cd54988bbf096582ecc93b8d34ff1ba59690c5 Mon Sep 17 00:00:00 2001 From: ruki Date: Sun, 4 Sep 2022 22:20:18 +0800 Subject: add python library env --- xmake/rules/python/xmake.lua | 1 + 1 file changed, 1 insertion(+) diff --git a/xmake/rules/python/xmake.lua b/xmake/rules/python/xmake.lua index d566fa849..da54ead22 100644 --- a/xmake/rules/python/xmake.lua +++ b/xmake/rules/python/xmake.lua @@ -23,6 +23,7 @@ rule("python.library") on_config(function (target) target:set("kind", "shared") target:set("prefixname", "") + target:add("runenvs", "PYTHONPATH", target:targetdir()) local soabi = target:extraconf("rules", "python.library", "soabi") if soabi then import("lib.detect.find_tool") -- cgit v1.3.1