Swig
我们可以使用 Swig 来开发 Python 模块,详细的介绍可以看下:Python Modules with Swig
Cython
我们也可以使用 Cython 来构建 Python 模块。
xmake.lua
PyBind
我们还可以使用 pybind11 来构建 python 模块。
xmake.lua
Python Module
我们也可以使用 Python Library 提供的 C-API 接口直接构建 Python 模块。
xmake.lua
我们可以使用 Swig 来开发 Python 模块,详细的介绍可以看下:Python Modules with Swig
我们也可以使用 Cython 来构建 Python 模块。
add_rules("mode.debug", "mode.release")
add_requires("python 3.x")
target("example")
add_rules("python.cython")
add_files("src/*.pyx")
add_packages("python")
我们还可以使用 pybind11 来构建 python 模块。
add_rules("mode.release", "mode.debug")
add_requires("pybind11")
target("example")
add_rules("python.module")
add_files("src/*.cpp")
add_packages("pybind11")
set_languages("c++11")
我们也可以使用 Python Library 提供的 C-API 接口直接构建 Python 模块。
add_rules("mode.debug", "mode.release")
add_requires("python 3.x")
target("example")
add_rules("python.module")
add_files("src/*.c")
add_packages("python")