Hi Raoul,
Thanks for the patches.
On 19/12/16 07:36, Ra wrote:
[PATCH] gnu: multiqc: Update to 0.8.
is [PATCH 1/2] for this message, sorry for the mistake.
Running multiqc without [PATCH 2/2] systems say that matplotlib
requires nose>=0.11.1, so I added it to the propagated inputs.
I notice that 0.9 is out too, so I tried updating to that version. I
also added "python-nose" as a native-input rather than a
propagated-input since it is only used at build time.
However, the tests fail with this error:
FileNotFoundError: [Errno 2] No such file or directory: 'git'
The check phase is still successful so it doesn't stop - this problem is
being fixed by others. I added a patch to ignore the FileNotFoundError,
but then after all that the tests fail. Would you mind investigating
further, perhaps by raising an issue on the multiqc GitHub? My efforts
so far are in the attached patch.
Thanks, ben.
>From d1c70ba0a701a31469dcae2b1a0efb624e5409d1 Mon Sep 17 00:00:00 2001
From: Ben Woodcroft
Date: Fri, 23 Dec 2016 22:13:33 +1000
Subject: [PATCH] gnu: multiqc: Update to 0.9.
* gnu/packages/bioinformatics.scm (multiqc): Update to 0.9.
[origin]: Add patch.
[arguments]: Run tests.
[native-inputs]: Add python-nose, multiqc-test-data.
* gnu/packages/patches/multiqc-fix-git-subprocess-error.patch: New file.
* gnu/local.mk (dist_patch_DATA): Add it.
---
gnu/local.mk | 1 +
gnu/packages/bioinformatics.scm| 28 --
.../patches/multiqc-fix-git-subprocess-error.patch | 15
3 files changed, 42 insertions(+), 2 deletions(-)
create mode 100644 gnu/packages/patches/multiqc-fix-git-subprocess-error.patch
diff --git a/gnu/local.mk b/gnu/local.mk
index ee8f1e591..bde8bc235 100644
--- a/gnu/local.mk
+++ b/gnu/local.mk
@@ -727,6 +727,7 @@ dist_patch_DATA = \
%D%/packages/patches/mpc123-initialize-ao.patch \
%D%/packages/patches/mplayer2-theora-fix.patch \
%D%/packages/patches/module-init-tools-moduledir.patch \
+ %D%/packages/patches/multiqc-fix-git-subprocess-error.patch \
%D%/packages/patches/mumps-build-parallelism.patch \
%D%/packages/patches/mupdf-build-with-openjpeg-2.1.patch \
%D%/packages/patches/mupen64plus-ui-console-notice.patch \
diff --git a/gnu/packages/bioinformatics.scm b/gnu/packages/bioinformatics.scm
index 912941e11..0cbbce1fc 100644
--- a/gnu/packages/bioinformatics.scm
+++ b/gnu/packages/bioinformatics.scm
@@ -7853,15 +7853,39 @@ replacement for strverscmp.")
(define-public multiqc
(package
(name "multiqc")
-(version "0.6")
+(version "0.9")
(source
(origin
(method url-fetch)
(uri (pypi-uri "multiqc" version))
(sha256
(base32
- "0avw11h63ldpxy5pizc3wl1wa01ha7q10wb240nggsjz3jaqvyiy"
+ "12gs1jw2jrxrij529rnl5kaqxfcqn15yzcsggxkfhdx634ml0cny"))
+ (patches (search-patches "multiqc-fix-git-subprocess-error.patch"
(build-system python-build-system)
+(arguments
+ `(#:phases
+ (modify-phases %standard-phases
+ (replace 'check
+ (lambda* (#:key inputs #:allow-other-keys)
+ (let ((data (assoc-ref inputs "multiqc-test-data")))
+ (setenv "PYTHONPATH"
+ (string-append (getcwd) ":" (getenv "PYTHONPATH")))
+ (with-directory-excursion data
+ (zero? (system* "python3" "-munittest" "discover")
+(native-inputs
+ `(("python-nose" ,python-nose)
+ ("multiqc-test-data"
+,(let ((commit "32bf18b4d7c46496ae50bfaf4c94a9df3afd0491"))
+ (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/ewels/MultiQC_TestData.git";)
+ (commit commit)))
+ (file-name (string-append "multiqc-test-data" commit "-checkout"))
+ (sha256
+ (base32
+ "079pcr6j2nk0v238qwsslgk480rv82xwsjyy4lf6v48l6zj4llm0")))
(propagated-inputs
`(("python-jinja2" ,python-jinja2)
("python-simplejson" ,python-simplejson)
diff --git a/gnu/packages/patches/multiqc-fix-git-subprocess-error.patch b/gnu/packages/patches/multiqc-fix-git-subprocess-error.patch
new file mode 100644
index 0..50807e2b7
--- /dev/null
+++ b/gnu/packages/patches/multiqc-fix-git-subprocess-error.patch
@@ -0,0 +1,15 @@
+Without this patch, the incorrect exception is caught when 'git' is not in PATH.
+
+diff --git a/multiqc/utils/config.py b/multiqc/utils/config.py
+index 01fa554..4a11793 100755
+--- a/multiqc/utils/config.py
b/multiqc/utils/config.py
+@@ -28,7 +28,7 @@ try:
+ git_hash = subprocess.check_output(['git', 'rev-parse', 'HEAD'], stderr=subprocess.STDOUT)
+ git_hash_short = git_hash[:7]
+ version = '{} ({})'.format(version, git_hash_short)
+-except subprocess.CalledProcessError:
++except (subprocess.CalledProcessError, FileNotFoundError):
+ pass
+ os.chdir(cwd)
+