Improve python3 compatibility for upstream test sources
authorAfif Elghraoui <afif@ghraoui.name>
Sat, 11 Jul 2015 08:01:40 +0000 (01:01 -0700)
committerAfif Elghraoui <afif@ghraoui.name>
Sat, 11 Jul 2015 08:01:40 +0000 (01:01 -0700)
debian/patches/improve-python3-compatibility.patch [new file with mode: 0644]
debian/patches/series

diff --git a/debian/patches/improve-python3-compatibility.patch b/debian/patches/improve-python3-compatibility.patch
new file mode 100644 (file)
index 0000000..e7ac5f8
--- /dev/null
@@ -0,0 +1,26 @@
+Description: Improve python3 compatibility for tests
+Author: Afif Elghraoui <afif@ghraoui.name>
+Forwarded: no
+Last-Update: 2015-07-11
+---
+--- python-pysam.orig/tests/TestUtils.py
++++ python-pysam/tests/TestUtils.py
+@@ -1,3 +1,5 @@
++from __future__ import absolute_import
++from __future__ import print_function
+ import sys
+ import os
+ import pysam
+@@ -68,9 +70,9 @@
+             l1 = sorted(l1[:-1].split("\t"))
+             l2 = sorted(l2[:-1].split("\t"))
+             if l1 != l2:
+-                print "mismatch in line %i" % n
+-                print l1
+-                print l2
++                print("mismatch in line %i" % n)
++                print(l1)
++                print(l2)
+                 return False
+         else:
+             return False
index 22c82d0e4a5827f259c9eb9022de34dbe112c45e..869d4afd72c718b2df5c04501b5edbdd2b09de9d 100644 (file)
@@ -2,3 +2,4 @@ change-htslib-statement-to-link-to-debian
 adding-include-hts-dirs
 correct-spelling-errors.patch
 ignore-htslib-dir.patch
+improve-python3-compatibility.patch