From mboxrd@z Thu Jan 1 00:00:00 1970 From: Thomas Danckaert Subject: [PATCH] gnu: python-matplotlib: Don't propagate python-numpy-bootstrap. Date: Fri, 27 Jan 2017 16:05:09 +0100 (CET) Message-ID: <20170127.160509.2073167591783697985.post@thomasdanckaert.be> Mime-Version: 1.0 Content-Type: Multipart/Mixed; boundary="--Next_Part(Fri_Jan_27_16_05_09_2017_688)--" Content-Transfer-Encoding: 7bit Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:52733) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cX85i-0005Wt-3Q for guix-devel@gnu.org; Fri, 27 Jan 2017 10:05:36 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1cX85e-0005M3-OV for guix-devel@gnu.org; Fri, 27 Jan 2017 10:05:30 -0500 Received: from s02-out.spamexperts.axc.nl ([159.253.1.2]:37625 helo=s02.spamexperts.axc.nl) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1cX85e-0005K1-GY for guix-devel@gnu.org; Fri, 27 Jan 2017 10:05:26 -0500 Received: from vserver42.axc.nl ([159.253.0.80]) by s02.spamexperts.axc.nl with esmtps (TLSv1.2:ECDHE-RSA-AES256-GCM-SHA384:256) (Exim 4.86) (envelope-from ) id 1cX85V-00021I-IE for guix-devel@gnu.org; Fri, 27 Jan 2017 16:05:19 +0100 Received: from mail.axc.nl ([159.253.0.157]:57409) by vserver42.axc.nl with esmtp (Exim 4.87) (envelope-from ) id 1cX85T-0006tf-2t for guix-devel@gnu.org; Fri, 27 Jan 2017 16:05:15 +0100 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 ----Next_Part(Fri_Jan_27_16_05_09_2017_688)-- Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit Hi, when a profile contains both python-numpy and python-matplotlib (either installed directly or by propagation, e.g. when from python-ipython), a lot of warnings about conflicts between python-numpy and python-nympy-bootstrap appear, because matplotlib propagates its python-numpy-bootstrap dependency. This patch works around it by creating an intermediate python-matplotlib-bootstrap package as well, which is then used as a native input to generate the documentation of python-numpy. python-numpy is then used as a propagated input of python-matplotlib, so python-numpy-bootstrap doesn't appear in user's profiles anymore. What do you think? Thomas ----Next_Part(Fri_Jan_27_16_05_09_2017_688)-- Content-Type: Text/X-Patch; charset=us-ascii Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="0001-gnu-python-matplotlib-Don-t-propagate-python-numpy-b.patch" >From 56a9c4d0f86308fe7bdec1345998c0142c444a4b Mon Sep 17 00:00:00 2001 From: Thomas Danckaert Date: Fri, 27 Jan 2017 12:12:42 +0100 Subject: [PATCH] gnu: python-matplotlib: Don't propagate python-numpy-bootstrap. * gnu/packages/python.scm (python-matplotlib-bootstrap,python2-matplotlib-bootstrap): New variables. (python-matplotlib, python2-matplotlib) [propagated-inputs]: Use python-numpy instead of python-numpy-bootstrap. (python-numpy, python2-numpy) [propagated-inputs,native-inputs]: Replace matplotlib by native inputs matplotlib-bootstrap. --- gnu/packages/python.scm | 21 ++++++++++++++++----- 1 file changed, 16 insertions(+), 5 deletions(-) diff --git a/gnu/packages/python.scm b/gnu/packages/python.scm index 1a56008a6..73a940548 100644 --- a/gnu/packages/python.scm +++ b/gnu/packages/python.scm @@ -3404,11 +3404,11 @@ association studies (GWAS) on extremely large data sets.") `(("which" ,which) ,@(package-inputs python-numpy-bootstrap))) (propagated-inputs - `(("python-matplotlib" ,python-matplotlib) - ("python-pyparsing" ,python-pyparsing) + `(("python-pyparsing" ,python-pyparsing) ,@(package-propagated-inputs python-numpy-bootstrap))) (native-inputs `(("pkg-config" ,pkg-config) + ("python-matplotlib" ,python-matplotlib-bootstrap) ; to build documentation ("python-sphinx" ,python-sphinx) ("python-numpydoc" ,python-numpydoc) ("texlive" ,texlive) @@ -3458,7 +3458,11 @@ association studies (GWAS) on extremely large data sets.") ,phases))))))) (define-public python2-numpy - (package-with-python2 python-numpy)) + (let ((numpy (package-with-python2 python-numpy))) + (package (inherit numpy) + (native-inputs + `(("python-matplotlib" ,python2-matplotlib-bootstrap) + ,@(alist-delete "python-matplotlib" (package-native-inputs numpy))))))) (define-public python-pygit2 (package @@ -3623,7 +3627,7 @@ transcendental functions).") ("gobject-introspection" ,gobject-introspection) ("python-tkinter" ,python "tk") ("python-dateutil" ,python-dateutil-2) - ("python-numpy" ,python-numpy-bootstrap) + ("python-numpy" ,python-numpy) ("python-pillow" ,python-pillow) ("python-pytz" ,python-pytz) ("python-six" ,python-six) @@ -3740,8 +3744,15 @@ toolkits.") `(("python2-pycairo" ,python2-pycairo) ("python2-pygobject-2" ,python2-pygobject-2) ("python2-tkinter" ,python-2 "tk") + ("python2-numpy" ,python2-numpy) ,@(fold alist-delete (package-propagated-inputs matplotlib) - '("python-pycairo" "python-pygobject" "python-tkinter"))))))) + '("python-pycairo" "python-pygobject" "python-tkinter" "python-numpy"))))))) + +(define python-matplotlib-bootstrap + ((package-input-rewriting `((,python-numpy . ,python-numpy-bootstrap))) python-matplotlib)) + +(define python2-matplotlib-bootstrap + ((package-input-rewriting `((,python2-numpy . ,python2-numpy-bootstrap))) python2-matplotlib)) (define-public python2-pysnptools (package -- 2.11.0 ----Next_Part(Fri_Jan_27_16_05_09_2017_688)----