From mboxrd@z Thu Jan 1 00:00:00 1970 From: Ben Woodcroft Subject: Fwd: Re: [PATCH 2/2] gnu: multiqc: Update to 0.8. Date: Fri, 23 Dec 2016 23:30:20 +1000 Message-ID: References: <9924251a-d60c-6fd0-66fe-91a313ac016a@uq.edu.au> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="------------5400A3296086B4A0E2775574" Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:43500) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cKPvj-0000Am-GL for guix-devel@gnu.org; Fri, 23 Dec 2016 08:30:41 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1cKPvf-0004Y0-30 for guix-devel@gnu.org; Fri, 23 Dec 2016 08:30:39 -0500 Received: from mailhub1.soe.uq.edu.au ([130.102.132.208]:42503 helo=newmailhub.uq.edu.au) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cKPve-0004VH-G8 for guix-devel@gnu.org; Fri, 23 Dec 2016 08:30:35 -0500 In-Reply-To: <9924251a-d60c-6fd0-66fe-91a313ac016a@uq.edu.au> List-Id: "Development of GNU Guix and the GNU System distribution." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-devel-bounces+gcggd-guix-devel=m.gmane.org@gnu.org Sender: "Guix-devel" To: "guix-devel@gnu.org" , Raoul Jean Pierre Bonnal This is a multi-part message in MIME format. --------------5400A3296086B4A0E2775574 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit 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. --------------5400A3296086B4A0E2775574 Content-Type: text/x-patch; name="0001-gnu-multiqc-Update-to-0.9.patch" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="0001-gnu-multiqc-Update-to-0.9.patch" >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 000000000..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) + -- 2.11.0 --------------5400A3296086B4A0E2775574--