-
Notifications
You must be signed in to change notification settings - Fork 0
/
shiboken-1.2.4-python3.patch
60 lines (52 loc) · 2.31 KB
/
shiboken-1.2.4-python3.patch
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
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
--- a/cmake/Modules/FindPython3Libs.cmake 2014-04-22 23:42:48.000000000 +0800
+++ b/cmake/Modules/FindPython3Libs.cmake 2015-09-21 15:17:27.014598399 +0800
@@ -27,7 +27,7 @@
# Search for the python framework on Apple.
# CMAKE_FIND_FRAMEWORKS(Python)
-FOREACH(_CURRENT_VERSION 3.4 3.3 3.2 3.1 3.0)
+FOREACH(_CURRENT_VERSION 3.9 3.8 3.7 3.6 3.5 3.4 3.3 3.2 3.1 3.0)
IF(_CURRENT_VERSION GREATER 3.1)
SET(_32FLAGS "m" "u" "mu" "dm" "du" "dmu" "")
ELSE()
--- Shiboken-1.2.4/tests/minimalbinding/typedef_test.py (original)
+++ Shiboken-1.2.4/tests/minimalbinding/typedef_test.py (refactored)
@@ -30,7 +30,7 @@
try:
import numpy as np
-except ImportError, e:
+except ImportError as e:
np = None
@@ -46,7 +46,7 @@
def test_arrayFuncInt(self):
none = ()
- full = range(self.the_size)
+ full = list(range(self.the_size))
self.assertTrue(arrayFuncInt(none), "None is empty, arrayFuncInt should return true")
self.assertFalse(arrayFuncInt(full), "Full is NOT empty, arrayFuncInt should return false")
@@ -76,7 +76,7 @@
def test_arrayFunc(self):
none = ()
- full = range(self.the_size)
+ full = list(range(self.the_size))
self.assertTrue(arrayFunc(none), "None is empty, arrayFunc should return true")
self.assertFalse(arrayFunc(full), "Full is NOT empty, arrayFunc should return false")
--- Shiboken-1.2.4/tests/samplebinding/overflow_test.py (original)
+++ Shiboken-1.2.4/tests/samplebinding/overflow_test.py (refactored)
@@ -45,7 +45,7 @@
'''C++ function receives an long long argument and raise OverflowError if the value is negative.'''
val = 100
self.assertEqual(doubleLongLong(val), 2 * val)
- val = long(100)
+ val = int(100)
self.assertEqual(doubleLongLong(val), 2 * val)
val = (2 << 64) + 1
self.assertRaises(OverflowError, doubleLongLong, val)
@@ -54,7 +54,7 @@
'''C++ function receives an unsigned long long argument and raise OverflowError if the value is negative.'''
val = 100
self.assertEqual(doubleUnsignedLongLong(val), 2 * val)
- val = long(100)
+ val = int(100)
self.assertEqual(doubleUnsignedLongLong(val), 2 * val)
val *= -1
self.assertRaises(OverflowError, doubleUnsignedLongLong, val)