2016-09-26 32 views
1

我有一個我繼承的Cython模塊。我建了一次。然後,當我第二次構建它時,出現以下錯誤:Cython:UserWarning:未知擴展選項:'include_path'

[email protected]:pcl_functions (master=)$ sudo python setup.py build_ext --inplace 
/usr/local/Cellar/python/2.7.12/Frameworks/Python.framework/Versions/2.7/lib/python2.7/distutils/extension.py:133: UserWarning: Unknown Extension options: 'include_path' 
    warnings.warn(msg) 

可能是什麼原因?我是Cython的新手,並且因爲模塊爲什麼會構建一次,所以後來給我發出這個錯誤。

回答

1

也許你上次使用過不同版本的Cython。用cython --version檢查版本。

的cythonize()函數似乎接受include_path中:https://github.com/cython/cython/search?utf8=%E2%9C%93&q=include_path

您使用的擴展或cythonize?對於cythonize用法見https://github.com/cython/cython/wiki/enhancements-distutils_preprocessing

擴展()接受 「include_dirs」 選項: https://github.com/cztomczak/cefpython/blob/f8286e0ff5abf32242986aca2e7bb8fd3f6a60ff/src/linux/setup/setup.py#L66