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

Andreas Tille gitlab at salsa.debian.org
Thu Dec 19 17:08:31 GMT 2019



Andreas Tille pushed to branch master at Debian Med / pynast


Commits:
a39dbafb by Andreas Tille at 2019-12-19T17:03:04Z
Use 2to3 to port from Python2 to Python3

- - - - -
3907361a by Andreas Tille at 2019-12-19T17:03:32Z
routine-update: debhelper-compat 12

- - - - -
4d2b64fc by Andreas Tille at 2019-12-19T17:03:40Z
routine-update: Standards-Version: 4.4.1

- - - - -
d194fbf3 by Andreas Tille at 2019-12-19T17:03:41Z
R-U: Trailing whitespace in debian/changelog

- - - - -
8490e443 by Andreas Tille at 2019-12-19T17:03:41Z
R-U: Trailing whitespace in debian/control

- - - - -
c5f3c69a by Andreas Tille at 2019-12-19T17:03:41Z
R-U: autopkgtest: s/ADTTMP/AUTOPKGTEST_TMP/g

- - - - -
549d787c by Andreas Tille at 2019-12-19T17:03:42Z
Trim trailing whitespace.

Fixes lintian: file-contains-trailing-whitespace
See https://lintian.debian.org/tags/file-contains-trailing-whitespace.html for more details.

- - - - -
da261bae by Andreas Tille at 2019-12-19T17:03:50Z
Set upstream metadata fields: Bug-Database, Repository, Repository-Browse.
- - - - -
9138597b by Andreas Tille at 2019-12-19T17:03:50Z
Remove obsolete field Name from debian/upstream/metadata (already present in machine-readable debian/copyright).
- - - - -
71142562 by Andreas Tille at 2019-12-19T17:07:43Z
Adapt packaging to Python3

- - - - -
3356966b by Andreas Tille at 2019-12-19T17:08:12Z
Add todo

- - - - -


8 changed files:

- debian/changelog
- − debian/compat
- debian/control
- + debian/patches/2to3.patch
- debian/patches/series
- debian/rules
- debian/tests/run-unit-test
- debian/upstream/metadata


Changes:

=====================================
debian/changelog
=====================================
@@ -1,3 +1,21 @@
+pynast (1.2.2-5) UNRELEASED; urgency=medium
+
+  * Use 2to3 to port from Python2 to Python3
+    Closes: #937488
+  * debhelper-compat 12
+  * Standards-Version: 4.4.1
+  * Remove trailing whitespace in debian/changelog
+  * Remove trailing whitespace in debian/control
+  * autopkgtest: s/ADTTMP/AUTOPKGTEST_TMP/g
+  * Trim trailing whitespace.
+  * Set upstream metadata fields: Bug-Database, Repository, Repository-
+    Browse.
+  * Remove obsolete field Name from debian/upstream/metadata (already
+    present in machine-readable debian/copyright).
+  TODO: python3-cogent
+
+ -- Andreas Tille <tille at debian.org>  Thu, 19 Dec 2019 17:57:15 +0100
+
 pynast (1.2.2-4) unstable; urgency=medium
 
   * Point Vcs-URLs to Salsa
@@ -116,14 +134,14 @@ python-pynast (1.1-3) unstable; urgency=low
 python-pynast (1.1-2ubuntu4) lucid; urgency=low
 
   * Fix Lintian warning on docs, clean up build file
-  * Allow building with either python2 or python-central 
+  * Allow building with either python2 or python-central
   * Renamed main package to pynast
 
  -- Tim Booth <tbooth at ceh.ac.uk>  Fri, 26 Aug 2011 11:29:17 +0100
 
 python-pynast (1.1-2ubuntu3) lucid; urgency=low
 
-  * Rebuild for Lucid, lowered dependencies 
+  * Rebuild for Lucid, lowered dependencies
 
  -- Tim Booth <tbooth at ceh.ac.uk>  Fri, 26 Aug 2011 10:05:42 +0100
 
@@ -141,4 +159,3 @@ python-pynast (1.1-1) experimental; urgency=low
   * Initial release (Closes: #587189)
 
  -- Sri Girish Srinivasa Murthy <srigirish at evolbio.mpg.de>  Sun, 25 Jul 2010 22:21:11 +0200
-


=====================================
debian/compat deleted
=====================================
@@ -1 +0,0 @@
-11


=====================================
debian/control
=====================================
@@ -5,15 +5,15 @@ Uploaders: Steffen Moeller <moeller at debian.org>,
            Tim Booth <tbooth at ceh.ac.uk>
 Section: python
 Priority: optional
-Build-Depends: debhelper (>= 11~),
-               python,
-               python-cogent (>= 1.5.3),
+Build-Depends: debhelper-compat (= 12),
+               python3,
+               python-cogent,
                python3-sphinx,
                blast2,
                clustalw,
                mafft,
                muscle
-Standards-Version: 4.2.1
+Standards-Version: 4.4.1
 Vcs-Browser: https://salsa.debian.org/med-team/pynast
 Vcs-Git: https://salsa.debian.org/med-team/pynast.git
 Homepage: https://github.com/biocore/pynast
@@ -21,20 +21,20 @@ Homepage: https://github.com/biocore/pynast
 Package: pynast
 Architecture: all
 Depends: ${misc:Depends},
-         ${python:Depends},
+         ${python3:Depends},
          libjs-jquery,
          libjs-underscore
 Recommends: blast2,
             clustalw,
             mafft,
             muscle,
-            python-mpi4py
+            python3-mpi4py
 Suggests: uclust
 Conflicts: python-pynast
 Provides: python-pynast
 Replaces: python-pynast
 Description: alignment of short DNA sequences
- The package provices a reimplementation of the Nearest Alignment 
+ The package provices a reimplementation of the Nearest Alignment
  Space Termination tool in Python. It was prepared for next generation
  sequencers.
  .


=====================================
debian/patches/2to3.patch
=====================================
@@ -0,0 +1,464 @@
+Description: Use 2to3 to port from Python2 to Python3
+Bug-Debian: https://bugs.debian.org/937488 
+Author: Andreas Tille <tille at debian.org>
+Last-Update: Thu, 19 Dec 2019 17:57:15 +0100
+
+--- a/doc/conf.py
++++ b/doc/conf.py
+@@ -37,8 +37,8 @@ source_suffix = '.rst'
+ master_doc = 'index'
+ 
+ # General information about the project.
+-project = u'PyNAST'
+-copyright = u'2010, Greg Caporaso'
++project = 'PyNAST'
++copyright = '2010, Greg Caporaso'
+ 
+ # The version info for the project you're documenting, acts as replacement for
+ # |version| and |release|, also used in various other places throughout the
+@@ -172,8 +172,8 @@ htmlhelp_basename = 'PyNASTdoc'
+ # Grouping the document tree into LaTeX files. List of tuples
+ # (source start file, target name, title, author, documentclass [howto/manual]).
+ latex_documents = [
+-  ('index', 'PyNAST.tex', u'PyNAST Documentation',
+-   u'Greg Caporaso', 'manual'),
++  ('index', 'PyNAST.tex', 'PyNAST Documentation',
++   'Greg Caporaso', 'manual'),
+ ]
+ 
+ # The name of an image file (relative to this directory) to place at the top of
+--- a/pynast/__init__.py
++++ b/pynast/__init__.py
+@@ -1,4 +1,4 @@
+-#!/usr/bin/env python
++#!/usr/bin/python3
+ 
+ #-----------------------------------------------------------------------------
+ # Copyright (c) 2013, The PyNAST Development Team.
+--- a/pynast/logger.py
++++ b/pynast/logger.py
+@@ -1,4 +1,4 @@
+-#!/usr/bin/env python
++#!/usr/bin/python3
+ 
+ #-----------------------------------------------------------------------------
+ # Copyright (c) 2013, The PyNAST Development Team.
+--- a/pynast/pycogent_backports/__init__.py
++++ b/pynast/pycogent_backports/__init__.py
+@@ -1,4 +1,4 @@
+-#!/usr/bin/env python
++#!/usr/bin/python3
+ 
+ #-----------------------------------------------------------------------------
+ # Copyright (c) 2013, The PyNAST Development Team.
+--- a/pynast/pycogent_backports/uclust.py
++++ b/pynast/pycogent_backports/uclust.py
+@@ -1,4 +1,4 @@
+-#!/usr/bin/env python
++#!/usr/bin/python3
+ """Application controller for uclust version 1.1.579
+ 
+ Includes application controllers for uclust and
+@@ -127,9 +127,8 @@ class Uclust(CommandLineApplication):
+         
+         unsupported_parameters = set(data.keys()) - set(allowed_values)
+         if unsupported_parameters:
+-            raise ApplicationError,\
+-             "Unsupported parameter(s) passed when calling uclust: %s" %\
+-              ' '.join(unsupported_parameters)
++            raise ApplicationError("Unsupported parameter(s) passed when calling uclust: %s" %\
++              ' '.join(unsupported_parameters))
+         
+         for v in allowed_values:
+             # turn the parameter off so subsequent runs are not
+@@ -216,30 +215,28 @@ def process_uclust_pw_alignment_results(
+             strand_id = ''
+             target_rev_match = False
+         else:
+-            raise UclustParseError, "Unknown strand type: %s" % matching_strand
++            raise UclustParseError("Unknown strand type: %s" % matching_strand)
+         uc_query_id = hit[8]
+         uc_target_id = hit[9]
+         percent_id = float(hit[3])
+         
+-        fasta_pair = alignments.next()
++        fasta_pair = next(alignments)
+         
+         fasta_query_id = fasta_pair[0][0]
+         aligned_query = fasta_pair[0][1]
+         
+         if fasta_query_id != uc_query_id:
+-            raise UclustParseError,\
+-             "Order of fasta and uc files do not match."+\
++            raise UclustParseError("Order of fasta and uc files do not match."+\
+              " Got query %s but expected %s." %\
+-              (fasta_query_id, uc_query_id)
++              (fasta_query_id, uc_query_id))
+             
+         fasta_target_id = fasta_pair[1][0]
+         aligned_target = fasta_pair[1][1]
+             
+         if fasta_target_id != uc_target_id + strand_id:
+-            raise UclustParseError, \
+-             "Order of fasta and uc files do not match."+\
++            raise UclustParseError("Order of fasta and uc files do not match."+\
+              " Got target %s but expected %s." %\
+-              (fasta_target_id, uc_target_id + strand_id)
++              (fasta_target_id, uc_target_id + strand_id))
+             
+         if target_rev_match:
+             query_id = uc_query_id + ' RC'
+@@ -289,8 +286,7 @@ def clusters_from_uc_file(uc_lines,
+         target_cluster = record[9].split()[0]
+         if hit_type == 'H':
+             if error_on_multiple_hits and query_id in all_hits:
+-                raise UclustParseError, \
+-                 ("Query id " + query_id + " hit multiple seeds. "
++                raise UclustParseError("Query id " + query_id + " hit multiple seeds. "
+                   "This can happen if --allhits is "
+                   "enabled in the call to uclust, which isn't supported by default. "
+                   "Call clusters_from_uc_file(lines, error_on_multiple_hits=False) to "
+@@ -304,8 +300,7 @@ def clusters_from_uc_file(uc_lines,
+             # a new seed was identified -- create a cluster with this 
+             # sequence as the first instance
+             if query_id in clusters:
+-                raise UclustParseError,\
+-                 ("A seq id was provided as a seed, but that seq id already "
++                raise UclustParseError("A seq id was provided as a seed, but that seq id already "
+                   "represents a cluster. Are there overlapping seq ids in your "
+                   "reference and input files or repeated seq ids in either? "
+                   "Offending seq id is %s" % query_id)
+@@ -318,8 +313,7 @@ def clusters_from_uc_file(uc_lines,
+             # lines separately from the H lines to detect overlapping seq ids 
+             # between the reference and the input fasta files
+             if query_id in clusters:
+-                raise UclustParseError,\
+-                 ("A seq id was provided as a seed, but that seq id already "
++                raise UclustParseError("A seq id was provided as a seed, but that seq id already "
+                   "represents a cluster. Are there overlapping seq ids in your "
+                   "reference and input files or repeated seq ids in either? "
+                   "Offending seq id is %s" % query_id)
+@@ -330,8 +324,7 @@ def clusters_from_uc_file(uc_lines,
+         else:
+             # shouldn't be possible to get here, but provided for 
+             # clarity
+-            raise UclustParseError,\
+-             "Unexpected result parsing line:\n%s" % '\t'.join(record)
++            raise UclustParseError("Unexpected result parsing line:\n%s" % '\t'.join(record))
+     
+     # will need to return the full clusters dict, I think, to support
+     # useful identifiers in reference database clustering
+@@ -567,7 +560,7 @@ def get_clusters_from_fasta_filepath(
+         remove_files(files_to_remove)
+     except ApplicationError:
+         remove_files(files_to_remove)
+-        raise ApplicationError, ('Error running uclust. Possible causes are '
++        raise ApplicationError('Error running uclust. Possible causes are '
+          'unsupported version (current supported version is v1.2.22) is installed or '
+          'improperly formatted input file was provided')
+     except ApplicationNotFoundError:
+@@ -586,6 +579,6 @@ def get_clusters_from_fasta_filepath(
+     if return_cluster_maps:
+         return clusters, failures, seeds
+     else:
+-        return clusters.values(), failures, seeds
++        return list(clusters.values()), failures, seeds
+ 
+ ## End uclust convenience functions
+--- a/pynast/util.py
++++ b/pynast/util.py
+@@ -1,4 +1,4 @@
+-#!/usr/bin/env python
++#!/usr/bin/python3
+ 
+ #-----------------------------------------------------------------------------
+ # Copyright (c) 2013, The PyNAST Development Team.
+@@ -8,7 +8,7 @@
+ # The full license is in the file COPYING.txt, distributed with this software.
+ #-----------------------------------------------------------------------------
+ 
+-from __future__ import division
++
+ from os import system, remove, popen
+ from os.path import exists
+ from tempfile import gettempdir, NamedTemporaryFile
+@@ -80,10 +80,9 @@ def pair_hmm_align_unaligned_seqs(seqs,m
+     
+     seqs = LoadSeqs(data=seqs,moltype=moltype,aligned=False)
+     try:
+-        s1, s2 = seqs.values()
++        s1, s2 = list(seqs.values())
+     except ValueError:
+-        raise ValueError,\
+-         "Pairwise aligning of seqs requires exactly two seqs."
++        raise ValueError("Pairwise aligning of seqs requires exactly two seqs.")
+     
+     try:
+         gap_open = params['gap_open']
+@@ -110,13 +109,12 @@ def blast_align_unaligned_seqs(seqs,
+         This needs to be moved to the blast application controller.
+     
+     """
+-    seqs = dict(LoadSeqs(data=seqs,moltype=moltype,aligned=False).items())
+-    seq_ids = seqs.keys()
++    seqs = dict(list(LoadSeqs(data=seqs,moltype=moltype,aligned=False).items()))
++    seq_ids = list(seqs.keys())
+     query_id = seq_ids[0]
+     subject_id = seq_ids[1]
+     if len(seq_ids) != 2:
+-        raise ValueError,\
+-         "Pairwise aligning of seqs with blast requires exactly two seqs."
++        raise ValueError("Pairwise aligning of seqs with blast requires exactly two seqs.")
+     
+     # Create temporary input and output files. Note that 
+     # delete = False here because we don't want these to 
+@@ -150,7 +148,7 @@ def blast_align_unaligned_seqs(seqs,
+     bl2seq_res = system('bl2seq -i %s -j %s -o %s -F F -S 1 -q -1 -E 2 -W 11 -p blastn' %\
+      (in_filepath1,in_filepath2,out_filepath))
+     if bl2seq_res != 0:
+-        raise RuntimeError, "bl2seq failed:\n %s" % bl2seq_res 
++        raise RuntimeError("bl2seq failed:\n %s" % bl2seq_res) 
+     
+     query_seq = []
+     subject_seq = []
+@@ -322,7 +320,7 @@ def reintroduce_template_spacing(templat
+             # add the positions of the new gaps chars to the list
+             # of new gaps
+             new_gaps_in_pw_alignment += \
+-             range(first_new_gap_pos,first_new_gap_pos + (-1*addl_gaps))
++             list(range(first_new_gap_pos,first_new_gap_pos + (-1*addl_gaps)))
+         else:
+             # gap pattern is the same following the current sequence 
+             # position
+@@ -337,7 +335,7 @@ def nearest_gap(seq,pos):
+     """
+     # Catch negative sequence positions
+     if pos < 0:
+-        raise IndexError, "Sequence positions cannot be negative: %d" % pos
++        raise IndexError("Sequence positions cannot be negative: %d" % pos)
+     
+     # If pos contains a gap, that's the closest gap
+     if seq[pos] == '-':
+@@ -364,11 +362,10 @@ def nearest_gap(seq,pos):
+     
+     # error if there are no gaps in the sequence
+     if not choices:
+-        raise UnalignableSequenceError,\
+-         "Can't adjust alignment because there are too few gaps to "+\
++        raise UnalignableSequenceError("Can't adjust alignment because there are too few gaps to "+\
+          "remove in the aligned candidate to reduce to the length of "+\
+          "the template alignment (i.e., candidate adds too many insertions "+\
+-         "during pairwise alignment)."
++         "during pairwise alignment).")
+         
+     # return the gap_index of the choice with the smaller distance -- if there
+     # is a tie, will delete the 5' gap (which is what original NAST does)
+@@ -452,9 +449,8 @@ def remove_template_terminal_gaps(candid
+     """Remove template terminal gaps and corresponding bases in candidate 
+     """
+     if len(template) != len(candidate):
+-        raise ValueError, \
+-         "Sequences must be aligned, but their "+\
+-         "lengths aren't equal. %d != %d" % (len(candidate),len(template))
++        raise ValueError("Sequences must be aligned, but their "+\
++         "lengths aren't equal. %d != %d" % (len(candidate),len(template)))
+          
+     if len(template) == 0:
+         return candidate, template
+@@ -487,10 +483,10 @@ def remove_template_terminal_gaps(candid
+ 
+ def deprecation_warning(d):
+     if d:
+-        print "Unsupported or deprecated options "+\
+-         "passed to pynast: %s\n" % ' '.join(d.keys()) +\
++        print("Unsupported or deprecated options "+\
++         "passed to pynast: %s\n" % ' '.join(list(d.keys())) +\
+          "  blast_db, max_e_value, and addl_blast_params are deprecated " +\
+-         "and will be removed in PyNAST 1.3."
++         "and will be removed in PyNAST 1.3.")
+ 
+ def pynast_seq(candidate_sequence, template_alignment,
+     max_hits=30, min_pct=75.0, min_len=1000, align_unaligned_seqs_f=None,
+@@ -534,7 +530,7 @@ def pynast_seq(candidate_sequence, templ
+     if exit_status == 0:
+         return l.Data[3], aligned_seq
+     else:
+-        raise UnalignableSequenceError, l.Data[2]
++        raise UnalignableSequenceError(l.Data[2])
+ 
+ def ipynast_seqs(candidate_sequences, template_alignment,
+     max_hits=30, min_pct=75.0, min_len=1000, align_unaligned_seqs_f=None,
+@@ -614,8 +610,7 @@ def ipynast_seqs(candidate_sequences, te
+         try:
+             template_alignment_f = open(template_alignment)
+         except IOError:
+-            raise IOError,\
+-             "Cannot open specified filepath: %s" % template_alignment
++            raise IOError("Cannot open specified filepath: %s" % template_alignment)
+         # template alignment provided as filepath -- process it iteratively
+         # to handle potentially massive template_alignments
+         template_alignment = {}
+@@ -648,7 +643,7 @@ def ipynast_seqs(candidate_sequences, te
+             tmp_dir=temp_dir)
+ 
+     try:
+-        current_result = pw_alignment_iterator.next()
++        current_result = next(pw_alignment_iterator)
+     except StopIteration:
+         current_result = None
+         
+@@ -658,7 +653,7 @@ def ipynast_seqs(candidate_sequences, te
+             # clean-up temporary blast database files if any were created
+             pw_alignment_iterator.close()
+             remove_files(files_to_remove,error_on_missing=False)
+-            raise ValueError, "Candidate sequence contains gaps. This is not supported."
++            raise ValueError("Candidate sequence contains gaps. This is not supported.")
+         
+         try:
+             candidate_seq_id, template_seq_id, pw_aligned_candidate,\
+@@ -748,7 +743,7 @@ def ipynast_seqs(candidate_sequences, te
+                 
+             # get the next alignment
+             try:
+-                current_result = pw_alignment_iterator.next()
++                current_result = next(pw_alignment_iterator)
+             except StopIteration:
+                 # end of the input fasta file indicates completion,
+                 # not end of the aligned sequences
+--- a/scripts/pynast
++++ b/scripts/pynast
+@@ -1,4 +1,4 @@
+-#!/usr/bin/env python
++#!/usr/bin/python3
+ 
+ #-----------------------------------------------------------------------------
+ # Copyright (c) 2013, The PyNAST Development Team.
+--- a/setup.py
++++ b/setup.py
+@@ -1,4 +1,4 @@
+-#!/usr/bin/env python
++#!/usr/bin/python3
+ 
+ #-----------------------------------------------------------------------------
+ # Copyright (c) 2013, The PyNAST Development Team.
+@@ -8,7 +8,7 @@
+ # The full license is in the file COPYING.txt, distributed with this software.
+ #-----------------------------------------------------------------------------
+ 
+-from __future__ import division
++
+ from distutils.core import setup
+ import re
+ 
+--- a/tests/all_tests.py
++++ b/tests/all_tests.py
+@@ -1,4 +1,4 @@
+-#!/usr/bin/env python
++#!/usr/bin/python3
+ 
+ #-----------------------------------------------------------------------------
+ # Copyright (c) 2013, The PyNAST Development Team.
+@@ -21,7 +21,7 @@ def main():
+ 
+     unittest_good_pattern = re.compile('OK\s*$')
+     application_not_found_pattern = re.compile('ApplicationNotFoundError')
+-    python_name = 'python'
++    python_name = 'python3'
+     bad_tests = []
+     missing_application_tests = []
+ 
+@@ -38,11 +38,11 @@ def main():
+     unittest_names.sort()
+ 
+     for unittest_name in unittest_names:
+-        print "Testing %s:\n" % unittest_name
++        print("Testing %s:\n" % unittest_name)
+         command = '%s %s -v' % (python_name, unittest_name)
+         result = Popen(command,shell=True,universal_newlines=True,\
+                        stdout=PIPE,stderr=STDOUT).stdout.read()
+-        print result
++        print(result)
+         if not unittest_good_pattern.search(result):
+             if application_not_found_pattern.search(result):
+                 missing_application_tests.append(unittest_name)
+@@ -63,7 +63,7 @@ def main():
+ 
+     for script_name in script_names:
+         script_good_pattern = re.compile('^Usage: %s' % split(script_name)[1])
+-        print "Testing %s." % script_name
++        print("Testing %s." % script_name)
+         command = '%s %s -h' % (python_name, script_name)
+         result = Popen(command,shell=True,universal_newlines=True,\
+                        stdout=PIPE,stderr=STDOUT).stdout.read()
+@@ -74,16 +74,16 @@ def main():
+             bad_scripts.append(script_name)
+ 
+     if bad_tests:
+-        print "\nFailed the following unit tests.\n%s" % '\n'.join(bad_tests)
++        print("\nFailed the following unit tests.\n%s" % '\n'.join(bad_tests))
+         
+     if missing_application_tests:
+-        print "\nFailed the following unit tests, in part or whole due "+\
++        print("\nFailed the following unit tests, in part or whole due "+\
+         "to missing external applications.\nDepending on the QIIME features "+\
+         "you plan to use, this may not be critical.\n%s"\
+-         % '\n'.join(missing_application_tests)
++         % '\n'.join(missing_application_tests))
+          
+     if bad_scripts:
+-        print "\nFailed the following script tests.\n%s" % '\n'.join(bad_scripts)
++        print("\nFailed the following script tests.\n%s" % '\n'.join(bad_scripts))
+ 
+     # If any of the unit tests or script tests failed, or if we have any
+     # missing application errors, use return code 1 (as python's
+@@ -91,7 +91,7 @@ def main():
+     # suite.
+     return_code = 1
+     if not (bad_tests or missing_application_tests or bad_scripts):
+-        print "\nAll tests passed successfully."
++        print("\nAll tests passed successfully.")
+         return_code = 0
+     return return_code
+ 
+--- a/tests/test_logger.py
++++ b/tests/test_logger.py
+@@ -1,4 +1,4 @@
+-#!/usr/bin/env python
++#!/usr/bin/python3
+ 
+ #-----------------------------------------------------------------------------
+ # Copyright (c) 2013, The PyNAST Development Team.
+@@ -8,7 +8,7 @@
+ # The full license is in the file COPYING.txt, distributed with this software.
+ #-----------------------------------------------------------------------------
+ 
+-from __future__ import division
++
+ from tempfile import NamedTemporaryFile
+ from os import remove
+ from cogent import LoadSeqs, DNA
+--- a/tests/test_pycogent_backports/test_uclust.py
++++ b/tests/test_pycogent_backports/test_uclust.py
+@@ -1,4 +1,4 @@
+-#!/usr/bin/env python
++#!/usr/bin/python3
+ 
+ """
+  : provides unit tests for the uclust.py module
+--- a/tests/test_util.py
++++ b/tests/test_util.py
+@@ -1,4 +1,4 @@
+-#!/usr/bin/env python
++#!/usr/bin/python3
+ 
+ #-----------------------------------------------------------------------------
+ # Copyright (c) 2013, The PyNAST Development Team.
+@@ -8,7 +8,7 @@
+ # The full license is in the file COPYING.txt, distributed with this software.
+ #-----------------------------------------------------------------------------
+ 
+-from __future__ import division
++
+ from tempfile import NamedTemporaryFile
+ from os.path import exists
+ import sys


=====================================
debian/patches/series
=====================================
@@ -2,3 +2,4 @@ do_not_install_privacy_breaching_scripts.patch
 skip_tests_needing_uclust.patch
 avoid_python-mpi4py_missing_warning.patch
 accommodate_blast+.patch
+2to3.patch


=====================================
debian/rules
=====================================
@@ -4,14 +4,11 @@
 # Uncomment this to turn on verbose mode.
 #export DH_VERBOSE=1
 
-#Allowing this to be overridden by environemnt helps with backports
-DEB_PYTHON_SUPPORT?=python2
-
 # Get the supported Python versions
-PYVERS = $(shell pyversions -r -v)
+PY3VERS = $(shell py3versions -r -v)
 
 %:
-	dh $@ --with $(DEB_PYTHON_SUPPORT)
+	dh $@ --with python3 --buildsystem=pybuild
 
 override_dh_auto_build:
 	dh_auto_build
@@ -29,7 +26,7 @@ override_dh_auto_test:
 ifeq (,$(findstring nocheck,$(DEB_BUILD_OPTIONS)))
 	set -e -x; \
 	cd tests; \
-	for py in $(PYVERS); do \
+	for py in $(PY3VERS); do \
 	    PYTHONPATH=$$( echo $(CURDIR)/build/lib.*-$$py ) python$$py all_tests.py ; \
 	done
 endif


=====================================
debian/tests/run-unit-test
=====================================
@@ -1,11 +1,11 @@
 #!/bin/sh -e
 
 pkg=pynast
-if [ "$ADTTMP" = "" ] ; then
-  ADTTMP=`mktemp -d /tmp/${pkg}-test.XXXXXX`
+if [ "$AUTOPKGTEST_TMP" = "" ] ; then
+  AUTOPKGTEST_TMP=`mktemp -d /tmp/${pkg}-test.XXXXXX`
 fi
-cd $ADTTMP
-cp -a /usr/share/doc/${pkg}/tests $ADTTMP
+cd $AUTOPKGTEST_TMP
+cp -a /usr/share/doc/${pkg}/tests $AUTOPKGTEST_TMP
 find . -name "*.gz" -exec gunzip \{\} \;
 cd tests
 LC_ALL=C.UTF-8 python all_tests.py


=====================================
debian/upstream/metadata
=====================================
@@ -1,23 +1,25 @@
-Name: PyNAST
 Reference:
- Author: >
-  J. Gregory Caporaso and Kyle Bittinger and Frederic D. Bushman and
-  Todd Z. DeSantis and Gary L. Andersen and Rob Knight
- Title: >
-  PyNAST: a flexible tool for aligning sequences to a template alignment
- Journal: Bioinformatics
- Volume: 26
- Pages: 266-267
- Year: 2010
- DOI: 10.1093/bioinformatics/btp636
- PMID: 19914921
- URL: http://bioinformatics.oxfordjournals.org/content/26/2/266.long
+  Author: >
+    J. Gregory Caporaso and Kyle Bittinger and Frederic D. Bushman and
+    Todd Z. DeSantis and Gary L. Andersen and Rob Knight
+  Title: >
+    PyNAST: a flexible tool for aligning sequences to a template alignment
+  Journal: Bioinformatics
+  Volume: 26
+  Pages: 266-267
+  Year: 2010
+  DOI: 10.1093/bioinformatics/btp636
+  PMID: 19914921
+  URL: http://bioinformatics.oxfordjournals.org/content/26/2/266.long
 Registry:
- - Name: SciCrunch
-   Entry: NA
- - Name: conda:bioconda
-   Entry: pynast
- - Name: OMICtools
-   Entry: OMICS_15419
- - Name: bio.tools
-   Entry: NA
+- Name: SciCrunch
+  Entry: NA
+- Name: conda:bioconda
+  Entry: pynast
+- Name: OMICtools
+  Entry: OMICS_15419
+- Name: bio.tools
+  Entry: NA
+Bug-Database: https://github.com/biocore/pynast/issues
+Repository: https://github.com/biocore/pynast.git
+Repository-Browse: https://github.com/biocore/pynast



View it on GitLab: https://salsa.debian.org/med-team/pynast/compare/fafc483b885e2a6f043ec848a4031168b5c9aa5d...3356966bea68f231d588f6174e71468dca0f1d60

-- 
View it on GitLab: https://salsa.debian.org/med-team/pynast/compare/fafc483b885e2a6f043ec848a4031168b5c9aa5d...3356966bea68f231d588f6174e71468dca0f1d60
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/f2b44b33/attachment-0001.html>


More information about the debian-med-commit mailing list