[Distutils] building extensions with AIX
Rene Liebscher
R.Liebscher@gmx.de
Fri, 23 Jun 2000 18:48:13 +0200
This is a multi-part message in MIME format.
--------------41DD571985AC7F26155FDA3E
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Hi,
I have seen in the TODO file
that there was an entry about AIX.
I tried it and found some little
problems. It seems some paths in the
Makefile are wrong.
After playing a little bit around
with it, I wrote a new compiler
class. (I think, these changes could
be included in unixccompiler, but
to test it, it is nice to have a
own file for it.)
Maybe we should also change the
default compiler table. I think
we should have entries for sys.platform
in it, too. So we could try a more
specific name first ('aix4') and if
there is no entry the usual os.name
('posix'.)
The AIXCCompiler class is attached,
maybe someone wants to try it, and
find out if this is really all
we have to change against the
standard unixccompiler.
(Don't forget to make an entry
for it in ccompiler.py.)
kind regards
Rene Liebscher
PS: I used AIX 4.3 and its 'cc' compiler.
--------------41DD571985AC7F26155FDA3E
Content-Type: text/plain; charset=us-ascii; name="aixccompiler.py"
Content-Transfer-Encoding: 7bit
Content-Disposition: inline; filename="aixccompiler.py"
"""distutils.aixccompiler
Contains the AIXCCompiler class, a subclass of UnixCCompiler that handles
some path problems with AIX.
The makefile isn't correct for distutils' standard compiler.
"""
# created 2000/06/23, Rene Liebscher
__revision__ = "$Id: aixccompiler.py $"
from distutils import sysconfig
from distutils.unixccompiler import UnixCCompiler
# XXX Things not currently handled:
# * see UnixCCompiler
class AIXCCompiler (UnixCCompiler):
compiler_type = 'aix'
def __init__ (self,
verbose=0,
dry_run=0,
force=0):
UnixCCompiler.__init__ (self, verbose, dry_run, force)
# we have to correct some paths
self.ld_shared=sysconfig.get_python_lib(standard_lib=1)+'/config/ld_so_aix'
self.ldflags_shared.append('-bI:'+sysconfig.get_python_lib(standard_lib=1)+'/config/python.exp')
# __init__ ()
# class AIXCCompiler
--------------41DD571985AC7F26155FDA3E--