diff --git a/zbar.spec b/zbar.spec index 05496b6..9521cc4 100644 --- a/zbar.spec +++ b/zbar.spec @@ -10,6 +10,7 @@ Group: User Interface/X Hardware Support License: LGPLv2+ URL: http://zbar.sourceforge.net/ Source0: https://linuxtv.org/downloads/%{name}/%{name}-%{version}.tar.bz2 +Patch0: zbar_set_python_via_env.patch BuildRequires: autoconf automake libtool gettext-devel @@ -88,6 +89,7 @@ scanning widget. %prep %setup -q +%patch0 %build autoreconf -vfi diff --git a/zbar_set_python_via_env.patch b/zbar_set_python_via_env.patch new file mode 100644 index 0000000..1809460 --- /dev/null +++ b/zbar_set_python_via_env.patch @@ -0,0 +1,50 @@ +From c750417b3e7c1dc55f2a50fb83fb3713e2f2dde4 Mon Sep 17 00:00:00 2001 +From: Mauro Carvalho Chehab +Date: Tue, 7 Aug 2018 15:02:11 -0300 +Subject: [PATCH] python: use env to get python's location + +Instead of hardcoding python at /usr/bin, use env to get its +path. + +Signed-off-by: Mauro Carvalho Chehab + +diff --git a/python/examples/processor.py b/python/examples/processor.py +index 52996d16cf0d..1114c0bf4a3c 100644 +--- a/python/examples/processor.py ++++ b/python/examples/processor.py +@@ -1,4 +1,4 @@ +-#!/usr/bin/python ++#!/usr/bin/env python + from sys import argv + import zbar + +diff --git a/python/examples/read_one.py b/python/examples/read_one.py +index 426b9994155e..3e41c438984c 100644 +--- a/python/examples/read_one.py ++++ b/python/examples/read_one.py +@@ -1,4 +1,4 @@ +-#!/usr/bin/python ++#!/usr/bin/env python + from sys import argv + import zbar + +diff --git a/python/examples/scan_image.py b/python/examples/scan_image.py +index 2a80759da7b5..8c288631e1fc 100644 +--- a/python/examples/scan_image.py ++++ b/python/examples/scan_image.py +@@ -1,4 +1,4 @@ +-#!/usr/bin/python ++#!/usr/bin/env python + from sys import argv + import zbar + import Image +diff --git a/python/test/test_zbar.py b/python/test/test_zbar.py +index dbe180324378..78d4f041ed9f 100755 +--- a/python/test/test_zbar.py ++++ b/python/test/test_zbar.py +@@ -1,4 +1,4 @@ +-#!/usr/bin/python ++#!/usr/bin/env python + import sys, os, re + import unittest as ut + import zbar