File tree Expand file tree Collapse file tree 5 files changed +30
-5
lines changed
tests/projects/python/pybind Expand file tree Collapse file tree 5 files changed +30
-5
lines changed Original file line number Diff line number Diff line change @@ -2,7 +2,7 @@ add_rules("mode.release", "mode.debug")
22add_requires (" pybind11" )
33
44target (" example" )
5- add_rules (" python.library " )
5+ add_rules (" python.module " )
66 add_files (" src/*.cpp" )
77 add_packages (" pybind11" )
88 set_languages (" c++11" )
Original file line number Diff line number Diff line change @@ -2,7 +2,7 @@ add_rules("mode.release", "mode.debug")
22add_requires (" pybind11" )
33
44target (" example" )
5- add_rules (" python.library " , {soabi = true })
5+ add_rules (" python.module " , {soabi = true })
66 add_files (" src/*.cpp" )
77 add_packages (" pybind11" )
88 set_languages (" c++11" )
Original file line number Diff line number Diff line change 1919--
2020
2121rule (" python.cython" )
22- add_deps (" python.library " )
22+ add_deps (" python.module " )
2323 set_extensions (" .py" , " .pyx" )
2424
2525 on_load (function (target )
Original file line number Diff line number Diff line change 1+ -- !A cross-platform build utility based on Lua
2+ --
3+ -- Licensed under the Apache License, Version 2.0 (the "License");
4+ -- you may not use this file except in compliance with the License.
5+ -- You may obtain a copy of the License at
6+ --
7+ -- http://www.apache.org/licenses/LICENSE-2.0
8+ --
9+ -- Unless required by applicable law or agreed to in writing, software
10+ -- distributed under the License is distributed on an "AS IS" BASIS,
11+ -- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12+ -- See the License for the specific language governing permissions and
13+ -- limitations under the License.
14+ --
15+ -- Copyright (C) 2015-present, TBOOX Open Source Group.
16+ --
17+ -- @author ruki
18+ -- @file xmake.lua
19+ --
20+
21+ rule (" python.library" )
22+ on_config (function (target )
23+ wprint (' deprecated: please use add_rules("python.module") instead of add_rules("python.library")' )
24+ end )
25+ add_deps (" python.module" )
Original file line number Diff line number Diff line change 1919--
2020
2121-- @see https://github.com/xmake-io/xmake/issues/1896
22- rule (" python.library " )
22+ rule (" python.module " )
2323 on_config (function (target )
2424 target :set (" kind" , " shared" )
2525 target :set (" prefixname" , " " )
2626 target :add (" runenvs" , " PYTHONPATH" , target :targetdir ())
27- local soabi = target :extraconf (" rules" , " python.library " , " soabi" )
27+ local soabi = target :extraconf (" rules" , " python.module " , " soabi" )
2828 if soabi then
2929 import (" lib.detect.find_tool" )
3030 local python = assert (find_tool (" python3" ), " python not found!" )
You can’t perform that action at this time.
0 commit comments