distutils: How handle header files??? Got any examples?

C

Christian Seberino

(distutils question)
I know how to configure C code with Extension class in setup.py.


But, how do you handle header files??.. Do you mention them in your
Extension(...) line??

It seems you must

1. Treat them like data files and put them *somewhere*.

2. Now you must add -I<path> command to compilation of .c files
that points there.

An example of this or pointers would be VERY nice.

Chris
 
?

=?ISO-8859-1?Q?Gerhard_H=E4ring?=

Christian said:
(distutils question)
I know how to configure C code with Extension class in setup.py.

But, how do you handle header files??.. Do you mention them in your
Extension(...) line?? [...]

No, just use them in your C files with

#include "myheader.h"

and put them in the same directory where your C files and your setup.py
are located.

Nothing more to worry about.

-- Gerhard
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,755
Messages
2,569,536
Members
45,011
Latest member
AjaUqq1950

Latest Threads

Top