Subject: [PATCH] python: Honor '--cores=...' in tests.

From: Eric Bavier <[email-masked]>
Date: Mon, 5 Nov 2018 20:23:44 -0600

Hello Guix,

I noticed building 'python-minimal' that its tests seemed to have poor
memory performance, i.e. using *a lot* of RAM.  I thought maybe
dropping --cores=... would help, but it did not; the tests use all
available cores by default.  The attached patch fixes this issue,
though, the package still uses all cores while building some extension
libraries.

I suppose this patch would go to core-updates?

Cheers,
`~Eric
From 076d2f7f32a51f90f85be3da836d208987e9c678 Mon Sep 17 00:00:00 2001
From: Eric Bavier <[email-masked]>
Date: Thu, 1 Nov 2018 21:18:41 -0500
Subject: [PATCH] python: Honor '--cores=...' in tests.

* gnu/packages/python.scm (python-2.7)[arguments]: Add #:make-flags.
---
 gnu/packages/python.scm | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/gnu/packages/python.scm b/gnu/packages/python.scm
index fbb280224..9a8b9dfcf 100644
--- a/gnu/packages/python.scm
+++ b/gnu/packages/python.scm
@@ -206,6 +206,9 @@
              "--enable-unicode=ucs4"
              (string-append "LDFLAGS=-Wl,-rpath="
                             (assoc-ref %outputs "out") "/lib"))
+       ;; With no -j argument tests use all available cpus, so provide one.
+       #:make-flags
+       (list (format #f "EXTRATESTOPTS=-j~d" (parallel-job-count)))
 
         #:modules ((ice-9 ftw) (ice-9 match)
                    (guix build utils) (guix build gnu-build-system))
-- 
2.19.1