Skip to content

Commit 43088a7

Browse files
committed
Change python.module soabi's default value to true
1 parent 86970cf commit 43088a7

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

tests/projects/python/pybind/example/xmake.lua

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ add_rules("mode.release", "mode.debug")
22
add_requires("pybind11")
33

44
target("example")
5-
add_rules("python.module")
5+
add_rules("python.module", {soabi = false})
66
add_files("src/*.cpp")
77
add_packages("pybind11")
88
set_languages("c++11")

tests/projects/python/pybind/example_with_soabi/xmake.lua

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ add_rules("mode.release", "mode.debug")
22
add_requires("pybind11")
33

44
target("example")
5-
add_rules("python.module", {soabi = true})
5+
add_rules("python.module")
66
add_files("src/*.cpp")
77
add_packages("pybind11")
88
set_languages("c++11")

xmake/rules/python/module/xmake.lua

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ rule("python.module")
2525
target:set("prefixname", "")
2626
target:add("runenvs", "PYTHONPATH", target:targetdir())
2727
local soabi = target:extraconf("rules", "python.module", "soabi")
28-
if soabi then
28+
if soabi == nil or soabi then
2929
import("lib.detect.find_tool")
3030
local python = assert(find_tool("python3"), "python not found!")
3131
local result = try { function() return os.iorunv(python.program, {"-c", "import sysconfig; print(sysconfig.get_config_var('EXT_SUFFIX'))"}) end}

0 commit comments

Comments
 (0)