[med-svn] [Git][med-team/minia][master] 3 commits: Use 2to3 to port from Python2 to Python3

Andreas Tille gitlab at salsa.debian.org
Mon Dec 16 08:54:35 GMT 2019



Andreas Tille pushed to branch master at Debian Med / minia


Commits:
add5770f by Andreas Tille at 2019-12-16T08:23:37Z
Use 2to3 to port from Python2 to Python3

- - - - -
4cc33eb5 by Andreas Tille at 2019-12-16T08:26:45Z
Latest update also fixed autopkgtest issue

- - - - -
fa6e0cee by Andreas Tille at 2019-12-16T08:30:03Z
Upload to unstable

- - - - -


8 changed files:

- debian/changelog
- + debian/patches/2to3.patch
- debian/patches/link_libraries.patch
- debian/patches/no_install_to_wrong_dir.patch
- debian/patches/series
- debian/patches/skip-rpath.patch
- debian/patches/use_debian_packaged_gatb-core.patch
- debian/tests/control


Changes:

=====================================
debian/changelog
=====================================
@@ -1,3 +1,12 @@
+minia (3.2.1+git20191130.5b131b9-2) unstable; urgency=medium
+
+  * Use 2to3 to port from Python2 to Python3
+    Closes: #943115
+  * Latest update also fixed autopkgtest issue
+    Closes: #939894
+
+ -- Andreas Tille <tille at debian.org>  Mon, 16 Dec 2019 09:26:55 +0100
+
 minia (3.2.1+git20191130.5b131b9-1) unstable; urgency=medium
 
   [ Andreas Tille ]


=====================================
debian/patches/2to3.patch
=====================================
@@ -0,0 +1,114 @@
+Description: Use 2to3 to port from Python2 to Python3
+Bug-Debian: https://bugs.debian.org/943115 
+Author: Andreas Tille <tille at debian.org>
+Last-Update: Mon, 16 Dec 2019 09:21:08 +0100
+
+--- a/scripts/convertToGFA.py
++++ b/scripts/convertToGFA.py
+@@ -1,4 +1,4 @@
+-#!/usr/bin/env python
++#!/usr/bin/python3
+ 
+ '''****************************************************************************
+ 
+@@ -20,8 +20,8 @@
+ 
+ '''****************************************************************************
+ 
+-*   To run the program, pass three arguments with the python script on command line.
+-*   For example - python convertToGFA.py inputFileName outputFileName kmerSize
++*   To run the program, pass three arguments with the python3 script on command line.
++*   For example - python3 convertToGFA.py inputFileName outputFileName kmerSize
+ 
+ *   Logic - It reads through the fasta file with all the unitigs information 
+ *   and link information and outputs it in the GFA format. 
+--- a/scripts/debug_1seq_tip_removal.py
++++ b/scripts/debug_1seq_tip_removal.py
+@@ -16,7 +16,7 @@ for line in fasta:
+         seq = line.strip()
+         is_error = False
+         is_genome = False
+-        for i in xrange(len(seq)-k+1):
++        for i in range(len(seq)-k+1):
+             kmer = seq[i:i+k]
+             if kmer not in genome[0] and kmer not in genome[1]:
+                 is_error = True
+@@ -24,9 +24,9 @@ for line in fasta:
+                 is_genome = True
+ 
+         if is_error and is_genome:
+-            print "mix of erroneous kmers and true genomic kmers inside the same assembled contig!!"
+-            print id
+-            print seq
++            print("mix of erroneous kmers and true genomic kmers inside the same assembled contig!!")
++            print(id)
++            print(seq)
+             exit(1)
+         else:
+-            print id,is_error,is_genome
++            print(id,is_error,is_genome)
+--- a/scripts/duplicate_sequences_according_abundance.py
++++ b/scripts/duplicate_sequences_according_abundance.py
+@@ -8,7 +8,7 @@ for line in fasta:
+         #print abundance
+         id=line
+     else:
+-        for i in xrange(int(abundance)):
+-            print id,
+-            print line,
++        for i in range(int(abundance)):
++            print(id, end=' ')
++            print(line, end=' ')
+ 
+--- a/scripts/ilots_stats.py
++++ b/scripts/ilots_stats.py
+@@ -37,4 +37,4 @@ for ctg in ctg_connect:
+     else:
+         nb_ilots += 1
+ 
+-print "contigs input", nb_ctg/2, "connected", nb_connected, "ilots", nb_ilots
++print("contigs input", nb_ctg/2, "connected", nb_connected, "ilots", nb_ilots)
+--- a/scripts/max_mem_usage_from_log.py
++++ b/scripts/max_mem_usage_from_log.py
+@@ -10,4 +10,4 @@ for line in sys.stdin:
+         mem=int(s[i-1])
+         max_mem=max(mem,max_mem)
+ 
+-print max_mem
++print(max_mem)
+--- a/scripts/strip_bcalm_links.py
++++ b/scripts/strip_bcalm_links.py
+@@ -3,11 +3,11 @@ file=sys.argv[1]
+ for line in open(file):
+      line=line.strip()
+      if not line.startswith(">"):
+-        print(line.strip())
++        print((line.strip()))
+         continue
+      if "L:" in line:
+          s = line.split("L:")
+      else:
+          s = [line.strip()]
+-     print(s[0])
++     print((s[0]))
+ 
+--- a/test/compare_fasta.py
++++ b/test/compare_fasta.py
+@@ -32,5 +32,5 @@ if len(s1) == len(s2) and len(s1) == 1:
+     else:
+         print("BAD: one sequence doesn't exactly match the other")
+ 
+-print("NOT EQUAL: %d sequence(s) in %s not in %s" % (len(s1.difference(s2)), fasta1, fasta2))
++print(("NOT EQUAL: %d sequence(s) in %s not in %s" % (len(s1.difference(s2)), fasta1, fasta2)))
+ sys.exit(1)
+--- a/test/simple_test.sh
++++ b/test/simple_test.sh
+@@ -35,7 +35,7 @@ function test()
+     else
+         eval $bindir/minia $args
+     fi
+-    python compare_fasta.py "$file".solution.fa "$file".contigs.fa
++    python3 compare_fasta.py "$file".solution.fa "$file".contigs.fa
+ }
+ 
+ # Test One


