python.pkgs.numpy: fix patch
This commit is contained in:
parent
5d36618249
commit
4d3c396181
@ -1,23 +1,31 @@
|
|||||||
diff --git a/numpy/distutils/unixccompiler.py b/numpy/distutils/unixccompiler.py
|
diff --git a/numpy/distutils/unixccompiler.py b/numpy/distutils/unixccompiler.py
|
||||||
index a92ccd3..9630e91 100644
|
index 6ed5eec..82a88b5 100644
|
||||||
--- a/numpy/distutils/unixccompiler.py
|
--- a/numpy/distutils/unixccompiler.py
|
||||||
+++ b/numpy/distutils/unixccompiler.py
|
+++ b/numpy/distutils/unixccompiler.py
|
||||||
@@ -43,10 +43,15 @@ def UnixCCompiler__compile(self, obj, src, ext, cc_args, extra_postargs, pp_opts
|
@@ -44,8 +44,6 @@ def UnixCCompiler__compile(self, obj, src, ext, cc_args, extra_postargs, pp_opts
|
||||||
if opt not in llink_s:
|
if opt not in llink_s:
|
||||||
self.linker_so = llink_s.split() + opt.split()
|
self.linker_so = llink_s.split() + opt.split()
|
||||||
|
|
||||||
- display = '%s: %s' % (os.path.basename(self.compiler_so[0]), src)
|
- display = '%s: %s' % (os.path.basename(self.compiler_so[0]), src)
|
||||||
|
-
|
||||||
|
# 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):
|
||||||
|
@@ -54,8 +52,15 @@ def UnixCCompiler__compile(self, obj, src, ext, cc_args, extra_postargs, pp_opts
|
||||||
|
deps = []
|
||||||
|
|
||||||
try:
|
try:
|
||||||
- self.spawn(self.compiler_so + cc_args + [src, '-o', obj] +
|
- self.spawn(self.compiler_so + cc_args + [src, '-o', obj] + deps +
|
||||||
- extra_postargs, display = display)
|
- extra_postargs, display = display)
|
||||||
+ if self.detect_language(src) == 'c++':
|
+ if self.detect_language(src) == 'c++':
|
||||||
+ display = '%s: %s' % (os.path.basename(self.compiler_so_cxx[0]), src)
|
+ display = '%s: %s' % (os.path.basename(self.compiler_so_cxx[0]), src)
|
||||||
+ self.spawn(self.compiler_so_cxx + cc_args + [src, '-o', obj] +
|
+ self.spawn(self.compiler_so_cxx + cc_args + [src, '-o', obj] + deps +
|
||||||
+ extra_postargs, display = display)
|
+ extra_postargs, display = display)
|
||||||
+ else:
|
+ else:
|
||||||
+ display = '%s: %s' % (os.path.basename(self.compiler_so[0]), src)
|
+ display = '%s: %s' % (os.path.basename(self.compiler_so[0]), src)
|
||||||
+ self.spawn(self.compiler_so + cc_args + [src, '-o', obj] +
|
+ self.spawn(self.compiler_so + cc_args + [src, '-o', obj] + deps +
|
||||||
+ extra_postargs, display = display)
|
+ extra_postargs, display = display)
|
||||||
|
+
|
||||||
except DistutilsExecError:
|
except DistutilsExecError:
|
||||||
msg = str(get_exception())
|
msg = str(get_exception())
|
||||||
raise CompileError(msg)
|
raise CompileError(msg)
|
||||||
|
Loading…
Reference in New Issue
Block a user