summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorWu, Zhenyu <[email protected]>2025-05-15 03:10:57 +0800
committerWu, Zhenyu <[email protected]>2025-05-15 03:10:57 +0800
commit43088a77832349076bb796159d5a885065773d7f (patch)
tree242a63bc809eec381e06655a013e8e8b5cf47243
parent86970cf42c4b3623650d51cc219af1bc39ac1865 (diff)
Change python.module soabi's default value to true
-rw-r--r--tests/projects/python/pybind/example/xmake.lua2
-rw-r--r--tests/projects/python/pybind/example_with_soabi/xmake.lua2
-rw-r--r--xmake/rules/python/module/xmake.lua2
3 files changed, 3 insertions, 3 deletions
diff --git a/tests/projects/python/pybind/example/xmake.lua b/tests/projects/python/pybind/example/xmake.lua
index 93c200c57..e8435e360 100644
--- a/tests/projects/python/pybind/example/xmake.lua
+++ b/tests/projects/python/pybind/example/xmake.lua
@@ -2,7 +2,7 @@ add_rules("mode.release", "mode.debug")
add_requires("pybind11")
target("example")
- add_rules("python.module")
+ add_rules("python.module", {soabi = false})
add_files("src/*.cpp")
add_packages("pybind11")
set_languages("c++11")
diff --git a/tests/projects/python/pybind/example_with_soabi/xmake.lua b/tests/projects/python/pybind/example_with_soabi/xmake.lua
index 1b43713e8..93c200c57 100644
--- a/tests/projects/python/pybind/example_with_soabi/xmake.lua
+++ b/tests/projects/python/pybind/example_with_soabi/xmake.lua
@@ -2,7 +2,7 @@ add_rules("mode.release", "mode.debug")
add_requires("pybind11")
target("example")
- add_rules("python.module", {soabi = true})
+ add_rules("python.module")
add_files("src/*.cpp")
add_packages("pybind11")
set_languages("c++11")
diff --git a/xmake/rules/python/module/xmake.lua b/xmake/rules/python/module/xmake.lua
index 6f86d929b..46d41be0b 100644
--- a/xmake/rules/python/module/xmake.lua
+++ b/xmake/rules/python/module/xmake.lua
@@ -25,7 +25,7 @@ rule("python.module")
target:set("prefixname", "")
target:add("runenvs", "PYTHONPATH", target:targetdir())
local soabi = target:extraconf("rules", "python.module", "soabi")
- if soabi then
+ if soabi == nil or soabi then
import("lib.detect.find_tool")
local python = assert(find_tool("python3"), "python not found!")
local result = try { function() return os.iorunv(python.program, {"-c", "import sysconfig; print(sysconfig.get_config_var('EXT_SUFFIX'))"}) end}