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

0

3

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.

Reform answered 31/8, 2015 at 14:35 Comment(1)
Use data files / package data.Rhonarhonchus

© 2022 - 2024 — McMap. All rights reserved.