Skip to content
Commits on Source (3)
bowtie (1.2.3+dfsg-2) unstable; urgency=medium
* Use python3 in (Build-)Depends in d/control
* Use 2to3 to port scripts to python3, Closes: #936232
-- Alexandre Mestiashvili <mestia@debian.org> Thu, 05 Sep 2019 17:49:44 +0200
bowtie (1.2.3+dfsg-1) unstable; urgency=medium
[ Andreas Tille ]
......
......@@ -10,7 +10,7 @@ Priority: optional
Build-Depends: debhelper-compat (= 12),
help2man,
libtbb-dev,
python,
python3,
seqan-dev,
zlib1g-dev
Standards-Version: 4.4.0
......@@ -22,7 +22,7 @@ Package: bowtie
Architecture: alpha any-amd64 arm64 mips64el ppc64 ppc64el s390x sparc64
Depends: ${shlibs:Depends},
${misc:Depends},
python
python3
Suggests: bowtie-examples
Description: Ultrafast memory-efficient short read aligner
This package addresses the problem to interpret the results from the
......
Description: Update python scripts to use python3
From: Alex Mestiashvili <mestia@debian.org>
--- bowtie.orig/bowtie
+++ bowtie/bowtie
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/python3
"""
Copyright 2014, Ben Langmead <langmea@cs.jhu.edu>
--- bowtie.orig/bowtie-build
+++ bowtie/bowtie-build
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/python3
"""
Copyright 2014, Ben Langmead <langmea@cs.jhu.edu>
--- bowtie.orig/bowtie-inspect
+++ bowtie/bowtie-inspect
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/python3
"""
Copyright 2014, Ben Langmead <langmea@cs.jhu.edu>
--- bowtie.orig/scripts/test/btdata.py
+++ bowtie/scripts/test/btdata.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/python3
"""
Note: This would look so much better replaced by XML or at least JSON. But
is not worth to do it for now.
@@ -6,7 +6,7 @@
import os
import gzip
-import urllib2
+import urllib.request, urllib.error, urllib.parse
import logging
@@ -66,14 +66,14 @@
def init_data(self):
""" Try and init the data we need.
"""
- for genome,gdata in self.genomes.iteritems():
+ for genome,gdata in self.genomes.items():
gn_path = os.path.join(self.data_dir_path,genome)
gn_fasta = os.path.join(gn_path,gdata['ref_name'])
if not os.path.exists(gn_fasta):
self._get_genome(genome)
self._build_genome(genome)
- for genome,gdata in self.joint_genomes.iteritems():
+ for genome,gdata in self.joint_genomes.items():
gn_path = os.path.join(self.data_dir_path,genome)
gn_fasta = os.path.join(gn_path,gdata['ref_name'])
if not os.path.exists(gn_fasta):
@@ -103,7 +103,7 @@
try:
f = open(fname,'wb')
- u = urllib2.urlopen(uri)
+ u = urllib.request.urlopen(uri)
f.write(u.read())
except:
f.close()
--- bowtie.orig/scripts/test/btface.py
+++ bowtie/scripts/test/btface.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/python3
import os
import logging
--- bowtie.orig/scripts/test/build_big.py
+++ bowtie/scripts/test/build_big.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/python3
import sys
import os
@@ -22,8 +22,8 @@
if len(sys.argv) > 5:
num_refs = int(sys.argv[5])
with open(tmp_fasta, 'w') as fh:
- for i in xrange(num_refs):
+ for i in range(num_refs):
gen_genome(fh, 'ref%d' % i, tot_len // num_refs)
ret = os.system('%s %s %s' % (bt2_build_exe, tmp_fasta, tmp_idx))
- print >> sys.stderr, "Exitlevel: %d" % ret
+ print("Exitlevel: %d" % ret, file=sys.stderr)
exit(ret)
--- bowtie.orig/scripts/test/large_idx.py
+++ bowtie/scripts/test/large_idx.py
@@ -1,8 +1,8 @@
-#!/usr/bin/env python
+#!/usr/bin/python3
import os
import gzip
-import urllib2
+import urllib.request, urllib.error, urllib.parse
import inspect
import unittest
import logging
@@ -69,7 +69,7 @@
def get_suite():
tests = ['test_human','test_mouse','test_large_index']
- return unittest.TestSuite(map(TestLargeIndex,tests))
+ return unittest.TestSuite(list(map(TestLargeIndex,tests)))
--- bowtie.orig/scripts/test/dataface.py
+++ bowtie/scripts/test/dataface.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/python3
import os
import logging
@@ -78,4 +78,4 @@
-
\ No newline at end of file
+
2to3.patch
strip_html5shiv.patch
spelling.patch
no_hash_style_both_for_mips.patch
......