473,387 Members | 1,700 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

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

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
Jul 18 '05 #1
2 2287
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.

--

=*= Lukasz Pankowski =*=
Jul 18 '05 #2
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
Jul 18 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: Isaac Jones | last post by:
Hello Python Community. I bring greetings from the Haskell community (http://www.haskell.org) ;) There has been a lot of discussion of late about creating a grand-unified build & distribution...
2
by: Skip Montanaro | last post by:
I would like to override the distutils install class. It doesn't look like it was designed for that. Do I have to import distutils.command and overwrite its install attribute? I didn't see...
0
by: Justin | last post by:
Hi. I decided to tidy up some of my queries, but I came across something that stumpt me: mysql> SELECT -> jobs.jobId, -> jobs.active, -> jobs.title, -> jobs.listed, -> ...
0
by: Suzanne | last post by:
I'd like to know how can I put up a confirmation question when the user tries to delete a row in the datagrid by clicking on the row header and pressing the Delete key? I have found this code on...
5
by: xchong.zhou | last post by:
I have a question when I work on Linkedserver The Linkedserver name is ,the Datebase name is Newexec,the Table name is Customers_CoypTest The SQLScript is below: Update ...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.