diff -Nru metaphlan2-2.7.5/debian/changelog metaphlan2-2.7.5/debian/changelog --- metaphlan2-2.7.5/debian/changelog 2018-02-16 11:12:16.000000000 +0100 +++ metaphlan2-2.7.5/debian/changelog 2019-04-24 21:17:24.000000000 +0200 @@ -1,3 +1,9 @@ +metaphlan2 (2.7.5-1ubuntu1) bionic; urgency=medium + + * Backport a debian patch to fix installation error. (LP: #1777165) + + -- Dylan Aïssi Wed, 24 Apr 2019 21:17:24 +0200 + metaphlan2 (2.7.5-1) unstable; urgency=medium * New upstream version (no data shiped with this archive any more) diff -Nru metaphlan2-2.7.5/debian/patches/_metaphlan2.py.patch metaphlan2-2.7.5/debian/patches/_metaphlan2.py.patch --- metaphlan2-2.7.5/debian/patches/_metaphlan2.py.patch 1970-01-01 01:00:00.000000000 +0100 +++ metaphlan2-2.7.5/debian/patches/_metaphlan2.py.patch 2019-04-24 21:17:24.000000000 +0200 @@ -0,0 +1,43 @@ +Author: Tony Travis +Last-Update: Mon, 28 May 2018 01:36:48 +0100 +Origin: https://lists.debian.org/debian-med/2018/05/msg00071.html +Description: Compile with Python2 despite _metaphlan2.py is using Python3 syntax + The "_metaphlan2.py" file contains Python 3 source but the "postinst" + script runs "pycompile" on the Python source files. However, "pycompile" + only supports Python version 2. The print() function in "_metaphlan2.py" + can be imported from the "__future__" library, but Python 2 does not + support function annotations: These are optional in Python 3, and are + removed from the function definitions in "_metaphlan2.py" by the patch. +Bug-Ubuntu: https://bugs.launchpad.net/ubuntu/+source/metaphlan2/+bug/1777165 + +--- a/_metaphlan2.py ++++ b/_metaphlan2.py +@@ -3,7 +3,7 @@ + # This module defines the functions which run MetaPhlAn2 on + # single and paired fastq data. + +- ++from __future__ import print_function + import subprocess as sb + from q2_types.per_sample_sequences import SingleLanePerSampleSingleEndFastqDirFmt + from q2_types.per_sample_sequences import SingleLanePerSamplePairedEndFastqDirFmt +@@ -24,8 +24,7 @@ def metaphlan2_helper(raw_data, nproc, i + sb.run(cmd, check=True) + + +-def profile_single_fastq(raw_data: SingleLanePerSampleSingleEndFastqDirFmt, +- nproc: int=1) -> biom.Table: ++def profile_single_fastq(raw_data, nproc=1): + output_biom = None + + with tempfile.TemporaryDirectory() as tmp_dir: +@@ -36,8 +35,7 @@ def profile_single_fastq(raw_data: Singl + return output_biom + + +-def profile_paired_fastq(raw_data: SingleLanePerSamplePairedEndFastqDirFmt, +- nproc: int=1) -> biom.Table: ++def profile_paired_fastq(raw_data, nproc=1): + output_biom = None + + with tempfile.TemporaryDirectory() as tmp_dir: diff -Nru metaphlan2-2.7.5/debian/patches/series metaphlan2-2.7.5/debian/patches/series --- metaphlan2-2.7.5/debian/patches/series 2018-02-16 11:12:16.000000000 +0100 +++ metaphlan2-2.7.5/debian/patches/series 2019-04-24 21:17:24.000000000 +0200 @@ -1,2 +1,3 @@ mpa_dir-is-usr_share_metaphlan2.patch spelling.patch +_metaphlan2.py.patch