Skip to content
Commits on Source (6)
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@debian.org> Tue, 10 Sep 2019 16:50:14 +0200
grabix (0.1.7-1) unstable; urgency=medium
* Team upload.
......
......@@ -3,13 +3,13 @@ Maintainer: Debian Med Packaging Team <debian-med-packaging@lists.alioth.debian.
Uploaders: Steffen Moeller <moeller@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
......
Description: Use 2to3 to port to Python3
Bug-Debian: https://bugs.debian.org/936648
Author: Andreas Tille <tille@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)
......@@ -3,3 +3,4 @@ Hardening.patch
warnings.patch
introduceLTO.patch
fix_test.patch
2to3.patch
......@@ -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
......