all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Nicolas Graves via Guix-patches via <guix-patches@gnu.org>
To: 67813@debbugs.gnu.org
Cc: ngraves@ngraves.fr
Subject: [bug#67813] [PATCH 10/12] gnu: python-matplotlib: Update to 3.6.3.
Date: Wed, 13 Dec 2023 22:56:30 +0100	[thread overview]
Message-ID: <20231213215635.15562-10-ngraves@ngraves.fr> (raw)
In-Reply-To: <20231213215635.15562-1-ngraves@ngraves.fr>

* 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
-- 
2.41.0





  parent reply	other threads:[~2023-12-13 21:58 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-12-13 14:39 [bug#67813] [PATCH 00/12] Update python-pandas to version 2.1.1 Nicolas Graves via Guix-patches via
2023-12-13 21:56 ` [bug#67813] [PATCH 01/12] gnu: meson/newer: Update to 1.2.1 Nicolas Graves via Guix-patches via
2023-12-13 21:56   ` [bug#67813] [PATCH 02/12] gnu: meson-python: Update to 0.13.1 Nicolas Graves via Guix-patches via
2023-12-13 21:56   ` [bug#67813] [PATCH 03/12] gnu: python-cython: Update to 0.29.33 Nicolas Graves via Guix-patches via
2023-12-13 21:56   ` [bug#67813] [PATCH 04/12] gnu: python-pyproject-metadata: Update to 0.7.1 Nicolas Graves via Guix-patches via
2023-12-13 21:56   ` [bug#67813] [PATCH 05/12] gnu: Add python-tzdata Nicolas Graves via Guix-patches via
2023-12-13 21:56   ` [bug#67813] [PATCH 06/12] gnu: python-jinja2: Update to 3.1.2 Nicolas Graves via Guix-patches via
2023-12-13 21:56   ` [bug#67813] [PATCH 07/12] gnu: python-pytest-xdist: Use pyproject-build-system Nicolas Graves via Guix-patches via
2023-12-13 21:56   ` [bug#67813] [PATCH 08/12] gnu: python-openpyxl: Update to 3.0.10 Nicolas Graves via Guix-patches via
2023-12-13 21:56   ` [bug#67813] [PATCH 09/12] gnu: Add python-contourpy Nicolas Graves via Guix-patches via
2023-12-13 21:56   ` Nicolas Graves via Guix-patches via [this message]
2023-12-13 21:56   ` [bug#67813] [PATCH 11/12] gnu: Add python-pytest-next Nicolas Graves via Guix-patches via
2023-12-13 21:56   ` [bug#67813] [PATCH 12/12] gnu: python-pandas: Update to 2.1.1 Nicolas Graves via Guix-patches via
2024-01-11  9:52 ` [bug#67813] [PATCH 00/12] Update python-pandas to version 2.1.1 Ricardo Wurmus
2024-02-04  2:36   ` Nicolas Graves via Guix-patches via

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20231213215635.15562-10-ngraves@ngraves.fr \
    --to=guix-patches@gnu.org \
    --cc=67813@debbugs.gnu.org \
    --cc=ngraves@ngraves.fr \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/guix.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.