How to have PyPI package install header files for C extension with distutils/setuptools?

心已入冬 提交于 2019-12-22 09:20:12

问题


We have a package (rebound) up on PyPI that includes a C extension . The relevant part of the setup.py file looks like this (simplified):

libreboundmodule = Extension('librebound',
                sources = [ 'src/rebound.c'],  
                include_dirs = ['src'],)   

Additional libraries need access to rebound.h, but when one runs

pip install rebound

it doesn't install rebound.h anywhere. How can we get distutils/setuptools to install rebound.h somewhere along with all the python modules? We're hoping that we can have pip install rebound do all the work so the user doesn't have to run any additional commands.

来源:https://stackoverflow.com/questions/32313793/how-to-have-pypi-package-install-header-files-for-c-extension-with-distutils-set

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!