Skip to content
Sections
>> Trisquel >> 软件包 >> aramo >> python >> python3-cppimport
aramo  ]
[ 源代码: cppimport  ]

软件包: python3-cppimport (21.03.07-2)

cppimport - Import C++ directly from Python! (Python 3)

Sometimes Python just isn't fast enough. Or you have existing code in a C++ library. cppimport combines the process of compiling and importing an extension in Python so that you can type modulename = cppimport.imp("modulename") and not have to worry about multiple steps.

cppimport looks for a C or C++ source file that matches the requested module. If such a file exists, the file is first run through the Mako templating system. The compilation options produced by the Mako pass are then used to compile the file as a Python extension. The extension (shared library) that is produced is placed in the same folder as the C++ source file. Then, the extension is loaded.

Most cppimport users combine it with pybind11, but you can use a range of methods to create your Python extensions. Raw C extensions, Boost.Python, SWIG all work.

其他与 python3-cppimport 有关的软件包

  • 依赖
  • 推荐
  • 建议
  • dep: python3
    interactive high-level object-oriented language (default python3 version)
  • dep: python3-mako
    fast and lightweight templating for the Python 3 platform
  • dep: python3-pybind11
    pybind11 helper module for Python 3

下载 python3-cppimport

下载可用于所有硬件架构的
硬件架构 软件包大小 安装后大小 文件
all 12.4 kB53 kB [文件列表]