[Distutils] C extension modules
Floris Bruynooghe
floris.bruynooghe at gmail.com
Wed Jan 27 10:58:35 CET 2010
On Wed, Jan 27, 2010 at 10:57:37AM +0900, David Cournapeau wrote:
> On Wed, Jan 27, 2010 at 2:30 AM, Torsten Mohr <tmohr at s.netic.de> wrote:
> > What is the preferred way to make this information available to
> > the compiler so i can use code like #ifdef HOST_posix?
>
> Use a config.h, like autoconf does. Distutils does not make it for
> you, and plugging the necessary code in distutils to do it is a PITA,
> but that's doable.
>
> Basically, you need to extend the distutils config command, and goes
> from there:
Neat, I didn't know that command existed.
> class MyConfig(config):
> def check_headers(self, headers=None):
Why do you define this yourself? The base config class already
defines .check_header() that looks like it does the same (only one
header at a time rather then multiple).
Also, does anyone have an idea why config.check_func() and
CCompiler.has_function() basically seem to be doing the same?
Regards
Floris
--
Debian GNU/Linux -- The Power of Freedom
www.debian.org | www.gnu.org | www.kernel.org
More information about the Distutils-SIG
mailing list