[med-svn] [Git][med-team/grabix][master] 6 commits: Use 2to3 to port to Python3

Andreas Tille gitlab at salsa.debian.org
Wed Sep 11 08:09:31 BST 2019



Andreas Tille pushed to branch master at Debian Med / grabix


Commits:
959d167e by Andreas Tille at 2019-09-10T14:51:56Z
Use 2to3 to port to Python3

- - - - -
31bb7457 by Andreas Tille at 2019-09-10T14:52:18Z
Build-Depends: s/python/python3/

- - - - -
16e27577 by Andreas Tille at 2019-09-10T14:52:45Z
debhelper-compat 12

- - - - -
348f11af by Andreas Tille at 2019-09-10T14:52:48Z
Standards-Version: 4.4.0

- - - - -
f5709f87 by Andreas Tille at 2019-09-10T14:57:36Z
Do not use quilt to fix files in debian/ dir

- - - - -
887d0cdc by Andreas Tille at 2019-09-11T07:08:42Z
Fix patch

- - - - -


6 changed files:

- debian/changelog
- − debian/compat
- debian/control
- + debian/patches/2to3.patch
- debian/patches/series
- debian/testdata/test.sh


Changes:

=====================================
debian/changelog
=====================================
@@ -1,3 +1,12 @@
+grabix (0.1.7-2) UNRELEASED; urgency=medium
+
+  * Use 2to3 to port to Python3
+    Closes: #936648
+  * debhelper-compat 12
+  * Standards-Version: 4.4.0
+
+ -- Andreas Tille <tille at debian.org>  Tue, 10 Sep 2019 16:50:14 +0200
+
 grabix (0.1.7-1) unstable; urgency=medium
 
   * Team upload.


=====================================
debian/compat deleted
=====================================
@@ -1 +0,0 @@
-11


=====================================
debian/control
=====================================
@@ -3,13 +3,13 @@ Maintainer: Debian Med Packaging Team <debian-med-packaging at lists.alioth.debian.
 Uploaders: Steffen Moeller <moeller at debian.org>
 Section: science
 Priority: optional
-Build-Depends: debhelper (>= 11~),
+Build-Depends: debhelper-compat (= 12),
                zlib1g-dev,
-               python,
+               python3,
                tabix,
                time,
                less
-Standards-Version: 4.2.1
+Standards-Version: 4.4.0
 Vcs-Browser: https://salsa.debian.org/med-team/grabix
 Vcs-Git: https://salsa.debian.org/med-team/grabix.git
 Homepage: https://github.com/arq5x/grabix


=====================================
debian/patches/2to3.patch
=====================================
@@ -0,0 +1,64 @@
+Description: Use 2to3 to port to Python3
+Bug-Debian: https://bugs.debian.org/936648
+Author: Andreas Tille <tille at debian.org>
+Last-Update: Tue, 10 Sep 2019 16:50:14 +0200
+
+--- a/test.sh
++++ b/test.sh
+@@ -4,11 +4,11 @@ FQ=test.cnt.gz
+ rm -f ${FQ}{,.gbi}
+ 
+ lines=500000
+-python tests/make-test-fastq.py $lines | bgzip -c > $FQ
++python3 tests/make-test-fastq.py $lines | bgzip -c > $FQ
+ echo "indexing"
+ time ./grabix index $FQ
+ echo "indexed"
+-python tests/test-fastq.py $FQ
++python3 tests/test-fastq.py $FQ
+ a=$(grabix grab test.cnt.gz $(($lines * 4)))
+ b=$(zless $FQ | tail -1)
+ if [[ "$a" != "$b" ]]; then
+--- a/tests/make-test-fastq.py
++++ b/tests/make-test-fastq.py
+@@ -2,8 +2,8 @@ import sys
+ n = int(sys.argv[1]) + 1
+ for i in range(1, n):
+     s = str(i) + "ACTG"
+-    print "@read_%i" % i
++    print("@read_%i" % i)
+     seq = "".join([s] * 20)[:100]
+-    print seq
+-    print "+"
+-    print seq
++    print(seq)
++    print("+")
++    print(seq)
+--- a/tests/test-fastq.py
++++ b/tests/test-fastq.py
+@@ -5,21 +5,21 @@ import gzip
+ f = sys.argv[1]
+ lines = ["EMPTY"] + [x.strip() for x in gzip.open(f).readlines()]
+ 
+-print "checking indexing at bounds:"
++print("checking indexing at bounds:")
+ 
+ def check(gzname, start, end=None):
+     run = subprocess.check_output
+     exp = lines[start:start+1] if end is None else lines[start:end + 1]
+     obs = run("grabix grab %s %d" % (gzname, start), shell=True) if end is None \
+             else run("grabix grab %s %d %d" % (gzname, start, end), shell=True)
+-    obs = [x.strip() for x in obs.strip().split("\n")]
++    obs = [x.strip() for x in obs.strip().split(b"\n")]
+     sys.stdout.write(".")
+     sys.stdout.flush()
+     assert exp == obs, (exp, obs)
+     if start % 4 == 1:
+-        assert obs[0][0] == "@"
++        assert obs[0][0] == "@".encode()[0]
+     else:
+-        assert obs[0][0] != "@"
++        assert obs[0][0] != "@".encode()[0]
+ 
+ for i in range(9990, 10010):
+     check(f, i)


=====================================
debian/patches/series
=====================================
@@ -3,3 +3,4 @@ Hardening.patch
 warnings.patch
 introduceLTO.patch
 fix_test.patch
+2to3.patch


=====================================
debian/testdata/test.sh
=====================================
@@ -4,11 +4,11 @@ FQ=test.cnt.gz
 rm -f ${FQ}{,.gbi}
 
 lines=500000
-python tests/make-test-fastq.py $lines | bgzip -c > $FQ
+python3 tests/make-test-fastq.py $lines | bgzip -c > $FQ
 echo "indexing"
 time grabix index $FQ
 echo "indexed"
-python tests/test-fastq.py $FQ
+python3 tests/test-fastq.py $FQ
 a=$(grabix grab test.cnt.gz $(($lines * 4)))
 b=$(zless $FQ | tail -1)
 if [ "$a" != "$b" ] ; then



View it on GitLab: https://salsa.debian.org/med-team/grabix/compare/d8aeefaa6b81ddc92047caa1782dcf385a5a4d37...887d0cdcb48582068e32b032ccb941a578c0cf2a

-- 
View it on GitLab: https://salsa.debian.org/med-team/grabix/compare/d8aeefaa6b81ddc92047caa1782dcf385a5a4d37...887d0cdcb48582068e32b032ccb941a578c0cf2a
You're receiving this email because of your account on salsa.debian.org.


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://alioth-lists.debian.net/pipermail/debian-med-commit/attachments/20190911/bef51a0f/attachment-0001.html>


More information about the debian-med-commit mailing list