setup.py and file extensions like ".c++"

G

garyjefferson123

Is there any way to get setup.py to recognize file extensions like .c++
in lieu of .cpp? I'd love to not have to rename the source files for
the library I'm trying to wrap in a python C extension.

I get:

error: unknown file type '.c++' (from 'parser.c++')

when I type 'python setup.py build'

thanks,
Gary
 
G

Glenn Hutchings

Is there any way to get setup.py to recognize file extensions like .c++
in lieu of .cpp? I'd love to not have to rename the source files for
the library I'm trying to wrap in a python C extension.

The python docs imply that the file extension is dealt with by the
native C++ build system, so you have to use a recognized suffix (either
..cpp or .cc, and possibly others). Looks like .c++ isn't a standard
one. See

http://docs.python.org/dist/describing-extensions.html#SECTION002320000000000000000

Glenn
 

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
473,780
Messages
2,569,611
Members
45,280
Latest member
BGBBrock56

Latest Threads

Top