Package: python-numpy / 1:1.16.2-1

0005-Dont-fail-if-we-cant-import-mingw32.patch Patch series | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
From: Sandro Tosi <morph@debian.org>
Date: Sun, 10 Jan 2016 22:16:03 +0000
Subject: Dont fail if we cant import mingw32

This is required for the Debian version helper, which reads core.setup_common and
executes it, without using all the Python import machinery. This way we will
skip the requirement to have the whole numpy module working while we only care
(at this point) for the API/ABI versions.
---
 numpy/core/setup_common.py | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/numpy/core/setup_common.py b/numpy/core/setup_common.py
index bd093c5..7b74828 100644
--- a/numpy/core/setup_common.py
+++ b/numpy/core/setup_common.py
@@ -6,7 +6,10 @@ import warnings
 import copy
 import binascii
 
-from numpy.distutils.misc_util import mingw32
+try:
+    from numpy.distutils.misc_util import mingw32
+except:
+    mingw32 = lambda *args, **kwargs: None
 
 
 #-------------------