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

  • Thread starter Christian Seberino
  • Start date
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

Forum statistics

Threads
474,432
Messages
2,571,682
Members
48,796
Latest member
Greg L.

Latest Threads

Top