Python and Autoconf

Martin von Loewis loewis at informatik.hu-berlin.de
Sun May 27 07:38:14 EDT 2001


Lars von Wedel <vonWedel at lfpt.rwth-aachen.de> writes:

> Is there any way to properly integrate distutils as part of an
> automake driven process, too? I.e. would it respect settings for
> compilers, directories and such?

Depends on what "properly" and "respect" is :-)

When you build Python extensions, then distutils will already know
what compiler to use and what flags to pass to it for building shared
libraries, etc. If your autoconf script comes up with different
settings, chances are good that the Python settings are right and the
automake settings are wrong.

So the only thing that automake really needs to decide is the name of
the Python binary. That nicely integrates into a build process, as you
just have to do

pyexts:
  python setup.py build

install::
  python setup.py install

If you absolutely insist on using your settings for CCSHARED,
LDSHARED, etc, then you need to modify
distutils.sysconfig._config_vars. That could be done inside setup.py,
e.g. based on environment settings passed in the makefile.

Regards,
Martin



More information about the Python-list mailing list