[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

C API include files



Hi,

I am the maintainer of the astropy package [1], and there the topic was
brought up what to do with header files for the C API [2]. The package
provides a C API for one sub-package, astropy.wcs. In the moment, its
header files are just installed under

/usr/share/pyshared/astropy/wcs/include/ (Python2)
/usr/lib/python3/dist-packages/astropy/wcs/include/ (Python3)

which is not optimal since they cannot be included without an explicite
-I option to the C preprocessor. One could just provide a symlink from
/usr/include/astropy; however this leads to some problems:

* How to distinguish between python2 and python3? I guess that under
  python3, the symlink should go from /usr/include/python3.3(m|dm)/,
  like on numpy?

* The header files actually include header files from another package
  (wcslib-dev). Since astropy is under active development, I expect that
  these dependencies grow up in future, and it is probably not ideal
  that an end-user python package depends on a number of -dev packages.
  Would you recommend to create python(?:3)-astropy-dev packages here
  that just contain the header files and their dependencies?

Are there rules on how to handle header files bundled with a python
package? I couldn't find anything for this in the Python policy, maybe
it is worth to put a paragraph there?

Best regards

Ole

[1] http://packages.qa.debian.org/p/python-astropy.html
    http://www.astropy.org
[2] https://github.com/astropy/astropy/issues/1868


Reply to: