aboutsummaryrefslogtreecommitdiffstats
path: root/testing/mlt/switch-to-python3-by-default.patch
blob: b36508ce2f3afafceddb69e80e0fc52da83c7ac5 (plain)
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
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
From 12d4f46a957ab4eba155940b44bb31c35697da26 Mon Sep 17 00:00:00 2001
From: Dan Dennedy <dan@dennedy.org>
Date: Sat, 21 Sep 2019 18:29:51 -0700
Subject: [PATCH] switch to python3 by default
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

patch by Patrick Matthäi
---
 src/swig/python/build               | 6 +++---
 src/swig/python/codecs.py           | 2 +-
 src/swig/python/getimage.py         | 2 +-
 src/swig/python/play.py             | 2 +-
 src/swig/python/switcher.py         | 2 +-
 src/swig/python/test_animation.py   | 2 +-
 src/swig/python/waveforms.py        | 2 +-
 src/swig/python/webvfx_generator.py | 2 +-
 8 files changed, 10 insertions(+), 10 deletions(-)

diff --git a/src/swig/python/build b/src/swig/python/build
index db31e164d..c783dd295 100755
--- a/src/swig/python/build
+++ b/src/swig/python/build
@@ -8,12 +8,12 @@ then
 	exit 0
 fi
 
-path=`which python 2> /dev/null`
+path=`which python3 2> /dev/null`
 
 if [ $? = 0 ]
 then
 	# Change this as needed
-	export PYTHON_INCLUDE=`python -c "import sys;print(\"{}/include/python{}.{}\".format(sys.prefix,*sys.version_info))"`
+	export PYTHON_INCLUDE=`python3 -c "import sys;print(\"{}/include/python{}.{}\".format(sys.prefix,*sys.version_info))"`
 
 	[ ! -d "$PYTHON_INCLUDE" ] && echo python development missing && exit 1
 
@@ -26,7 +26,7 @@ then
 	${CXX} -fPIC -D_GNU_SOURCE ${CXXFLAGS} -c -I../.. -I$PYTHON_INCLUDE mlt_wrap.cxx || exit $?
 
 	# Create the module
-	${CXX} ${CXXFLAGS} -shared mlt_wrap.o -L../../mlt++ -lmlt++ -L../../framework -lmlt $(python-config --ldflags) -o _mlt.so || exit $?
+	${CXX} ${CXXFLAGS} -shared mlt_wrap.o -L../../mlt++ -lmlt++ -L../../framework -lmlt $(python3-config --ldflags) -o _mlt.so || exit $?
 else
 	echo Python not installed.
 	exit 1
diff --git a/src/swig/python/codecs.py b/src/swig/python/codecs.py
index 64f2815f9..03be93458 100755
--- a/src/swig/python/codecs.py
+++ b/src/swig/python/codecs.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env python3
 # -*- coding: utf-8 -*-
 
 # Import required modules
diff --git a/src/swig/python/getimage.py b/src/swig/python/getimage.py
index 51e042da6..abe7a9db5 100755
--- a/src/swig/python/getimage.py
+++ b/src/swig/python/getimage.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env python3
 # -*- coding: utf-8 -*-
 import mlt
 import sys
diff --git a/src/swig/python/play.py b/src/swig/python/play.py
index 13c34b160..69ef42e6a 100755
--- a/src/swig/python/play.py
+++ b/src/swig/python/play.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env python3
 # -*- coding: utf-8 -*-
 
 # Import required modules
diff --git a/src/swig/python/switcher.py b/src/swig/python/switcher.py
index d0994a561..e843e84fa 100755
--- a/src/swig/python/switcher.py
+++ b/src/swig/python/switcher.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env python3
 # -*- coding: utf-8 -*-
 
 # Import required modules
diff --git a/src/swig/python/test_animation.py b/src/swig/python/test_animation.py
index ef484abf7..c2960a7b9 100755
--- a/src/swig/python/test_animation.py
+++ b/src/swig/python/test_animation.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env python3
 # -*- coding: utf-8 -*-
 
 from __future__ import print_function
diff --git a/src/swig/python/waveforms.py b/src/swig/python/waveforms.py
index e39d0f27e..3f712ee84 100755
--- a/src/swig/python/waveforms.py
+++ b/src/swig/python/waveforms.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env python3
 # -*- coding: utf-8 -*-
 import mlt
 from PIL import Image
diff --git a/src/swig/python/webvfx_generator.py b/src/swig/python/webvfx_generator.py
index 26cb196a2..4b723356e 100755
--- a/src/swig/python/webvfx_generator.py
+++ b/src/swig/python/webvfx_generator.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env python3
 # -*- coding: utf-8 -*-
 
 # webvfx_generator.py