From patchwork Wed Dec 13 21:56:30 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Nicolas Graves X-Patchwork-Id: 57580 Return-Path: X-Original-To: patchwork@mira.cbaines.net Delivered-To: patchwork@mira.cbaines.net Received: by mira.cbaines.net (Postfix, from userid 113) id 6993927BBE9; Wed, 13 Dec 2023 21:58:30 +0000 (GMT) X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-2.9 required=5.0 tests=BAYES_00,MAILING_LIST_MULTI, SPF_HELO_PASS,URIBL_BLOCKED autolearn=unavailable autolearn_force=no version=3.4.6 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mira.cbaines.net (Postfix) with ESMTPS id 1A8D127BBE2 for ; Wed, 13 Dec 2023 21:58:28 +0000 (GMT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rDXEo-0007s8-DO; Wed, 13 Dec 2023 16:57:54 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1rDXEj-0007qr-FH for guix-patches@gnu.org; Wed, 13 Dec 2023 16:57:49 -0500 Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1rDXEj-0000h6-71 for guix-patches@gnu.org; Wed, 13 Dec 2023 16:57:49 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1rDXEz-0003Vi-BD for guix-patches@gnu.org; Wed, 13 Dec 2023 16:58:05 -0500 X-Loop: help-debbugs@gnu.org Subject: [bug#67813] [PATCH 10/12] gnu: python-matplotlib: Update to 3.6.3. Resent-From: Nicolas Graves Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Wed, 13 Dec 2023 21:58:05 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 67813 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 67813@debbugs.gnu.org Cc: ngraves@ngraves.fr Received: via spool by 67813-submit@debbugs.gnu.org id=B67813.170250464713374 (code B ref 67813); Wed, 13 Dec 2023 21:58:05 +0000 Received: (at 67813) by debbugs.gnu.org; 13 Dec 2023 21:57:27 +0000 Received: from localhost ([127.0.0.1]:59809 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rDXEM-0003Tb-BO for submit@debbugs.gnu.org; Wed, 13 Dec 2023 16:57:27 -0500 Received: from 4.mo560.mail-out.ovh.net ([87.98.172.75]:43713) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rDXEI-0003T8-9q for 67813@debbugs.gnu.org; Wed, 13 Dec 2023 16:57:23 -0500 Received: from director5.ghost.mail-out.ovh.net (unknown [10.109.148.22]) by mo560.mail-out.ovh.net (Postfix) with ESMTP id EEB002B561 for <67813@debbugs.gnu.org>; Wed, 13 Dec 2023 21:57:04 +0000 (UTC) Received: from ghost-submission-6684bf9d7b-sschs (unknown [10.110.113.233]) by director5.ghost.mail-out.ovh.net (Postfix) with ESMTPS id A87C61FE4F; Wed, 13 Dec 2023 21:57:04 +0000 (UTC) Received: from ngraves.fr ([37.59.142.97]) by ghost-submission-6684bf9d7b-sschs with ESMTPSA id VbHkJrAoemWNAQAA7ygc7Q (envelope-from ); Wed, 13 Dec 2023 21:57:04 +0000 Authentication-Results: garm.ovh; auth=pass (GARM-97G002c659ccf5-b249-4e4f-8abc-fa4d1401fa2a, 883E2374CD84F629F690BC25EE7F4A5127ADD52F) smtp.auth=ngraves@ngraves.fr X-OVh-ClientIp: 81.67.140.142 Date: Wed, 13 Dec 2023 22:56:30 +0100 Message-ID: <20231213215635.15562-10-ngraves@ngraves.fr> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20231213215635.15562-1-ngraves@ngraves.fr> References: <20231213215635.15562-1-ngraves@ngraves.fr> MIME-Version: 1.0 X-Ovh-Tracer-Id: 2931843359817392866 X-VR-SPAMSTATE: OK X-VR-SPAMSCORE: 0 X-VR-SPAMCAUSE: gggruggvucftvghtrhhoucdtuddrgedvkedrudeljedgleegucetufdoteggodetrfdotffvucfrrhhofhhilhgvmecuqfggjfdpvefjgfevmfevgfenuceurghilhhouhhtmecuhedttdenucenucfjughrpefhvfevufffkffojghfggfgsedtkeertdertddtnecuhfhrohhmpefpihgtohhlrghsucfirhgrvhgvshcuoehnghhrrghvvghssehnghhrrghvvghsrdhfrheqnecuggftrfgrthhtvghrnhephfeilefgueefkeffkeeuvdevuefftdegvdfhfeelgeeukedtueffjeeitefgfeegnecuffhomhgrihhnpehgihhthhhusgdrtghomhdpghhnohhmvgdrohhrghenucfkphepuddvjedrtddrtddruddpkedurdeijedrudegtddrudegvddpfeejrdehledrudegvddrleejnecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehinhgvthepuddvjedrtddrtddruddpmhgrihhlfhhrohhmpeeonhhgrhgrvhgvshesnhhgrhgrvhgvshdrfhhrqedpnhgspghrtghpthhtohepuddprhgtphhtthhopeeijeekudefseguvggssghughhsrdhgnhhurdhorhhgpdfovfetjfhoshhtpehmohehiedtpdhmohguvgepshhmthhpohhuth X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-to: Nicolas Graves X-ACL-Warn: , Nicolas Graves via Guix-patches X-Patchwork-Original-From: Nicolas Graves via Guix-patches via From: Nicolas Graves Errors-To: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org Sender: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org X-getmail-retrieved-from-mailbox: Patches * gnu/packages/python-xyz.scm (python-matplotlib): Update to 3.6.3. [build-system]: Use pyproject-build-system. [arguments] (test-flags): Add proper test-flag. (phases): Delete phases pretend-version, fix-and-disable-failing-tests. Add phase mark-image-comparisons. Simplify phase configure-environment. Delete check replacement phase. [propagated-inputs]: Add python-contourpy. --- gnu/packages/python-xyz.scm | 92 ++++++++++++------------------------- 1 file changed, 30 insertions(+), 62 deletions(-) diff --git a/gnu/packages/python-xyz.scm b/gnu/packages/python-xyz.scm index fd9e404f0b..8ad0ee4f9a 100644 --- a/gnu/packages/python-xyz.scm +++ b/gnu/packages/python-xyz.scm @@ -174,6 +174,7 @@ (define-module (gnu packages python-xyz) #:use-module (gnu packages base) #:use-module (gnu packages bash) #:use-module (gnu packages bdw-gc) + #:use-module (gnu packages build-tools) #:use-module (gnu packages check) #:use-module (gnu packages cmake) #:use-module (gnu packages compression) @@ -8059,26 +8060,37 @@ (define-public python-proto-matcher (define-public python-matplotlib (package (name "python-matplotlib") - (version "3.5.2") + (version "3.6.3") (source (origin (method url-fetch) (uri (pypi-uri "matplotlib" version)) (sha256 - (base32 "18h78s5ld1i6mz00w258hy29909nfr3ddq6ry9kq18agw468bks8")))) - (build-system python-build-system) + (base32 "1jdq7hsmcay1z2ghdf9gjl3zys1gjvj4wm2jv465cxqngdq6jk8z")))) + (build-system pyproject-build-system) (arguments (list + #:test-flags + #~(list "--exitfirst" + "-n" (number->string (parallel-job-count)) + "-o" "markers=image_comparison" + "-m" "not network and not image_comparison" + "--pyargs" "matplotlib" + "-k" (string-append + "not test_failing_ffmpeg " + "and not test_normal_axes " + "and not test_hidden_axes " + "and not test_compressed1 " + "and not test_get_tightbbox_polar " + "and not test_warn_big_data_best_loc " + "and not test_outward_ticks " + ;; The 'test_lazy_auto_backend_selection' fails + ;; because it would require an X server; skip it. + "and not test_lazy_auto_backend_selection ")) #:phases #~(modify-phases %standard-phases - (add-before 'build 'pretend-version - ;; The version string is usually derived via setuptools-scm, but - ;; without the git metadata available, the version string is set to - ;; '0.0.0'. - (lambda _ - (setenv "SETUPTOOLS_SCM_PRETEND_VERSION" #$version))) - (add-after 'unpack 'fix-and-disable-failing-tests - ;; XXX: Disable all image comparison tests because we're using a + (add-after 'unpack 'mark-image-comparisons + ;; XXX: Mark all image comparison tests because we're using a ;; newer version of FreeType than matplotlib expects. This leads ;; to minor differences throughout the tests. (lambda _ @@ -8090,37 +8102,15 @@ (define-public python-matplotlib (string-append "import pytest\n" match)) (("( *)@([^_]+_)*(image_comparison|check_figures_equal)" match indent) - (string-append indent "@pytest.mark.skip(\ -reason=\"unknown minor image differences\")\n" match))) - (substitute* "lib/matplotlib/tests/test_animation.py" - (("/bin/sh") (which "sh"))) - (for-each delete-file - ;; test_normal_axes, test_get_tightbbox_polar - '("lib/matplotlib/tests/test_axes.py" - "lib/matplotlib/tests/test_polar.py" - ;; We don't use the webagg backend and this test - ;; forces it. - "lib/matplotlib/tests/test_backend_webagg.py" - ;; test_outward_ticks - "lib/matplotlib/tests/test_tightlayout.py" - ;; test_hidden_axes fails with minor extent - ;; differences, possibly due to the use of a - ;; different version of FreeType. - "lib/matplotlib/tests/test_constrainedlayout.py" - ;; Fontconfig returns no fonts. - "lib/matplotlib/tests/test_font_manager.py" - ;; The images comparison test fails - ;; non-deterministically when run in parallel (see: - ;; https://github.com/matplotlib/matplotlib/issues/22992). - "lib/matplotlib/tests/test_compare_images.py")))) + (string-append indent "@pytest.mark.image_comparison\n" match))))) (add-before 'build 'configure-environment - (lambda* (#:key inputs #:allow-other-keys) + (lambda _ ;; Fix rounding errors when using the x87 FPU. (when (string-prefix? "i686" #$(%current-system)) (setenv "CFLAGS" "-ffloat-store")) - (call-with-output-file "mplsetup.cfg" - (lambda (port) - (format port "\ + (with-output-to-file "mplsetup.cfg" + (lambda - + (display "\ [libs] system_freetype = true system_qhull = true @@ -8128,35 +8118,13 @@ (define-public python-matplotlib [rc_options] backend=Agg -[directories] -basedirlist = ~a,~a - [packages] -tests = True~%" (assoc-ref inputs "tcl") (assoc-ref inputs "tk")))))) - (replace 'check - (lambda* (#:key tests? #:allow-other-keys) - (when tests? - ;; Step out of the source directory to avoid interference. - (with-directory-excursion "/tmp" - ;; Run the installed tests, which is what we want since not - ;; everything gets built in the source directory. - (invoke "pytest" - "-n" (number->string (parallel-job-count)) - "-m" "not network" "--pyargs" "matplotlib" - "-k" - (string-append - ;; The 'test_lazy_auto_backend_selection' fails - ;; because it would require an X server; skip it. - "not test_lazy_auto_backend_selection" - ;; test_getattr fails for the GTK backend because - ;; of an unexpected warning from Python 3.10 - ;; (via the gi module): - ;; https://gitlab.gnome.org/GNOME/pygobject/-/issues/494 - " and not test_getattr"))))))))) +tests = True")))))))) (propagated-inputs (list gobject-introspection python-cairocffi python-certifi + python-contourpy python-cycler python-dateutil python-fonttools-minimal