distutils, extensions, and missing headers

Gary Jefferson garyjefferson123 at yahoo.com
Fri Sep 21 00:20:59 EDT 2007


On Sep 20, 12:08 pm, Robert Kern <robert.k... at gmail.com> wrote:
> Gary Jefferson wrote:
> > On Sep 20, 1:22 am, Robert Kern <robert.k... at gmail.com> wrote:
> >> Use the "headers" keyword to setup() to list theheaderfiles 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.
>
> You might need an accurate relative path. I'm assuming that you don't actually
> keep header1.h and header2.h in the top-level directory next to the setup.py.

I think I've got it, just needed to do a MANIFEST.in file as in
http://groups.google.com/group/comp.lang.python/browse_thread/thread/64ed59544c4c047e/e329ad06c50cff46?lnk=gst&q=distutils+header&rnum=1#e329ad06c50cff46
.  Apparently, the headers arg doesn't affect sdist or bdist.

With that, the headers get included in the tarballs, and bdist_rpm no
longer complains about them.  Unfortunately, it now complains about
missing .o files.  These .o's are built automatically via 'setup.py
build', but not via 'setup.py bdist_rpm', for reasons I can't fathom
at the moment.  But if I figure it out, I'll post here.

Gary




More information about the Python-list mailing list