@@ -11,30 +11,6 @@ index ba88c733f..e4db40429 100644
11
11
except AssertionError:
12
12
msg = ("The current Numpy installation ({!r}) fails to "
13
13
"pass simple sanity checks. This can be caused for example "
14
- diff --git a/numpy/core/_dtype_ctypes.py b/numpy/core/_dtype_ctypes.py
15
- index 0852b1ef2..cf4dc6fb0 100644
16
- --- a/numpy/core/_dtype_ctypes.py
17
- +++ b/numpy/core/_dtype_ctypes.py
18
- @@ -22,7 +22,6 @@ Unfortunately, this fails because:
19
- * PEP3118 cannot represent unions, but both numpy and ctypes can
20
- * ctypes cannot handle big-endian structs with PEP3118 (bpo-32780)
21
- """
22
- - import _ctypes
23
- import ctypes
24
-
25
- import numpy as np
26
- diff --git a/numpy/core/_internal.py b/numpy/core/_internal.py
27
- index 1d3bb5584..202c63b90 100644
28
- --- a/numpy/core/_internal.py
29
- +++ b/numpy/core/_internal.py
30
- @@ -13,6 +13,7 @@ from numpy.compat import unicode
31
- from numpy.core.overrides import set_module
32
- from .multiarray import dtype, array, ndarray
33
- try:
34
- + import _ctypes
35
- import ctypes
36
- except ImportError:
37
- ctypes = None
38
14
diff --git a/numpy/core/getlimits.py b/numpy/core/getlimits.py
39
15
index 544b8b35f..799f669e6 100644
40
16
--- a/numpy/core/getlimits.py
@@ -746,19 +722,6 @@ index d1b029c18..2bdff3d6c 100644
746
722
747
723
retval = execute_legacy_ufunc_loop(ufunc, trivial_loop_ok,
748
724
op, dtypes, order,
749
- diff --git a/numpy/ctypeslib.py b/numpy/ctypeslib.py
750
- index 535ea768b..2ecf3a23b 100644
751
- --- a/numpy/ctypeslib.py
752
- +++ b/numpy/ctypeslib.py
753
- @@ -61,7 +61,7 @@ from numpy import (
754
- from numpy.core.multiarray import _flagdict, flagsobj
755
-
756
- try:
757
- - import ctypes
758
- + ctypes = None # Truffle: use the mock ctypes
759
- except ImportError:
760
- ctypes = None
761
-
762
725
diff --git a/numpy/distutils/ccompiler.py b/numpy/distutils/ccompiler.py
763
726
index 14451fa66..85e64cc6e 100644
764
727
--- a/numpy/distutils/ccompiler.py
@@ -806,18 +769,6 @@ index 9fc68a7aa..6c04f96c1 100644
806
769
}
807
770
}
808
771
809
- diff --git a/numpy/tests/test_ctypeslib.py b/numpy/tests/test_ctypeslib.py
810
- index 521208c36..b9fa4c3e1 100644
811
- --- a/numpy/tests/test_ctypeslib.py
812
- +++ b/numpy/tests/test_ctypeslib.py
813
- @@ -10,6 +10,7 @@ from numpy.distutils.misc_util import get_shared_lib_extension
814
- from numpy.testing import assert_, assert_array_equal, assert_raises, assert_equal
815
-
816
- try:
817
- + import _ctypes
818
- import ctypes
819
- except ImportError:
820
- ctypes = None
821
772
diff --git a/setup.py b/setup.py
822
773
index 8b2ded1f2..8a9295a27 100755
823
774
--- a/setup.py
0 commit comments