简体   繁体   English

结合 CMakeLists.txt、boost-python 和 python setuptools

[英]Combining CMakeLists.txt, boost-python with python setuptools

I have a project where I interface ITK code with boost-python to compile a .so file which I can include in my python projects.我有一个项目,我将 ITK 代码与 boost-python 连接起来编译一个 .so 文件,我可以将它包含在我的 python 项目中。 As I have discovered, compiling an ITK module is the most convenient when you use CMake.正如我发现的,当您使用 CMake 时,编译 ITK 模块是最方便的。

If I wish to distribute this as a python package, what would be the most robust way to call cmake to generate my .so and install this?如果我希望将它作为 python 包分发,调用 cmake 生成我的 .so 并安装它的最可靠的方法是什么?

The easiest would be creating a remote module and using ITK infrastructure to build a python package.最简单的方法是创建一个远程模块并使用 ITK 基础设施来构建一个 python 包。 Docs: https://itkpythonpackage.readthedocs.io/en/latest/Build_ITK_Module_Python_packages.html文档: https : //itkpythonpackage.readthedocs.io/en/latest/Build_ITK_Module_Python_packages.html

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM