[med-svn] [Git][med-team/kmer][master] 4 commits: Make sure simple names for dynamic libraries are made available

Andreas Tille gitlab at salsa.debian.org
Thu Dec 19 19:30:42 GMT 2019



Andreas Tille pushed to branch master at Debian Med / kmer


Commits:
57c585a2 by Andreas Tille at 2019-12-19T12:50:51Z
Make sure simple names for dynamic libraries are made available

- - - - -
d10f0318 by Andreas Tille at 2019-12-19T14:37:05Z
Some more fixes.

- - - - -
9d3a3aa8 by Andreas Tille at 2019-12-19T16:12:24Z
Finally found some remaining Python2 call inside Perl script

- - - - -
ce992860 by Andreas Tille at 2019-12-19T19:30:21Z
There is no file class in Python3

- - - - -


3 changed files:

- debian/changelog
- debian/patches/2to3.patch
- debian/rules


Changes:

=====================================
debian/changelog
=====================================
@@ -14,6 +14,7 @@ kmer (0~20150903+r2013-7) UNRELEASED; urgency=medium
     lines.
   * Remove obsolete field Name from debian/upstream/metadata (already
     present in machine-readable debian/copyright).
+  TODO: Tests are failing
 
  -- Andreas Tille <tille at debian.org>  Thu, 19 Dec 2019 10:43:09 +0100
 


