specifying headers for an extension
When building an extension, how do I specify that some C header files should be considered part of the sources for the purpose of dependency checking? I can't include them with the list of C files: running build_ext building '_datetime' extension error: unknown file type '.h' (from 'datetime.h') make: *** [_datetime.so] Error 1 and just specifying their location isn't the right thing either. I want the .o file to be re-built if the header changes. I didn't see anything about this in the docs. If someone can point me in the right direction, I can update the docs so others can find this information. Thanks! -Fred -- Fred L. Drake, Jr. <fdrake at acm.org> PythonLabs at Zope Corporation
From: "Fred L. Drake, Jr." <fdrake@acm.org>
When building an extension, how do I specify that some C header files should be considered part of the sources for the purpose of dependency checking? I can't include them with the list of C files:
running build_ext building '_datetime' extension error: unknown file type '.h' (from 'datetime.h') make: *** [_datetime.so] Error 1
and just specifying their location isn't the right thing either. I want the .o file to be re-built if the header changes.
AFAIK, you cannot. Thomas
I need such things too. In my case there is the module initialisation in the *module.c file and some 100 of method definitions in another that is included into the first. It would be nice if setup.py can handle this. Thomas Heller schrieb:
From: "Fred L. Drake, Jr." <fdrake@acm.org>
When building an extension, how do I specify that some C header files should be considered part of the sources for the purpose of dependency checking? I can't include them with the list of C files:
running build_ext building '_datetime' extension error: unknown file type '.h' (from 'datetime.h') make: *** [_datetime.so] Error 1
and just specifying their location isn't the right thing either. I want the .o file to be re-built if the header changes.
AFAIK, you cannot.
Thomas
_______________________________________________ Distutils-SIG maillist - Distutils-SIG@python.org http://mail.python.org/mailman/listinfo/distutils-sig
When building an extension, how do I specify that some C header files should be considered part of the sources for the purpose of dependency checking? I can't include them with the list of C files:
running build_ext building '_datetime' extension error: unknown file type '.h' (from 'datetime.h') make: *** [_datetime.so] Error 1
and just specifying their location isn't the right thing either. I want the .o file to be re-built if the header changes.
I didn't see anything about this in the docs. If someone can point me in the right direction, I can update the docs so others can find this information.
Thanks!
-Fred
I've uplaoded a patch: http://python.org/sf/533008 Thomas
participants (3)
-
Achim Gaedke
-
Fred L. Drake, Jr.
-
Thomas Heller