distutils, extensions, and missing headers

Gary Jefferson garyjefferson123 at yahoo.com
Thu Sep 20 10:06:33 EDT 2007


Robert, thanks for the help!


On Sep 20, 1:22 am, Robert Kern <robert.k... at gmail.com> wrote:
>
> Use the "headers" keyword to setup() to list the header files you want installed.

  I've tried "headers=['header1.h', 'header2.h']" in setup() as well
as in Extension(), and neither seem to get the files into the bdist or
bdist_rpm tarball.  Am I doing it wrong?  I can't seem to find any
examples that use this via google.


> For other files, it depends on where you need them to go. If you want the data
> files to be inside the package, you should use the "package_data" keyword. It
> was introduced in Python 2.4, so if you need to support pre-2.4 Pythons, there
> are recipes floating around to do so more nicely.
>
>  http://docs.python.org/dist/node12.html
>
> For other things (and hopefully, you can live with package data), use "data_files":
>
>  http://docs.python.org/dist/node13.html

  I also tried using data_files to get the headers included, but can't
seem to get that to work either.  No errors are reported for either
method.

Thanks,
Gary




More information about the Python-list mailing list