Conversation
| local python = assert(find_tool("python3"), "python not found!") | ||
|
|
||
| local envs = target:pkgenvs() | ||
| local python = assert(find_tool("python3", {envs = envs}), "python not found!") |
There was a problem hiding this comment.
按理 add_packages("python") 后,rule script 会自动绑定 python env ,优先找包里面的 python ,不需要额外设置 envs。。
如果没有 add_packages("python"),只有 系统 python 的情况下,我不确定是否会有反效果,导致系统 python 始终找不到
There was a problem hiding this comment.
我这里只 add_packages("pybind11"),间接依赖 python 没处理好?
There was a problem hiding this comment.
rule script 会自动绑定 python env
这个是绑定了 pkgenvs 还是针对 python 开洞
There was a problem hiding this comment.
on_load/build/install 等脚本都会统一绑定 pkgenvs,通用的
xmake/xmake/core/project/target.lua
Line 157 in 94d1ff4
xmake/xmake/actions/install/install.lua
Line 60 in 94d1ff4
不过 on_config 好像忘记绑定 pkgenvs 了,这应该是 on_config 的问题,跟特定 python rule 无关
There was a problem hiding this comment.
那应该就是 on_config 没加的问题。
|
试试这个 patch #6641 |
没问题了。 |
No problem. |
When using xrepo python, it should not find the system python library.