1
0
Fork 0
mirror of https://gitlab.alpinelinux.org/alpine/aports.git synced 2025-07-20 01:35:13 +03:00
aports/testing/mlt/switch-to-python3-by-default.patch
Natanael Copa c5f8982a54 testing/mlt: rebuild against python 3.8
replace python3 patch with upstream patch
2019-11-05 15:35:40 +00:00

118 lines
3.8 KiB
Diff

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