-
-
Notifications
You must be signed in to change notification settings - Fork 2
Closed
Labels
good first issueGood for newcomersGood for newcomersquestionFurther information is requestedFurther information is requested
Description
Xmake 版本
3.0.6
操作系统版本和架构
ubuntu24.4
描述问题
xmake的默认行为将so文件安装到了.venv/lib目录,这导致pip wheel包后无法导入,虽然我查看了#1 可以通过
set_prefixdir修改安装位置
add_rules("mode.debug","mode.release")
add_rules("plugin.compile_commands.autoupdate", {outputdir="build"})
add_requires("python")
target("_myadd")
add_rules("python.module")
set_prefixdir("$(prefixdir)/$(pythondir)", { libdir = "", bindir = "" })
add_files("src/myadd/add.c")
add_packages("python")只有明确指定了前缀目录才能安装到正确的.venv/lib/python3.13/site-packages目录,这不算麻烦,但是这不人性化
可能的方案
如果可以在add_rules("python.module")中提前预设,如果能在xmake_python的构建系统上能做到的话更好,因为add_rules("python.module")规则可能还用于其他,可能造成影响。
期待的结果
默认行为就安装到正确位置.venv/lib/python3.13/site-packages 而不是.venv/lib
工程配置
add_rules("mode.debug","mode.release")
add_rules("plugin.compile_commands.autoupdate", {outputdir="build"})
add_requires("python")
target("_myadd")
add_rules("python.module")
-- set_prefixdir("$(prefixdir)/$(pythondir)", { libdir = "myadd", bindir = "" })
add_files("src/myadd/add.c")
add_packages("python")不指定的默认行为也应该正确
附加信息和错误日志
无
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
good first issueGood for newcomersGood for newcomersquestionFurther information is requestedFurther information is requested