Author sylvain.corlay
Recipients sylvain.corlay
Date 2016-05-04.16:17:44
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1462378664.68.0.201238634465.issue26955@psf.upfronthosting.co.za>
In-reply-to
Content
When installing a python package that has `headers`, these headers are usually installed under the main python include directory, which can be retrieved with `sysconfig.get_path('include')` or directly referred to as 'include' when setting the include directories of an extension module. 

However, on some systems like OS X, headers for extension modules are not located in under the python include directory (/usr/local/Cellar/pythonX/X.Y.Z/Frameworks/Python.framework/Versions/X.Y/include/pythonX.Y) but in `/usr/local/include/pythonX.Y`.

Is there a generic way to find the location where  headers are installed in a  python install?

pip.locations implements `distutils_scheme` which seems to be returning the right thing, but it seems to be a bit overkill to require pip. On the other side, no path returned by sysconfig corresponds to `/usr/local/include/pythonX.Y`
History
Date User Action Args
2016-05-04 16:17:44sylvain.corlaysetrecipients: + sylvain.corlay
2016-05-04 16:17:44sylvain.corlaysetmessageid: <1462378664.68.0.201238634465.issue26955@psf.upfronthosting.co.za>
2016-05-04 16:17:44sylvain.corlaylinkissue26955 messages
2016-05-04 16:17:44sylvain.corlaycreate