[med-svn] [Git][med-team/metaphlan2][master] 2 commits: Compile with Python2 despite _metaphlan2.py is using Python3 syntax (Thanks to…
Andreas Tille
gitlab at salsa.debian.org
Mon May 28 14:19:35 BST 2018
Andreas Tille pushed to branch master at Debian Med / metaphlan2
Commits:
eef9bbe8 by Andreas Tille at 2018-05-28T15:13:14+02:00
Compile with Python2 despite _metaphlan2.py is using Python3 syntax (Thanks to Tony Travis for the patch)
- - - - -
9d9b7df7 by Andreas Tille at 2018-05-28T15:19:13+02:00
Upload to unstable
- - - - -
4 changed files:
- debian/changelog
- + debian/patches/_metaphlan2.py.patch
- debian/patches/series
- debian/patches/spelling.patch
Changes:
=====================================
debian/changelog
=====================================
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,11 +1,15 @@
-metaphlan2 (2.7.6-1) UNRELEASED; urgency=medium
+metaphlan2 (2.7.6-1) unstable; urgency=medium
+ [ Andreas Tille ]
* New upstream version
* Point Vcs fields to salsa.debian.org
* Standards-Version: 4.1.4
* Avoid privacy breach by referencing remote files from README.html
- -- Andreas Tille <tille at debian.org> Mon, 28 May 2018 07:27:16 +0200
+ [ Tony Travis ]
+ * Compile with Python2 despite _metaphlan2.py is using Python3 syntax
+
+ -- Andreas Tille <tille at debian.org> Mon, 28 May 2018 15:13:38 +0200
metaphlan2 (2.7.5-1) unstable; urgency=medium
=====================================
debian/patches/_metaphlan2.py.patch
=====================================
--- /dev/null
+++ b/debian/patches/_metaphlan2.py.patch
@@ -0,0 +1,42 @@
+Author: Tony Travis <tony.travis at minke-informatics.co.uk>
+Las-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.
+
+--- 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:
=====================================
debian/patches/series
=====================================
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -1,2 +1,3 @@
mpa_dir-is-usr_share_metaphlan2.patch
spelling.patch
+_metaphlan2.py.patch
=====================================
debian/patches/spelling.patch
=====================================
--- a/debian/patches/spelling.patch
+++ b/debian/patches/spelling.patch
@@ -35,7 +35,7 @@ Description: Spelling
'file where each clade name is on a line will be read.'
--- a/metaphlan2.py
+++ b/metaphlan2.py
-@@ -597,7 +597,7 @@ def read_params(args):
+@@ -595,7 +595,7 @@ def read_params(args):
default='rel_ab', help =
"Type of analysis to perform: \n"
" * rel_ab: profiling a metagenomes in terms of relative abundances\n"
View it on GitLab: https://salsa.debian.org/med-team/metaphlan2/compare/0d7cca03335bdac7213519c2c3804e245da1ec03...9d9b7df7ff658d2e71f92ff93fe919d83ac79dab
--
View it on GitLab: https://salsa.debian.org/med-team/metaphlan2/compare/0d7cca03335bdac7213519c2c3804e245da1ec03...9d9b7df7ff658d2e71f92ff93fe919d83ac79dab
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/20180528/2ee433cf/attachment-0001.html>
More information about the debian-med-commit
mailing list