pathccompiler.py 779 B

123456789101112131415161718192021222324
  1. from __future__ import division, absolute_import, print_function
  2. from distutils.unixccompiler import UnixCCompiler
  3. class PathScaleCCompiler(UnixCCompiler):
  4. """
  5. PathScale compiler compatible with an gcc built Python.
  6. """
  7. compiler_type = 'pathcc'
  8. cc_exe = 'pathcc'
  9. cxx_exe = 'pathCC'
  10. def __init__ (self, verbose=0, dry_run=0, force=0):
  11. UnixCCompiler.__init__ (self, verbose, dry_run, force)
  12. cc_compiler = self.cc_exe
  13. cxx_compiler = self.cxx_exe
  14. self.set_executables(compiler=cc_compiler,
  15. compiler_so=cc_compiler,
  16. compiler_cxx=cxx_compiler,
  17. linker_exe=cc_compiler,
  18. linker_so=cc_compiler + ' -shared')