Commit 70c9c8ed authored by Baruch Siach's avatar Baruch Siach Committed by Thomas Petazzoni
Browse files

lirc-tools: fix build with host python3

parent 4b85a6b3
Loading
Loading
Loading
Loading
+46 −0
Original line number Diff line number Diff line
From ae2e8cc85b6b4d2202e42d704dde8757ffd31da6 Mon Sep 17 00:00:00 2001
From: Alec Leamas <leamas.alec@gmail.com>
Date: Thu, 11 Dec 2014 04:44:49 +0100
Subject: [PATCH] tools: Make make_rel_symlink.py use python3.

Upstream patch:
http://sourceforge.net/p/lirc/git/ci/ae2e8cc85b6b4d2202e42d704dde8757ffd31da6/

Signed-off-by: Baruch Siach <baruch@tkos.co.il>
---
 tools/make_rel_symlink.py | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/tools/make_rel_symlink.py b/tools/make_rel_symlink.py
index 5c893056f379..896637ff93e0 100755
--- a/tools/make_rel_symlink.py
+++ b/tools/make_rel_symlink.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env python3
 
 import os
 import os.path
@@ -32,16 +32,16 @@ if sys.argv[1] == "-p":
     sys.argv = sys.argv[ 1:]
 
 if len( sys.argv ) != 3:
-    print USAGE
+    print(USAGE)
     sys.exit( 1 )
 
 if  os.path.isdir(  sys.argv[2] ):
-    print "Removing link target dir:" +  sys.argv[2]
+    print("Removing link target dir:" +  sys.argv[2])
     shutil.rmtree( sys.argv[2])
 
 link_path = relative_ln_s( sys.argv[1], sys.argv[2] )
 if just_print:
-    print link_path
+    print(link_path)
 else:
     os.chdir( os.path.dirname( sys.argv[2]))
     target = os.path.basename( sys.argv[2])
-- 
2.1.4
+28 −0
Original line number Diff line number Diff line
From c861eae83bae3116d330efb3c6061e2de4fdcbce Mon Sep 17 00:00:00 2001
From: Baruch Siach <baruch@tkos.co.il>
Date: Sun, 5 Apr 2015 22:26:12 +0300
Subject: [PATCH] tools: make_rel_symlink.py can also use python2

The make_rel_symlink.py script is compatible with both python2 and python3.
Don't hard code a requirement for python3.

Patch status: sent upstream

Signed-off-by: Baruch Siach <baruch@tkos.co.il>
---
 tools/make_rel_symlink.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/tools/make_rel_symlink.py b/tools/make_rel_symlink.py
index 896637ff93e0..ff0403a0397a 100755
--- a/tools/make_rel_symlink.py
+++ b/tools/make_rel_symlink.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python3
+#!/usr/bin/env python
 
 import os
 import os.path
-- 
2.1.4