[med-svn] [Git][med-team/bowtie][master] 3 commits: Use python3 in (Build-)Depends in d/control

Alexandre Mestiashvili gitlab at salsa.debian.org
Fri Sep 6 09:58:11 BST 2019



Alexandre Mestiashvili pushed to branch master at Debian Med / bowtie


Commits:
b2cfaea2 by Alexandre Mestiashvili at 2019-09-05T15:08:16Z
Use python3 in (Build-)Depends in d/control

- - - - -
044c5506 by Alexandre Mestiashvili at 2019-09-05T15:49:02Z
Add 2to3.patch for python scripts

- - - - -
2bba88ac by Alexandre Mestiashvili at 2019-09-05T15:52:37Z
Update changelog

Gbp-Dch: Ignore

- - - - -


4 changed files:

- debian/changelog
- debian/control
- + debian/patches/2to3.patch
- debian/patches/series


Changes:

=====================================
debian/changelog
=====================================
@@ -1,3 +1,10 @@
+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 at debian.org>  Thu, 05 Sep 2019 17:49:44 +0200
+
 bowtie (1.2.3+dfsg-1) unstable; urgency=medium
 
   [ Andreas Tille ]


=====================================
debian/control
=====================================
@@ -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


=====================================
debian/patches/2to3.patch
=====================================
@@ -0,0 +1,133 @@
+Description: Update python scripts to use python3
+From: Alex Mestiashvili <mestia at debian.org>
+--- bowtie.orig/bowtie
++++ bowtie/bowtie
+@@ -1,4 +1,4 @@
+-#!/usr/bin/env python
++#!/usr/bin/python3
+ 
+ """
+  Copyright 2014, Ben Langmead <langmea at 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 at 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 at 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
++    


=====================================
debian/patches/series
=====================================
@@ -1,3 +1,4 @@
+2to3.patch
 strip_html5shiv.patch
 spelling.patch
 no_hash_style_both_for_mips.patch



View it on GitLab: https://salsa.debian.org/med-team/bowtie/compare/3b76ffd065a5c4c6a4c95fd179eb13abd9676632...2bba88ace98af705757e6975bb8e4a386bd5af14

-- 
View it on GitLab: https://salsa.debian.org/med-team/bowtie/compare/3b76ffd065a5c4c6a4c95fd179eb13abd9676632...2bba88ace98af705757e6975bb8e4a386bd5af14
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/20190906/e2fbe433/attachment-0001.html>


More information about the debian-med-commit mailing list