=====================================
debian/patches/2to3.patch
=====================================
@@ -25,25 +25,31 @@ Last-Update: Thu, 19 Dec 2019 10:43:09 +0100
  
  """
  The environmental variable "PYTHONPATH" is a colon separated list
-@@ -32,7 +32,7 @@ STDERR=sys.stderr
- STDOUT=sys.stdout
+@@ -28,12 +28,9 @@ import fillIntraRunGaps
  
+ #import dedashMatches
+ 
+-STDERR=sys.stderr
+-STDOUT=sys.stdout
+-
  def die(message):
 -    print >>STDERR, message
-+    print(message, file=STDERR)
-     os.exit(1)
+-    os.exit(1)
++    print(message, file=sys.stderr)
++    sys.exit(1)
  
  def cvm(f,x,y):
-@@ -58,7 +58,7 @@ class GlobalParam:
+     # A cvm variant (flag ? y : x) = (x,y)[f]
+@@ -58,7 +55,7 @@ class GlobalParam:
      
  
  def usage (*_):
 -    print >>STDERR, "Usage: atacdriver.py matchFilePrefix"
-+    print("Usage: atacdriver.py matchFilePrefix", file=STDERR)
++    print("Usage: atacdriver.py matchFilePrefix", file=sys.stderr)
  # end def
  
  def filterByMatchLength( inpfile, outfile, minimum_length):
-@@ -69,7 +69,7 @@ def filterByMatchLength( inpfile, outfil
+@@ -69,7 +66,7 @@ def filterByMatchLength( inpfile, outfil
              FM = MatchRecord.MatchRecord(line)
              if (FM.x_length >= minimum_length and
                  FM.y_length >= minimum_length ):
@@ -52,7 +58,7 @@ Last-Update: Thu, 19 Dec 2019 10:43:09 +0100
              # end if
          # end if
      # end for
-@@ -90,7 +90,7 @@ def onlyKeepLongRuns ( inpfile, outname,
+@@ -90,7 +87,7 @@ def onlyKeepLongRuns ( inpfile, outname,
              SL = FM.x_length
              if FL != None and FL.runid != FM.runid :
                  for x in store:
@@ -61,7 +67,7 @@ Last-Update: Thu, 19 Dec 2019 10:43:09 +0100
                  # end for
                  store = []
                  lenInMatches = SL
-@@ -102,10 +102,10 @@ def onlyKeepLongRuns ( inpfile, outname,
+@@ -102,10 +99,10 @@ def onlyKeepLongRuns ( inpfile, outname,
                  store.append(FM)
              else:
                  for x in store:
@@ -74,7 +80,7 @@ Last-Update: Thu, 19 Dec 2019 10:43:09 +0100
              # end if
              FL = FM
          # end if
-@@ -142,10 +142,10 @@ def coalesceMatches ( inpfile, outfile,
+@@ -142,10 +139,10 @@ def coalesceMatches ( inpfile, outfile,
              assert(py >= 0)
              assert(ny >= 0)
              if (not (not needs_to_share_diagonal or nx == ny)):
@@ -82,14 +88,14 @@ Last-Update: Thu, 19 Dec 2019 10:43:09 +0100
 -                print >>STDERR, str(curF)
 -                print >>STDERR, 'needs_to_share_diagonal=' + str(needs_to_share_diagonal)
 -                print >>STDERR, 'nx=' + str(nx) + '  ny=' + str(ny)
-+                print('Bombed on:', file=STDERR)
-+                print(str(curF), file=STDERR)
-+                print('needs_to_share_diagonal=' + str(needs_to_share_diagonal), file=STDERR)
-+                print('nx=' + str(nx) + '  ny=' + str(ny), file=STDERR)
++                print('Bombed on:', file=sys.stderr)
++                print(str(curF), file=sys.stderr)
++                print('needs_to_share_diagonal=' + str(needs_to_share_diagonal), file=sys.stderr)
++                print('nx=' + str(nx) + '  ny=' + str(ny), file=sys.stderr)
              # end if
              assert((hghHitPX == None or (not needs_to_share_diagonal) or nx == ny))
              forward = (curF.x_orientation == curF.y_orientation)
-@@ -182,7 +182,7 @@ def coalesceMatches ( inpfile, outfile,
+@@ -182,7 +179,7 @@ def coalesceMatches ( inpfile, outfile,
                      firstF.y_start = lowHitPY
                      firstF.x_length = hghHitPX - lowHitPX
                      firstF.y_length = hghHitPY - lowHitPY
@@ -98,7 +104,7 @@ Last-Update: Thu, 19 Dec 2019 10:43:09 +0100
                  # end if
                  firstF = curF
                  lowHitPX = lowMerPX
-@@ -209,7 +209,7 @@ def coalesceMatches ( inpfile, outfile,
+@@ -209,7 +206,7 @@ def coalesceMatches ( inpfile, outfile,
          firstF.y_start = lowHitPY
          firstF.x_length = hghHitPX - lowHitPX
          firstF.y_length = hghHitPY - lowHitPY
@@ -107,7 +113,7 @@ Last-Update: Thu, 19 Dec 2019 10:43:09 +0100
  
      return
  # end def
-@@ -243,12 +243,12 @@ def boxRecovery( inpfile, rawfile, outna
+@@ -243,12 +240,12 @@ def boxRecovery( inpfile, rawfile, outna
                      if( rawline[0] == 'M'):
                          rawMatch = MatchRecord.MatchRecord(rawline)
                          if(rawMatch.sameAs(rightMatch)):
@@ -122,7 +128,7 @@ Last-Update: Thu, 19 Dec 2019 10:43:09 +0100
                              # end if
                          # end if
                      # end if
-@@ -260,7 +260,7 @@ def boxRecovery( inpfile, rawfile, outna
+@@ -260,7 +257,7 @@ def boxRecovery( inpfile, rawfile, outna
                      if( rawline[0] == 'M'):
                          rawMatch = MatchRecord.MatchRecord(rawline)
                          if(rawMatch.sameAs(rightMatch)):
@@ -131,16 +137,16 @@ Last-Update: Thu, 19 Dec 2019 10:43:09 +0100
                              break
                          else: 
                              # print >>STDERR, "Discard rawMatch=", rawMatch
-@@ -281,7 +281,7 @@ def boxRecovery( inpfile, rawfile, outna
+@@ -281,7 +278,7 @@ def boxRecovery( inpfile, rawfile, outna
  class AtacDriver(AtacFile.AtacFile):
      def runOld(self):
          self.globals['atacAlgorithmVersion'] = str(17)
 -        print >>STDERR, "runName = %s\n" % self.runName
-+        print("runName = %s\n" % self.runName, file=STDERR)
++        print("runName = %s\n" % self.runName, file=sys.stderr)
  
          # The ATAC globals used by this script:
          opt_t = int(self.globals['globalMatchMinSize'])
-@@ -295,7 +295,7 @@ class AtacDriver(AtacFile.AtacFile):
+@@ -295,7 +292,7 @@ class AtacDriver(AtacFile.AtacFile):
          assemblyFile2 = self.globals['assemblyFile2']
  
          boxRecoveryOn = 0  # Deprecated for same species comparisons 2003/09/09.
@@ -149,7 +155,7 @@ Last-Update: Thu, 19 Dec 2019 10:43:09 +0100
              boxRecoveryOn = int(self.globals['boxRecoveryOn'])
              
          t0 = time.time()
-@@ -309,24 +309,24 @@ class AtacDriver(AtacFile.AtacFile):
+@@ -309,24 +306,24 @@ class AtacDriver(AtacFile.AtacFile):
          redo = 0
          keep = 0
          step = 0
@@ -162,9 +168,9 @@ Last-Update: Thu, 19 Dec 2019 10:43:09 +0100
 -        print >>STDERR, 'Keep step=' + str(keep)
 -        print >>STDERR, 'At step=' + str(step)
 -        print >>STDERR, 'Time elapsed=' + str(time.time()-t0)
-+        print('Keep step=' + str(keep), file=STDERR)
-+        print('At step=' + str(step), file=STDERR)
-+        print('Time elapsed=' + str(time.time()-t0), file=STDERR)
++        print('Keep step=' + str(keep), file=sys.stderr)
++        print('At step=' + str(step), file=sys.stderr)
++        print('Time elapsed=' + str(time.time()-t0), file=sys.stderr)
  
          outprefix = self.runName
  
@@ -172,83 +178,83 @@ Last-Update: Thu, 19 Dec 2019 10:43:09 +0100
 -        print >>STDERR, 'At uniqueFilter, step=' + str(step)
 -        print >>STDERR, 'Time elapsed=' + str(time.time()-t0)
 -        if (redo or ((keep < step) and not self.globals.has_key(ckpName))):
-+        print('At uniqueFilter, step=' + str(step), file=STDERR)
-+        print('Time elapsed=' + str(time.time()-t0), file=STDERR)
++        print('At uniqueFilter, step=' + str(step), file=sys.stderr)
++        print('Time elapsed=' + str(time.time()-t0), file=sys.stderr)
 +        if (redo or ((keep < step) and ckpName not in self.globals)):
              redo = 1
 -            if(not(self.globals.has_key('uniqueFilterOn') and self.globals['uniqueFilterOn']=="0")):
 -                print >>STDERR, 'Running UniqueFilter'
 +            if(not('uniqueFilterOn' in self.globals and self.globals['uniqueFilterOn']=="0")):
-+                print('Running UniqueFilter', file=STDERR)
++                print('Running UniqueFilter', file=sys.stderr)
                  outfile = MyFile.myfile()
                  UniqueFilter.main( self.matches, outfile)
                  self.matches = outfile
-@@ -334,11 +334,11 @@ class AtacDriver(AtacFile.AtacFile):
+@@ -334,11 +331,11 @@ class AtacDriver(AtacFile.AtacFile):
                  self.checkpoint(outprefix)
  
          step += 1
 -        print >>STDERR, 'At filterByMatchLength, step=' + str(step)
 -        print >>STDERR, 'Time elapsed=' + str(time.time()-t0)
 -        if (redo or ((keep < step) and not self.globals.has_key(ckpName))):
-+        print('At filterByMatchLength, step=' + str(step), file=STDERR)
-+        print('Time elapsed=' + str(time.time()-t0), file=STDERR)
++        print('At filterByMatchLength, step=' + str(step), file=sys.stderr)
++        print('Time elapsed=' + str(time.time()-t0), file=sys.stderr)
 +        if (redo or ((keep < step) and ckpName not in self.globals)):
              redo = 1
 -            print >>STDERR, 'Running filterByMatchLength'
-+            print('Running filterByMatchLength', file=STDERR)
++            print('Running filterByMatchLength', file=sys.stderr)
              outfile = MyFile.myfile()
              filterByMatchLength( self.matches, outfile, opt_t)
              self.matches = outfile
-@@ -346,15 +346,15 @@ class AtacDriver(AtacFile.AtacFile):
+@@ -346,15 +343,15 @@ class AtacDriver(AtacFile.AtacFile):
              self.checkpoint(outprefix)
  
          step += 1
 -        print >>STDERR, 'At trimMatchOverlaps, step=' + str(step)
 -        print >>STDERR, 'Time elapsed=' + str(time.time()-t0)
 -        if (redo or ((keep < step) and not self.globals.has_key(ckpName))):
-+        print('At trimMatchOverlaps, step=' + str(step), file=STDERR)
-+        print('Time elapsed=' + str(time.time()-t0), file=STDERR)
++        print('At trimMatchOverlaps, step=' + str(step), file=sys.stderr)
++        print('Time elapsed=' + str(time.time()-t0), file=sys.stderr)
 +        if (redo or ((keep < step) and ckpName not in self.globals)):
              redo = 1
 -            print >>STDERR, "Start trimming for bp one-to-one-ness"
-+            print("Start trimming for bp one-to-one-ness", file=STDERR)
++            print("Start trimming for bp one-to-one-ness", file=sys.stderr)
              tempdata = MyFile.myfile()
              TrimMatchOverlaps.trimMatchOverlapsInBoth(self.matches,tempdata,'u')
              self.matches = tempdata
 -            print >>STDERR, "Finished trimming for bp one-to-one-ness"
-+            print("Finished trimming for bp one-to-one-ness", file=STDERR)
++            print("Finished trimming for bp one-to-one-ness", file=sys.stderr)
              outprefix += '.trim'
              self.checkpoint(outprefix)
  
-@@ -363,11 +363,11 @@ class AtacDriver(AtacFile.AtacFile):
+@@ -363,11 +360,11 @@ class AtacDriver(AtacFile.AtacFile):
              rawfile = self.matches
  
          step += 1
 -        print >>STDERR, 'At formPerfectRuns, step=' + str(step)
 -        print >>STDERR, 'Time elapsed=' + str(time.time()-t0)
 -        if (redo or ((keep < step) and not self.globals.has_key(ckpName))):
-+        print('At formPerfectRuns, step=' + str(step), file=STDERR)
-+        print('Time elapsed=' + str(time.time()-t0), file=STDERR)
++        print('At formPerfectRuns, step=' + str(step), file=sys.stderr)
++        print('Time elapsed=' + str(time.time()-t0), file=sys.stderr)
 +        if (redo or ((keep < step) and ckpName not in self.globals)):
              redo = 1
 -            print >>STDERR, 'from ' + outprefix + ' making ' + outprefix + '.p6'
-+            print('from ' + outprefix + ' making ' + outprefix + '.p6', file=STDERR)
++            print('from ' + outprefix + ' making ' + outprefix + '.p6', file=sys.stderr)
              tempdata = PerfectRuns.formPerfectRuns(self.matches,
                                                     MatchRecord.sortInXorderAP,
                                                     MatchRecord.sortInYorderAP,
-@@ -378,22 +378,22 @@ class AtacDriver(AtacFile.AtacFile):
+@@ -378,22 +375,22 @@ class AtacDriver(AtacFile.AtacFile):
          # end if
  
          step += 1
 -        print >>STDERR, 'At onlyKeepLongRuns, step=' + str(step)
 -        print >>STDERR, 'Time elapsed=' + str(time.time()-t0)
 -        if (redo or ((keep < step) and not self.globals.has_key(ckpName))):
-+        print('At onlyKeepLongRuns, step=' + str(step), file=STDERR)
-+        print('Time elapsed=' + str(time.time()-t0), file=STDERR)
++        print('At onlyKeepLongRuns, step=' + str(step), file=sys.stderr)
++        print('Time elapsed=' + str(time.time()-t0), file=sys.stderr)
 +        if (redo or ((keep < step) and ckpName not in self.globals)):
              redo = 1
 -            print >>STDERR, 'from ' + outprefix + ' making ' + outprefix + '.l' + str(opt_l)
-+            print('from ' + outprefix + ' making ' + outprefix + '.l' + str(opt_l), file=STDERR)
++            print('from ' + outprefix + ' making ' + outprefix + '.l' + str(opt_l), file=sys.stderr)
              tempdata = onlyKeepLongRuns( self.matches, outprefix, opt_l)
              self.matches = tempdata
              outprefix += '.l' + str(opt_l)
@@ -258,39 +264,39 @@ Last-Update: Thu, 19 Dec 2019 10:43:09 +0100
 -        print >>STDERR, 'At formPerfectRuns, step=' + str(step) 
 -        print >>STDERR, 'Time elapsed=' + str(time.time()-t0)
 -        if (redo or ((keep < step) and not self.globals.has_key(ckpName))):
-+        print('At formPerfectRuns, step=' + str(step), file=STDERR) 
-+        print('Time elapsed=' + str(time.time()-t0), file=STDERR)
++        print('At formPerfectRuns, step=' + str(step), file=sys.stderr) 
++        print('Time elapsed=' + str(time.time()-t0), file=sys.stderr)
 +        if (redo or ((keep < step) and ckpName not in self.globals)):
              redo = 1
 -            print >>STDERR, 'Heal the perfect runs'
-+            print('Heal the perfect runs', file=STDERR)
++            print('Heal the perfect runs', file=sys.stderr)
              tempdata = PerfectRuns.formPerfectRuns(self.matches,
                                         MatchRecord.sortInYorderAP,
                                         MatchRecord.sortInXorderAP, maxdiff, 'r')
-@@ -405,16 +405,16 @@ class AtacDriver(AtacFile.AtacFile):
+@@ -405,16 +402,16 @@ class AtacDriver(AtacFile.AtacFile):
  
              # This is a box recovery step.
              step += 1
 -            print >>STDERR, 'At boxRecovery, step=' + str(step) 
 -            print >>STDERR, 'Time elapsed=' + str(time.time()-t0)
 -            if (redo or ((keep < step) and not self.globals.has_key(ckpName))):
-+            print('At boxRecovery, step=' + str(step), file=STDERR) 
-+            print('Time elapsed=' + str(time.time()-t0), file=STDERR)
++            print('At boxRecovery, step=' + str(step), file=sys.stderr) 
++            print('Time elapsed=' + str(time.time()-t0), file=sys.stderr)
 +            if (redo or ((keep < step) and ckpName not in self.globals)):
                  redo = 1
 -                print >>STDERR, 'from ' + outprefix + ' making ' + outprefix + '.br'
 -                print >>STDERR, "Make sorted raw matches"
-+                print('from ' + outprefix + ' making ' + outprefix + '.br', file=STDERR)
-+                print("Make sorted raw matches", file=STDERR)
++                print('from ' + outprefix + ' making ' + outprefix + '.br', file=sys.stderr)
++                print("Make sorted raw matches", file=sys.stderr)
                  outfile = MyFile.myfile()
                  MatchRecord.sortInXorderAP( rawfile, outfile)
                  rawfile = outfile
 -                print >>STDERR, "perform box recovery"
-+                print("perform box recovery", file=STDERR)
++                print("perform box recovery", file=sys.stderr)
                  tempdata = boxRecovery( self.matches, rawfile, outprefix)
                  self.matches = tempdata
                  outprefix += '.br'
-@@ -422,12 +422,12 @@ class AtacDriver(AtacFile.AtacFile):
+@@ -422,12 +419,12 @@ class AtacDriver(AtacFile.AtacFile):
              # end if
  
              step += 1
@@ -298,58 +304,58 @@ Last-Update: Thu, 19 Dec 2019 10:43:09 +0100
 -            print >>STDERR, 'Time elapsed=' + str(time.time()-t0)
 -            if (redo or ( (keep < step) and not self.globals.has_key(ckpName))):
 -                print >>STDERR, "form perfect runs"
-+            print('At formPerfectRuns, step=' + str(step), file=STDERR)
-+            print('Time elapsed=' + str(time.time()-t0), file=STDERR)
++            print('At formPerfectRuns, step=' + str(step), file=sys.stderr)
++            print('Time elapsed=' + str(time.time()-t0), file=sys.stderr)
 +            if (redo or ( (keep < step) and ckpName not in self.globals)):
-+                print("form perfect runs", file=STDERR)
++                print("form perfect runs", file=sys.stderr)
                  redo = 1
 -                print >>STDERR, 'from ' + outprefix + ' to ' + outprefix + '.p6'
-+                print('from ' + outprefix + ' to ' + outprefix + '.p6', file=STDERR)
++                print('from ' + outprefix + ' to ' + outprefix + '.p6', file=sys.stderr)
                  tempdata = PerfectRuns.formPerfectRuns(self.matches,
                                         MatchRecord.sortInXorderAP,
                                         MatchRecord.sortInYorderAP, maxdiff, 'r')
-@@ -436,11 +436,11 @@ class AtacDriver(AtacFile.AtacFile):
+@@ -436,11 +433,11 @@ class AtacDriver(AtacFile.AtacFile):
                  self.checkpoint(outprefix)
  
          step += 1
 -        print >>STDERR, 'At squeezeIntraRunGaps, step=' + str(step)
 -        print >>STDERR, 'Time elapsed=' + str(time.time()-t0)
 -        if (redo or ((keep < step) and not self.globals.has_key(ckpName))):
-+        print('At squeezeIntraRunGaps, step=' + str(step), file=STDERR)
-+        print('Time elapsed=' + str(time.time()-t0), file=STDERR)
++        print('At squeezeIntraRunGaps, step=' + str(step), file=sys.stderr)
++        print('Time elapsed=' + str(time.time()-t0), file=sys.stderr)
 +        if (redo or ((keep < step) and ckpName not in self.globals)):
              redo = 1
 -            print >>STDERR, 'from ' + outprefix + ' to ' + outprefix + '.sq'
-+            print('from ' + outprefix + ' to ' + outprefix + '.sq', file=STDERR)
++            print('from ' + outprefix + ' to ' + outprefix + '.sq', file=sys.stderr)
              tempdata = MyFile.myfile()
              squeezeIntraRunGaps.mainLoop(
                  self.matches,
-@@ -454,39 +454,39 @@ class AtacDriver(AtacFile.AtacFile):
+@@ -454,39 +451,39 @@ class AtacDriver(AtacFile.AtacFile):
              self.checkpoint(outprefix)
  
          step += 1
 -        print >>STDERR, 'At TrimMatchOverlaps, step=' + str(step)
 -        print >>STDERR, 'Time elapsed=' + str(time.time()-t0)
 -        if (redo or ((keep < step) and not self.globals.has_key(ckpName))):
-+        print('At TrimMatchOverlaps, step=' + str(step), file=STDERR)
-+        print('Time elapsed=' + str(time.time()-t0), file=STDERR)
++        print('At TrimMatchOverlaps, step=' + str(step), file=sys.stderr)
++        print('Time elapsed=' + str(time.time()-t0), file=sys.stderr)
 +        if (redo or ((keep < step) and ckpName not in self.globals)):
              redo = 1
 -            print >>STDERR, "Start trimming for bp one-to-one-ness"
-+            print("Start trimming for bp one-to-one-ness", file=STDERR)
++            print("Start trimming for bp one-to-one-ness", file=sys.stderr)
              tempdata = MyFile.myfile()
              TrimMatchOverlaps.trimMatchOverlapsInBoth(self.matches,tempdata,'u')
              self.matches = tempdata
              outprefix += '.trim'
 -            print >>STDERR, "Finished trimming for bp one-to-one-ness"
-+            print("Finished trimming for bp one-to-one-ness", file=STDERR)
++            print("Finished trimming for bp one-to-one-ness", file=sys.stderr)
  
          step += 1
 -        print >>STDERR, 'At RunsAsMatches, step=' + str(step)
 -        print >>STDERR, 'Time elapsed=' + str(time.time()-t0)
 -        if (redo or ((keep < step) and not self.globals.has_key(ckpName))):
-+        print('At RunsAsMatches, step=' + str(step), file=STDERR)
-+        print('Time elapsed=' + str(time.time()-t0), file=STDERR)
++        print('At RunsAsMatches, step=' + str(step), file=sys.stderr)
++        print('Time elapsed=' + str(time.time()-t0), file=sys.stderr)
 +        if (redo or ((keep < step) and ckpName not in self.globals)):
              redo = 1
              self.runs = PerfectRuns.runsAsMatches( self.matches)
@@ -365,13 +371,13 @@ Last-Update: Thu, 19 Dec 2019 10:43:09 +0100
 -            print >>STDERR, 'At fillIntraRunGaps, step=' + str(step)
 -            print >>STDERR, 'Time elapsed=' + str(time.time()-t0)
 -            if (redo or ((keep < step) and not self.globals.has_key(ckpName))):
-+            print('At fillIntraRunGaps, step=' + str(step), file=STDERR)
-+            print('Time elapsed=' + str(time.time()-t0), file=STDERR)
++            print('At fillIntraRunGaps, step=' + str(step), file=sys.stderr)
++            print('Time elapsed=' + str(time.time()-t0), file=sys.stderr)
 +            if (redo or ((keep < step) and ckpName not in self.globals)):
                  redo = 1
 -                print >>STDERR, "fill the intrarun gaps"
 -                if(not self.globals.has_key('fillIntraRunGapsErate')):
-+                print("fill the intrarun gaps", file=STDERR)
++                print("fill the intrarun gaps", file=sys.stderr)
 +                if('fillIntraRunGapsErate' not in self.globals):
                      self.globals['fillIntraRunGapsErate'] = 0.10
 -                if(not self.globals.has_key('fillIntraRunGapsMaxGap')):
@@ -379,37 +385,37 @@ Last-Update: Thu, 19 Dec 2019 10:43:09 +0100
                      self.globals['fillIntraRunGapsMaxGap'] = 100000
                  fillIntraRunGapsErate = float(self.globals['fillIntraRunGapsErate'])
                  fillIntraRunGapsMaxGap = int(self.globals['fillIntraRunGapsMaxGap'])
-@@ -499,11 +499,11 @@ class AtacDriver(AtacFile.AtacFile):
+@@ -499,11 +496,11 @@ class AtacDriver(AtacFile.AtacFile):
                  self.checkpoint(outprefix)
  
              step += 1
 -            print >>STDERR, 'At TrimMatchOverlaps, step=' + str(step)
 -            print >>STDERR, 'Time elapsed=' + str(time.time()-t0)
 -            if (redo or ((keep < step) and not self.globals.has_key(ckpName))):
-+            print('At TrimMatchOverlaps, step=' + str(step), file=STDERR)
-+            print('Time elapsed=' + str(time.time()-t0), file=STDERR)
++            print('At TrimMatchOverlaps, step=' + str(step), file=sys.stderr)
++            print('Time elapsed=' + str(time.time()-t0), file=sys.stderr)
 +            if (redo or ((keep < step) and ckpName not in self.globals)):
                  redo = 1
 -                print >>STDERR, "trim the overlaps"
-+                print("trim the overlaps", file=STDERR)
++                print("trim the overlaps", file=sys.stderr)
                  tempdata = MyFile.myfile()
                  TrimMatchOverlaps.trimMatchOverlapsInBoth(self.matches,tempdata,'u')
                  self.matches = tempdata
-@@ -522,7 +522,7 @@ class localExecutable :
+@@ -522,7 +519,7 @@ class localExecutable :
          self.name = name
      def run(self,argline,inpfile,outfile):
          cmd = "%s %s %s %s" % (self.name,argline,inpfile,outfile)
 -        print >>STDERR,"cmd =", cmd
-+        print("cmd =", cmd, file=STDERR)
++        print("cmd =", cmd, file=sys.stderr)
          iret = os.system(cmd)
          assert(iret == 0)
  
-@@ -533,14 +533,14 @@ def main(runName):
+@@ -533,14 +530,14 @@ def main(runName):
      obj = AtacDriver(runName)
  
      t1 = time.time()
 -    print >>STDERR, "Read checkpoint in %d seconds." % (t1-t0)
-+    print("Read checkpoint in %d seconds." % (t1-t0), file=STDERR)
++    print("Read checkpoint in %d seconds." % (t1-t0), file=sys.stderr)
      t0=t1
  
      # The following are required:
@@ -424,14 +430,14 @@ Last-Update: Thu, 19 Dec 2019 10:43:09 +0100
  
      assemblyId1 = obj.globals['assemblyId1']
      assemblyId2 = obj.globals['assemblyId2']
-@@ -560,33 +560,33 @@ def main(runName):
+@@ -560,33 +557,33 @@ def main(runName):
      assert(os.path.exists(assemblyFile1+".idxStore"))
      assert(os.path.exists(assemblyFile2+".idxStore"))
  
 -    if not obj.globals.has_key('matchesFile'):
 -        print >>STDERR, "We need to make the raw matches."
 +    if 'matchesFile' not in obj.globals:
-+        print("We need to make the raw matches.", file=STDERR)
++        print("We need to make the raw matches.", file=sys.stderr)
              
 -    if(not obj.globals.has_key('rawMatchMerSize')):
 +    if('rawMatchMerSize' not in obj.globals):
@@ -464,11 +470,11 @@ Last-Update: Thu, 19 Dec 2019 10:43:09 +0100
  
      t1 = time.time()
 -    print >>STDERR, "Ran in %d seconds." % (t1-t0)
-+    print("Ran in %d seconds." % (t1-t0), file=STDERR)
++    print("Ran in %d seconds." % (t1-t0), file=sys.stderr)
  
      obj.checkpoint(runName + ".chained.atac")
  
-@@ -594,7 +594,7 @@ def main(runName):
+@@ -594,7 +591,7 @@ def main(runName):
  
  if __name__ == '__main__':
      if (len(sys.argv) == 1):
@@ -594,7 +600,7 @@ Last-Update: Thu, 19 Dec 2019 10:43:09 +0100
  # end def
 --- a/atac-driver/chainer/python/MyFile.py
 +++ b/atac-driver/chainer/python/MyFile.py
-@@ -1,5 +1,5 @@
+@@ -1,9 +1,9 @@
 -#!/usr/bin/env python
 -import sys, os, copy, tempfile, cStringIO
 +#!/usr/bin/python3
@@ -602,6 +608,11 @@ Last-Update: Thu, 19 Dec 2019 10:43:09 +0100
  
  # from __future__ import generators  # Necessary before Python 2.3
  
+-class myfile(file):
++class myfile():
+     "A temporary anonymous file"
+     def __init__(self):
+         filename = tempfile.mktemp()
 @@ -27,8 +27,8 @@ class ListLikeFileIter:
          self._fileIter = iter(self._fileptr.readline,"")
      def __del__(self):
@@ -1626,3 +1637,14 @@ Last-Update: Thu, 19 Dec 2019 10:43:09 +0100
 -  Py_InitModule("halign", registration_table);
 +  PyModule_Create(&cModMethods);
  }
+--- a/atac-driver/atac.pl
++++ b/atac-driver/atac.pl
+@@ -732,7 +732,7 @@ sub makeChains {
+     #
+     $ENV{'PYTHONPATH'} = "$LIBdir";
+ 
+-    if (runCommand("python $chainer $ATACdir/work/$matches.matches.extended")) {
++    if (runCommand("python3 $chainer $ATACdir/work/$matches.matches.extended")) {
+         print STDERR "PYTHONPATH=$ENV{'PYTHONPATH'}\n";
+         die "Chainer failed.\n";
+     }


=====================================
debian/rules
=====================================
@@ -40,5 +40,8 @@ override_dh_install:
 	    sed -i '1s+#!/usr/bin/env perl+#!/usr/bin/perl+' $${perlscript} ; \
 	done
 
+override_dh_python3:
+	dh_python3 --no-ext-rename
+
 get-orig-source:
 	DEB_VERSION_UPSTREAM=$(DEB_VERSION_UPSTREAM) debian/get-orig-source



View it on GitLab: https://salsa.debian.org/med-team/kmer/compare/cd6de6e90b30e0fc86f88afdfcc9b6350e05400a...ce9928609f54f4be938797fac6a9f155eb7ad629

-- 
View it on GitLab: https://salsa.debian.org/med-team/kmer/compare/cd6de6e90b30e0fc86f88afdfcc9b6350e05400a...ce9928609f54f4be938797fac6a9f155eb7ad629
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/20191219/05bc17bb/attachment-0001.html>


More information about the debian-med-commit mailing list