Update distutils for openmp and new version of pip

This commit is contained in:
2019-02-19 17:30:53 +01:00
parent 29c56572cf
commit 52de6f2717
31 changed files with 114 additions and 44 deletions

21
distutils.ext/obidistutils/command/build_exe.py Executable file → Normal file
View File

@ -6,12 +6,28 @@ Created on 20 oct. 2012
import os
from distutils import sysconfig
from distutils.core import Command
from distutils.sysconfig import customize_compiler
from distutils.sysconfig import customize_compiler as customize_compiler_ori
from distutils.errors import DistutilsSetupError
from distutils import log
from distutils.ccompiler import show_compilers
def customize_compiler(compiler):
customize_compiler_ori(compiler)
compilername = compiler.compiler[0]
if ("gcc" in compilername or "g++" in compilername):
cc_cmd = ' '.join(compiler.compiler + ['-fopenmp'])
ccshared= ' '.join(x for x in sysconfig.get_config_vars("ccshared") if x is not None)
compiler.set_executables(
compiler=cc_cmd,
compiler_so=cc_cmd + ' ' + ccshared
)
class build_exe(Command):
description = "build an executable -- Abstract command "
@ -80,6 +96,7 @@ class build_exe(Command):
else:
self.extra_compile_args.append('-m%s' % self.sse)
# XXX same as for build_ext -- what about 'self.define' and
# 'self.undef' ?
@ -96,7 +113,7 @@ class build_exe(Command):
dry_run=self.dry_run,
force=self.force)
customize_compiler(self.compiler)
if self.include_dirs is not None:
self.compiler.set_include_dirs(self.include_dirs)
if self.define is not None: