在构建需要编译代码的模块时,将自定义CMake标志传递给pip [英] Pass custom CMake flags to pip when building module that needs compiled code

查看:88
本文介绍了在构建需要编译代码的模块时,将自定义CMake标志传递给pip的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我当前正在安装一个需要使用pip编译代码(dlib)的模块. Pip运行setup.py,后者运行cmake并遵守代码.指定要安装的模块时,是否可以将自定义cmake标志传递给pip,还是我手动运行cmake的唯一选择?我实际上并没有找到太多有关此搜索的信息.

I'm currently installing a module that requires compiled code (dlib) using pip. Pip runs setup.py which runs cmake and complies the code. Is there a way to pass custom cmake flags to pip when specifying a module to install or is my only option to run cmake manually? I wasn't really able to find much about this searching around.

推荐答案

PR 在OS X上使用现成的Python 2.7.11为我工作.

This PR works for me, on OS X using a brewed Python 2.7.11.

这篇关于在构建需要编译代码的模块时,将自定义CMake标志传递给pip的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