Set python via env

Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
epel9
Mauro Carvalho Chehab 7 years ago
parent 53f2cbce7a
commit 9c48b8c57a

@ -10,6 +10,7 @@ Group: User Interface/X Hardware Support
License: LGPLv2+ License: LGPLv2+
URL: http://zbar.sourceforge.net/ URL: http://zbar.sourceforge.net/
Source0: https://linuxtv.org/downloads/%{name}/%{name}-%{version}.tar.bz2 Source0: https://linuxtv.org/downloads/%{name}/%{name}-%{version}.tar.bz2
Patch0: zbar_set_python_via_env.patch
BuildRequires: autoconf automake libtool gettext-devel BuildRequires: autoconf automake libtool gettext-devel
@ -88,6 +89,7 @@ scanning widget.
%prep %prep
%setup -q %setup -q
%patch0
%build %build
autoreconf -vfi autoreconf -vfi

@ -0,0 +1,50 @@
From c750417b3e7c1dc55f2a50fb83fb3713e2f2dde4 Mon Sep 17 00:00:00 2001
From: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
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 <mchehab+samsung@kernel.org>
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
Loading…
Cancel
Save