3
0
Fork 0
forked from mirrors/nixpkgs
nixpkgs/pkgs/development/python-modules/numpy/numpy-distutils-C++.patch

31 lines
1.5 KiB
Diff
Raw Normal View History

diff --git a/numpy/distutils/unixccompiler.py b/numpy/distutils/unixccompiler.py
--- a/numpy/distutils/unixccompiler.py
+++ b/numpy/distutils/unixccompiler.py
2020-07-03 01:23:36 +01:00
@@ -37,8 +37,6 @@ def UnixCCompiler__compile(self, obj, src, ext, cc_args, extra_postargs, pp_opts
if opt not in llink_s:
self.linker_so = llink_s.split() + opt.split()
- display = '%s: %s' % (os.path.basename(self.compiler_so[0]), src)
2017-08-29 04:41:35 +01:00
-
# gcc style automatic dependencies, outputs a makefile (-MF) that lists
# all headers needed by a c file as a side effect of compilation (-MMD)
if getattr(self, '_auto_depends', False):
2020-07-03 01:23:36 +01:00
@@ -47,8 +45,15 @@ def UnixCCompiler__compile(self, obj, src, ext, cc_args, extra_postargs, pp_opts
2017-08-29 04:41:35 +01:00
deps = []
try:
2017-08-29 04:41:35 +01:00
- self.spawn(self.compiler_so + cc_args + [src, '-o', obj] + deps +
- extra_postargs, display = display)
+ if self.detect_language(src) == 'c++':
+ display = '%s: %s' % (os.path.basename(self.compiler_so_cxx[0]), src)
2017-08-29 04:41:35 +01:00
+ self.spawn(self.compiler_so_cxx + cc_args + [src, '-o', obj] + deps +
+ extra_postargs, display = display)
+ else:
+ display = '%s: %s' % (os.path.basename(self.compiler_so[0]), src)
2017-08-29 04:41:35 +01:00
+ self.spawn(self.compiler_so + cc_args + [src, '-o', obj] + deps +
+ extra_postargs, display = display)
2017-08-29 04:41:35 +01:00
+
2020-07-03 01:23:36 +01:00
except DistutilsExecError as e:
msg = str(e)
raise CompileError(msg)