=====================================
debian/patches/link_libraries.patch
=====================================
@@ -4,7 +4,7 @@ Description: Link against Debian packaged gatbcore
 
 --- a/CMakeLists.txt
 +++ b/CMakeLists.txt
-@@ -72,15 +72,17 @@
+@@ -74,15 +74,17 @@ cmake_policy(SET CMP0009 NEW) # fixes cm
  
  include_directories (${PROGRAM_SOURCE_DIR})
  file (GLOB_RECURSE  ProjectFiles  ${PROGRAM_SOURCE_DIR}/*)


=====================================
debian/patches/no_install_to_wrong_dir.patch
=====================================
@@ -4,7 +4,7 @@ Description: Failed to fix these install dirs, deactivate completely and use dh_
 
 --- a/CMakeLists.txt
 +++ b/CMakeLists.txt
-@@ -127,9 +127,9 @@
+@@ -129,9 +129,9 @@ SET (CPACK_SOURCE_IGNORE_FILES
  )
  
  # We copy the project binary to the 'bin' directory


=====================================
debian/patches/series
=====================================
@@ -3,3 +3,4 @@ link_libraries.patch
 no_install_to_wrong_dir.patch
 skip-rpath.patch
 fix_path_in_tests.patch
+2to3.patch


=====================================
debian/patches/skip-rpath.patch
=====================================
@@ -4,7 +4,7 @@ Description: Do not set rpath
 
 --- a/CMakeLists.txt
 +++ b/CMakeLists.txt
-@@ -75,6 +75,7 @@ file (GLOB_RECURSE  ProjectFiles  ${PROG
+@@ -77,6 +77,7 @@ file (GLOB_RECURSE  ProjectFiles  ${PROG
  include(GNUInstallDirs)
  LINK_DIRECTORIES( /usr/${CMAKE_INSTALL_LIBDIR}/hdf5/serial )
  add_executable(${PROJECT_NAME} ${ProjectFiles})
@@ -12,7 +12,7 @@ Description: Do not set rpath
  target_link_libraries(${PROJECT_NAME} gatbcore hdf5 )
  
  # merci
-@@ -82,6 +83,7 @@ set (MERCI_SOURCE_DIR ${PROJECT_SOURCE_D
+@@ -84,6 +85,7 @@ set (MERCI_SOURCE_DIR ${PROJECT_SOURCE_D
  include_directories (${MERCI_SOURCE_DIR})
  file (GLOB_RECURSE  MerciFiles  ${MERCI_SOURCE_DIR}/*.cpp)
  add_executable("merci"  ${MerciFiles})


=====================================
debian/patches/use_debian_packaged_gatb-core.patch
=====================================
@@ -3,7 +3,7 @@ Last-Update: Mon, 21 Jan 2019 09:01:19 +0100
 Description: Use cmake input file of Debian packaged gatb-core
 --- a/CMakeLists.txt
 +++ b/CMakeLists.txt
-@@ -28,20 +28,6 @@
+@@ -28,20 +28,6 @@ IF (DEFINED JENKINS_TAG)
      SET (gatb-tool-version ${JENKINS_TAG})
  ENDIF()
  
@@ -24,7 +24,7 @@ Description: Use cmake input file of Debian packaged gatb-core
  ################################################################################
  # Define cmake modules directory
  ################################################################################
-@@ -66,7 +52,7 @@
+@@ -66,7 +52,7 @@ SET (GATB_CORE_EXCLUDE_TESTS     1)
  SET (GATB_CORE_EXCLUDE_EXAMPLES  1)
  
  # GATB CORE


=====================================
debian/tests/control
=====================================
@@ -1,3 +1,3 @@
 Tests: run-unit-test
-Depends: @, samtools, python, bandage
+Depends: @, samtools, python3, bandage
 Restrictions: allow-stderr



View it on GitLab: https://salsa.debian.org/med-team/minia/compare/b6cc8e8152b5fda7949ea2f3878aa62d47dd7730...fa6e0ceebb96e86e2e01f53f4e219ed8dfb91a1d

-- 
View it on GitLab: https://salsa.debian.org/med-team/minia/compare/b6cc8e8152b5fda7949ea2f3878aa62d47dd7730...fa6e0ceebb96e86e2e01f53f4e219ed8dfb91a1d
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/20191216/3e582583/attachment-0001.html>


More information about the debian-med-commit mailing list