Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Python > distutils question->when do install, says header (.h) file is an unknown file type!?!?!

Reply
Thread Tools

distutils question->when do install, says header (.h) file is an unknown file type!?!?!

 
 
Christian Seberino
Guest
Posts: n/a
 
      10-08-2003
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
 
Reply With Quote
 
 
 
 
Lukasz Pankowski
Guest
Posts: n/a
 
      10-10-2003
http://www.velocityreviews.com/forums/(E-Mail Removed) (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.

--

=*= Lukasz Pankowski =*=
 
Reply With Quote
 
 
 
 
David M. Cooke
Guest
Posts: n/a
 
      10-10-2003
At some point, Lukasz Pankowski <(E-Mail Removed)> wrote:

> (E-Mail Removed) (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
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
distutils, No module named numpy.distutils.fcompiler.conv_template Luis Alberto Zarrabeitia Gomez Python 0 03-30-2009 03:56 PM
Header files with "header.h" or <header.h> ?? mlt C++ 2 01-31-2009 02:54 PM
can distutils windows installer invoke another distutils windows installer timw.google Python 1 05-11-2006 10:07 PM
Dell says no & Acronis says maybe sysprep utility ( Re: Anyone use Acronis Drive Image 7.0? Bobby Fischler Computer Support 0 07-24-2004 12:12 AM
distutils: How "uninclude" one Python file and/or one .h (C header) file??? Christian Seberino Python 1 10-22-2003 10:52 PM



Advertisments