At some point, Lukasz Pankowski <lu***@zamek.gda.pl> wrote:
se******@spawar.navy.mil (Christian Seberino) writes:
I have a program that has Python and C code.
I added Extension stuff to setup.py and all .c and .h
files get into tarball fine.
(I have something like Extension("foo", glob.glob("bar/*.[ch]") )
When I try to INSTALL the package it says header (.h)
file is an unknown type. How fix this???
Chris
Do not include your header files in Extension (their not supported
there), if you want to distribute them with your extension, add them
to setup call, as in
setup(..., headers=['bcsim/bcsim.h'])
if you only need them to build your extension (for source
distributions and rpms) include them in MANIFEST.in instead.
distutils now supports (as of 2.3) the depends= keyword in Extension,
which adds more make-like functionality: Extension("foo",
['bar/bar.c'], depends=['bar/bar.h']) will cause the foo module to be
rebuilt if bar/bar.h changes.
I think what the OP wants is for his .h files to be included in the
source distribution. setup(..., headers=[...]) won't do that; you'll
still have to add them to the MANIFEST.in.
When in doubt whether it will be packaged, add it to MANIFEST.in.
--
|>|\/|<
/--------------------------------------------------------------------------\
|David M. Cooke
|cookedm(at)physics(dot)mcmaster(dot)ca