[PATCH 00/12] Update python-pandas to version 2.1.1.

  • Open
  • quality assurance status badge
Details
2 participants
  • Nicolas Graves
  • Ricardo Wurmus
Owner
unassigned
Submitted by
Nicolas Graves
Severity
normal
N
N
Nicolas Graves wrote on 13 Dec 2023 15:39
[PATCH 00/12] Update python-pandas to version 2.1.1.
(address . guix-patches@gnu.org)(address . ngraves@ngraves.fr)
20231213143919.12153-1-ngraves@ngraves.fr
This patch series updates python-pandas to version 2.1.1. The current
pandas version is vastly outdated and that is not good for guix in
data science. This update however requires an update of the version of
meson, which will trigger a vast number of rebuilds, so this should
probably go to core-updates.

Nicolas Graves (12):
gnu: meson/newer: Update to 1.2.1.
gnu: meson-python: Update to 0.13.1.
gnu: python-cython: Update to 0.29.33.
gnu: python-pyproject-metadata: Update to 0.7.1.
gnu: Add python-tzdata.
gnu: python-jinja2: Update to 3.1.2.
gnu: python-pytest-xdist: Use pyproject-build-system.
gnu: python-openpyxl: Update to 3.0.10.
gnu: Add python-contourpy.
gnu: python-matplotlib: Update to 3.6.3.
gnu: Add python-pytest-next.
gnu: python-pandas: Update to 2.1.1.

gnu/packages/build-tools.scm | 15 ++-
gnu/packages/check.scm | 24 +++--
gnu/packages/python-science.scm | 132 ++++++++++++++------------
gnu/packages/python-xyz.scm | 160 +++++++++++++++-----------------
gnu/packages/time.scm | 17 ++++
5 files changed, 183 insertions(+), 165 deletions(-)

--
2.41.0
N
N
Nicolas Graves wrote on 13 Dec 2023 22:56
[PATCH 01/12] gnu: meson/newer: Update to 1.2.1.
(address . 67813@debbugs.gnu.org)(address . ngraves@ngraves.fr)
20231213215635.15562-1-ngraves@ngraves.fr
* gnu/packages/build-tools.scm (meson/newer): Update to 1.2.1.
---
gnu/packages/build-tools.scm | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)

Toggle diff (24 lines)
diff --git a/gnu/packages/build-tools.scm b/gnu/packages/build-tools.scm
index 9e6ed6eec6..a03939d48e 100644
--- a/gnu/packages/build-tools.scm
+++ b/gnu/packages/build-tools.scm
@@ -333,7 +333,7 @@ (define-public meson
(define-public meson/newer
(package
(inherit meson)
- (version "1.1.1")
+ (version "1.2.1")
(source (origin
(method url-fetch)
(uri (string-append "https://github.com/mesonbuild/meson/"
@@ -341,7 +341,7 @@ (define-public meson/newer
version ".tar.gz"))
(sha256
(base32
- "073vf8059nzs6p5aaqr5wva4pgl81540szdb5yw9yhyajwgm8jyh"))))))
+ "1x9rnrbwvzhnzmz4zqag44w06khks8wckcajxsbr8m4760akmnxi"))))))
(define-public meson-python
(package
--
2.41.0
N
N
Nicolas Graves wrote on 13 Dec 2023 22:56
[PATCH 04/12] gnu: python-pyproject-metadata: Update to 0.7.1.
(address . 67813@debbugs.gnu.org)(address . ngraves@ngraves.fr)
20231213215635.15562-4-ngraves@ngraves.fr
* gnu/packages/python-xyz.scm (python-pyproject-metadata): Update to 0.7.1.
---
gnu/packages/python-xyz.scm | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)

Toggle diff (24 lines)
diff --git a/gnu/packages/python-xyz.scm b/gnu/packages/python-xyz.scm
index 50566eee8f..0f4b8454ad 100644
--- a/gnu/packages/python-xyz.scm
+++ b/gnu/packages/python-xyz.scm
@@ -12717,7 +12717,7 @@ (define-public python-pep517
(define-public python-pyproject-metadata
(package
(name "python-pyproject-metadata")
- (version "0.6.1")
+ (version "0.7.1")
(source
(origin
(method git-fetch)
@@ -12727,7 +12727,7 @@ (define-public python-pyproject-metadata
(file-name (git-file-name name version))
(sha256
(base32
- "00zahgw9zjfqwf0218bj5k732aibnn68cq1p8f0wmbirb7fy5k31"))))
+ "0yvs59ymz5gdix34a95wxlxvk9bnvjgrzsnmnc3ws7whpfv3yasm"))))
(build-system pyproject-build-system)
(propagated-inputs (list python-packaging))
(native-inputs (list python-pypa-build python-pytest python-tomli))
--
2.41.0
N
N
Nicolas Graves wrote on 13 Dec 2023 22:56
[PATCH 02/12] gnu: meson-python: Update to 0.13.1.
(address . 67813@debbugs.gnu.org)(address . ngraves@ngraves.fr)
20231213215635.15562-2-ngraves@ngraves.fr
* gnu/packages/build-tools.scm (meson-python): Update to 0.13.1.
[arguments](build-backend): Remove unnecessary keyword.
[propagated-inputs]: Replace meson by meson/newer.
---
gnu/packages/build-tools.scm | 11 ++++-------
1 file changed, 4 insertions(+), 7 deletions(-)

Toggle diff (35 lines)
diff --git a/gnu/packages/build-tools.scm b/gnu/packages/build-tools.scm
index a03939d48e..d37c2d2761 100644
--- a/gnu/packages/build-tools.scm
+++ b/gnu/packages/build-tools.scm
@@ -346,24 +346,21 @@ (define-public meson/newer
(define-public meson-python
(package
(name "meson-python")
- (version "0.12.1")
+ (version "0.13.1")
(source (origin
(method url-fetch)
(uri (pypi-uri "meson_python" version))
(sha256
(base32
- "1hpjw9qj6ff8ixjs0pz7qysc8v57jxgaf5n1p6bqm9bh3mc3wnrx"))))
+ "063n7jg0k83bsd07rvcfzwjqklnba68dpnpy9kx44p220401gcv3"))))
(build-system pyproject-build-system)
(arguments
- ;; The project is configured to use itself to build ('mesonpy') and fails;
- ;; use another PEP 517 build system.
- (list #:build-backend "setuptools.build_meta"
- #:test-flags #~(list "tests"
+ (list #:test-flags #~(list "tests"
;; The test_pep518 tries to install
;; dependencies from the network using pip.
"-k" "not test_pep518")))
(propagated-inputs
- (list meson
+ (list meson/newer
ninja
python-colorama
python-pyproject-metadata
--
2.41.0
N
N
Nicolas Graves wrote on 13 Dec 2023 22:56
[PATCH 03/12] gnu: python-cython: Update to 0.29.33.
(address . 67813@debbugs.gnu.org)(address . ngraves@ngraves.fr)
20231213215635.15562-3-ngraves@ngraves.fr
* gnu/packages/python-xyz.scm (python-cython): Update to 0.29.33.
---
gnu/packages/python-xyz.scm | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)

Toggle diff (22 lines)
diff --git a/gnu/packages/python-xyz.scm b/gnu/packages/python-xyz.scm
index 86f8d81689..50566eee8f 100644
--- a/gnu/packages/python-xyz.scm
+++ b/gnu/packages/python-xyz.scm
@@ -7206,13 +7206,13 @@ (define-public mallard-ducktype
(define-public python-cython
(package
(name "python-cython")
- (version "0.29.32")
+ (version "0.29.33")
(source
(origin
(method url-fetch)
(uri (pypi-uri "Cython" version))
(sha256
- (base32 "1xqsihpqnfal29nb5kmw8z71nd4jbsnbz7p3lkr094xpb13wycw7"))))
+ (base32 "0si8f96kyk7ljrmjrffsjm4i8n5fs7q29nlmldjfjb2d9967ch2h"))))
(build-system python-build-system)
;; we need the full python package and not just the python-wrapper
;; because we need libpython3.3m.so
--
2.41.0
N
N
Nicolas Graves wrote on 13 Dec 2023 22:56
[PATCH 05/12] gnu: Add python-tzdata.
(address . 67813@debbugs.gnu.org)(address . ngraves@ngraves.fr)
20231213215635.15562-5-ngraves@ngraves.fr
* gnu/packages/time.scm (python-tzdata): New variable.
---
gnu/packages/time.scm | 17 +++++++++++++++++
1 file changed, 17 insertions(+)

Toggle diff (30 lines)
diff --git a/gnu/packages/time.scm b/gnu/packages/time.scm
index 5c8f65a1e6..64772258ad 100644
--- a/gnu/packages/time.scm
+++ b/gnu/packages/time.scm
@@ -337,6 +337,23 @@ (define-public python-timezonefinder
timezone for given coordinates on earth entirely offline.")
(license expat)))
+(define-public python-tzdata
+ (package
+ (name "python-tzdata")
+ (version "2023.3")
+ (source
+ (origin
+ (method url-fetch)
+ (uri (pypi-uri "tzdata" version))
+ (sha256
+ (base32 "0fksj1gcr54yqvwiplnb9bg775k5v82vxcdxjm7hvjsawl41xvqi"))))
+ (build-system pyproject-build-system)
+ (arguments '(#:tests? #f)) ; No tests.
+ (home-page "https://github.com/python/tzdata")
+ (synopsis "Provider of IANA time zone data")
+ (description "This package provides IANA time zone data.")
+ (license asl2.0)))
+
(define-public python-tzlocal
(package
(name "python-tzlocal")
--
2.41.0
N
N
Nicolas Graves wrote on 13 Dec 2023 22:56
[PATCH 06/12] gnu: python-jinja2: Update to 3.1.2.
(address . 67813@debbugs.gnu.org)(address . ngraves@ngraves.fr)
20231213215635.15562-6-ngraves@ngraves.fr
* gnu/packages/python-xyz.scm (python-jinja2): Update to 3.1.2. Format.
[build-system]: Use pyproject-build-system.
[arguments]: Remove uneeded argument.
---
gnu/packages/python-xyz.scm | 16 +++-------------
1 file changed, 3 insertions(+), 13 deletions(-)

Toggle diff (44 lines)
diff --git a/gnu/packages/python-xyz.scm b/gnu/packages/python-xyz.scm
index 0f4b8454ad..a13ed2ab52 100644
--- a/gnu/packages/python-xyz.scm
+++ b/gnu/packages/python-xyz.scm
@@ -5531,26 +5531,17 @@ (define-public python-markupsafe
for Python.")
(license license:bsd-3)))
-
(define-public python-jinja2
(package
(name "python-jinja2")
- (version "3.1.1")
+ (version "3.1.2")
(source
(origin
(method url-fetch)
(uri (pypi-uri "Jinja2" version))
(sha256
- (base32
- "1saawzys14l1p4kafs7hkihmnvqjq8fwxjmkjiqx3jq1nm5ys2v4"))))
- (build-system python-build-system)
- (arguments
- '(#:phases (modify-phases %standard-phases
- (replace 'check
- (lambda* (#:key tests? #:allow-other-keys)
- (if tests?
- (invoke "pytest" "-vv")
- (format #t "test suite not run~%")))))))
+ (base32 "0lp86yadzf8dph67f6g3yxmvnhrzzi863z58jmsrx2j059q1ld9i"))))
+ (build-system pyproject-build-system)
(native-inputs (list python-pytest))
(propagated-inputs (list python-markupsafe))
(home-page "https://jinja.palletsprojects.com/")
@@ -5560,7 +5551,6 @@ (define-public python-jinja2
written in pure Python.")
(license license:bsd-3)))
-
(define-public python-jinja2-time
(package
(name "python-jinja2-time")
--
2.41.0
N
N
Nicolas Graves wrote on 13 Dec 2023 22:56
[PATCH 07/12] gnu: python-pytest-xdist: Use pyproject-build-system.
(address . 67813@debbugs.gnu.org)(address . ngraves@ngraves.fr)
20231213215635.15562-7-ngraves@ngraves.fr
* gnu/packages/check.scm (python-pytest-xdist): Use pyproject-build-system.
---
gnu/packages/check.scm | 10 +---------
1 file changed, 1 insertion(+), 9 deletions(-)

Toggle diff (23 lines)
diff --git a/gnu/packages/check.scm b/gnu/packages/check.scm
index 5181d3a164..8d1f0f8c2c 100644
--- a/gnu/packages/check.scm
+++ b/gnu/packages/check.scm
@@ -1664,15 +1664,7 @@ (define-public python-pytest-xdist
(sha256
(base32
"1psf5dqxvc38qzxvc305mkg5xpdmdkbkkfiyqlmdnkgh7z5dx025"))))
- (build-system python-build-system)
- (arguments
- '(#:phases
- (modify-phases %standard-phases
- (replace 'check
- (lambda* (#:key tests? #:allow-other-keys)
- (when tests?
- (invoke "pytest" "-vv"
- "-n" (number->string (parallel-job-count)))))))))
+ (build-system pyproject-build-system)
(native-inputs (list python-setuptools-scm python-filelock python-pytest))
(propagated-inputs (list python-execnet python-pytest-forked))
(home-page "https://github.com/pytest-dev/pytest-xdist")
--
2.41.0
N
N
Nicolas Graves wrote on 13 Dec 2023 22:56
[PATCH 08/12] gnu: python-openpyxl: Update to 3.0.10.
(address . 67813@debbugs.gnu.org)(address . ngraves@ngraves.fr)
20231213215635.15562-8-ngraves@ngraves.fr
* gnu/packages/python-xyz.scm (python-openpyxl): Update to 3.0.10.
[build-system]: Use pyproject-build-system.
[arguments]: Delete check phase replacement.

Change-Id: I1a537050f1e9f109189150d0d73e87bbd87dcb00
---
gnu/packages/python-xyz.scm | 11 +++--------
1 file changed, 3 insertions(+), 8 deletions(-)

Toggle diff (31 lines)
diff --git a/gnu/packages/python-xyz.scm b/gnu/packages/python-xyz.scm
index a13ed2ab52..2cc687547a 100644
--- a/gnu/packages/python-xyz.scm
+++ b/gnu/packages/python-xyz.scm
@@ -3541,7 +3541,7 @@ (define-public python-omero-py
(define-public python-openpyxl
(package
(name "python-openpyxl")
- (version "3.0.9")
+ (version "3.0.10")
(source
(origin
;; We use the upstream repository, as the tests are not included in the
@@ -3552,13 +3552,8 @@ (define-public python-openpyxl
(changeset version)))
(file-name (string-append name "-" version "-checkout"))
(sha256
- (base32 "1p8xvc2gjw6zyzbd7qdvc3x178sm00ymrbyh9539l4fpzgxh0j9c"))))
- (build-system python-build-system)
- (arguments
- `(#:phases (modify-phases %standard-phases
- (replace 'check
- (lambda _
- (invoke "pytest"))))))
+ (base32 "0f8ym32vdn8wyziiy5bz8iiwvgj7dlccy86wkfcn5syqgivgqnv9"))))
+ (build-system pyproject-build-system)
(native-inputs (list python-lxml python-pillow python-pytest))
(propagated-inputs (list python-et-xmlfile python-jdcal))
(home-page "https://openpyxl.readthedocs.io")
--
2.41.0
N
N
Nicolas Graves wrote on 13 Dec 2023 22:56
[PATCH 09/12] gnu: Add python-contourpy.
(address . 67813@debbugs.gnu.org)(address . ngraves@ngraves.fr)
20231213215635.15562-9-ngraves@ngraves.fr
* gnu/packages/python-xyz.scm (python-contourpy): New variable.
---
gnu/packages/python-xyz.scm | 33 +++++++++++++++++++++++++++++++++
1 file changed, 33 insertions(+)

Toggle diff (46 lines)
diff --git a/gnu/packages/python-xyz.scm b/gnu/packages/python-xyz.scm
index 2cc687547a..fd9e404f0b 100644
--- a/gnu/packages/python-xyz.scm
+++ b/gnu/packages/python-xyz.scm
@@ -16296,6 +16296,39 @@ (define-public python-texttable
tables.")
(license license:expat)))
+(define-public python-contourpy
+ (package
+ (name "python-contourpy")
+ (version "1.1.1")
+ (source
+ (origin
+ (method url-fetch)
+ (uri (pypi-uri "contourpy" version))
+ (sha256
+ (base32 "1az80zv067rcybm5x93j7rfiakbwiv1h8l58gnki4wjbwb13gfln"))))
+ (build-system pyproject-build-system)
+ (arguments
+ ;; Image tests require matplotlib and create a circular dependency.
+ (list #:test-flags
+ #~(list "-m" "not image")))
+ (propagated-inputs
+ (list python-numpy))
+ (native-inputs
+ (list cmake
+ meson-python
+ pkg-config
+ pybind11
+ python-pytest
+ python-pytest-cov
+ python-wurlitzer))
+ (home-page "https://github.com/contourpy/contourpy")
+ (synopsis
+ "Python library for calculating contours of 2D quadrilateral grids")
+ (description
+ "This package provide a python library for calculating contours of 2D
+quadrilateral grids.")
+ (license license:bsd-3)))
+
(define-public python-atomicwrites
(package
(name "python-atomicwrites")
--
2.41.0
N
N
Nicolas Graves wrote on 13 Dec 2023 22:56
[PATCH 10/12] gnu: python-matplotlib: Update to 3.6.3.
(address . 67813@debbugs.gnu.org)(address . ngraves@ngraves.fr)
20231213215635.15562-10-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(-)

Toggle diff (144 lines)
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
N
N
Nicolas Graves wrote on 13 Dec 2023 22:56
[PATCH 11/12] gnu: Add python-pytest-next.
(address . 67813@debbugs.gnu.org)(address . ngraves@ngraves.fr)
20231213215635.15562-11-ngraves@ngraves.fr
* gnu/packages/check.scm (python-pytest-next): New variable.
---
gnu/packages/check.scm | 14 ++++++++++++++
1 file changed, 14 insertions(+)

Toggle diff (27 lines)
diff --git a/gnu/packages/check.scm b/gnu/packages/check.scm
index 8d1f0f8c2c..22bbfde0bb 100644
--- a/gnu/packages/check.scm
+++ b/gnu/packages/check.scm
@@ -1339,6 +1339,20 @@ (define-public python-pytest
and many external plugins.")
(license license:expat)))
+(define-public python-pytest-next
+ (package/inherit python-pytest
+ (name "python-pytest")
+ (version "7.3.2")
+ (source
+ (origin
+ (method url-fetch)
+ (uri (pypi-uri "pytest" version))
+ (sha256
+ (base32 "02q32y67nflrmk9snmibq5kmqcbgfm29k9wm0yw0ia2vqly0m6gf"))))
+ (propagated-inputs
+ (modify-inputs (package-propagated-inputs python-pytest)
+ (append python-exceptiongroup)))))
+
(define-deprecated python-pytest-6 python-pytest)
(export python-pytest-6)
--
2.41.0
N
N
Nicolas Graves wrote on 13 Dec 2023 22:56
[PATCH 12/12] gnu: python-pandas: Update to 2.1.1.
(address . 67813@debbugs.gnu.org)(address . ngraves@ngraves.fr)
20231213215635.15562-12-ngraves@ngraves.fr
* gnu/packages/python-science.scm (python-pandas): Update to 2.1.1.
[source]: Use git origin.
[build-system]: Use pyproject-build-system.
[arguments]:
(modules): Remove argument.
(test-flags): Add required test flags.
(phases): Add phase version-set-by-guix and pre-check.
Remove phase enable-parallel-build. Remove check phase
replacement.
[propagated-inputs]: Add package python-tzdata.
[native-inputs]: Add meson-python, python-versioneer python-matplotlib,
python-openpyxl, python-asyncio, python-pytest-localserver. Replace
python-pytest by python-pytest-next.
---
gnu/packages/python-science.scm | 132 +++++++++++++++++---------------
1 file changed, 72 insertions(+), 60 deletions(-)

Toggle diff (164 lines)
diff --git a/gnu/packages/python-science.scm b/gnu/packages/python-science.scm
index 2e238dc198..09d130537f 100644
--- a/gnu/packages/python-science.scm
+++ b/gnu/packages/python-science.scm
@@ -468,75 +468,81 @@ (define-public python-tspex
(define-public python-pandas
(package
(name "python-pandas")
- (version "1.4.4")
+ (version "2.1.1")
(source
(origin
- (method url-fetch)
- (uri (pypi-uri "pandas" version))
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/pandas-dev/pandas")
+ (commit (string-append "v" version))))
+ (file-name (git-file-name name version))
(sha256
- (base32 "0ryv66s9cvd27q6a985vv556k2qlnlrdna2z7qc7bdhphrrhsv5b"))))
- (build-system python-build-system)
+ (base32 "1v9j38bvw739csdfl98ga6fqjdm61q3p5a2l7h364kg925nbc9r1"))))
+ (build-system pyproject-build-system)
(arguments
- `(#:modules ((guix build utils)
- (guix build python-build-system)
- (ice-9 ftw)
- (srfi srfi-1)
- (srfi srfi-26))
- #:phases
- (modify-phases %standard-phases
- (add-after 'unpack 'enable-parallel-build
- (lambda _
- (substitute* "setup.py"
- (("\"-j\", type=int, default=1")
- (format #f "\"-j\", type=int, default=~a"
- (parallel-job-count))))))
- (add-after 'unpack 'patch-which
- (lambda* (#:key inputs #:allow-other-keys)
- (let ((which (assoc-ref inputs "which")))
- (substitute* "pandas/io/clipboard/__init__.py"
- (("^WHICH_CMD = .*")
- (string-append "WHICH_CMD = \"" which "\"\n"))))))
- (add-before 'check 'prepare-x
- (lambda _
- (system "Xvfb &")
- (setenv "DISPLAY" ":0")
- ;; xsel needs to write a log file.
- (setenv "HOME" "/tmp")))
- (replace 'check
- (lambda* (#:key tests? #:allow-other-keys)
- (let ((build-directory
- (string-append
- (getcwd) "/build/"
- (first (scandir "build"
- (cut string-prefix? "lib." <>))))))
- (substitute* "pyproject.toml"
- ;; Not all data files are distributed with the tarball.
- (("--strict-data-files ") ""))
- (with-directory-excursion build-directory
- (when tests?
- (invoke "pytest" "-vv" "pandas" "--skip-slow"
- "--skip-network"
- "-n" (number->string (parallel-job-count))
- "-k"
- (string-append
- ;; These test access the internet (see:
- ;; https://github.com/pandas-dev/pandas/issues/45085).:
- ;; pandas/tests/io/xml/test_xml.py::test_wrong_url[lxml]
- ;; pandas/tests/io/xml/test_xml.py::test_wrong_url[etree]
- "not test_wrong_url"
- ;; TODO: Missing input
- " and not TestS3"
- " and not s3"
- ;; This test fails when run with pytest-xdist
- ;; (see:
- ;; https://github.com/pandas-dev/pandas/issues/39096).
- " and not test_memory_usage"))))))))))
+ (list
+ #:test-flags
+ #~(list "--pyargs" "pandas"
+ ;; "--exitfirst"
+ ;; FIXME "-n" (number->string (parallel-job-count))
+ "-m" "not slow and not network and not db"
+ "-k" (string-append
+ "not test_git_version"
+ " and not test_show_versions_console"
+ ;; Not testing ~ expansion.
+ " and not test_expand_user"
+ " and not test_get_handle_with_path"
+ ;; These test access the internet (see:
+ ;; https://github.com/pandas-dev/pandas/issues/45085).:
+ ;; pandas/tests/io/xml/test_xml.py::test_wrong_url[lxml]
+ ;; pandas/tests/io/xml/test_xml.py::test_wrong_url[etree]
+ " and not test_wrong_url"
+ ;; TODO: Missing input
+ " and not TestS3"
+ " and not s3"
+ ;; This test fails when run with pytest-xdist
+ ;; (see: https://github.com/pandas-dev/pandas/issues/39096).
+ " and not test_memory_usage"
+ " and not test_parsing_tzlocal_deprecated"))
+ #:phases
+ #~(modify-phases %standard-phases
+ (add-after 'unpack 'version-set-by-guix
+ (lambda _
+ (with-output-to-file "_version_meson.py"
+ (lambda _
+ (display
+ (string-append "__version__ = \""
+ #$(package-version this-package)
+ "\""))))))
+ (add-before 'check 'prepare-x
+ (lambda _
+ (system "Xvfb &")
+ (setenv "DISPLAY" ":0")
+ (setenv "HOME" ".")))
+ (add-after 'unpack 'patch-which
+ (lambda _
+ (substitute* "pandas/io/clipboard/__init__.py"
+ (("^WHICH_CMD = .*")
+ (string-append "WHICH_CMD = \""
+ #$(this-package-input "which")
+ "/bin/which\"\n")))))
+ ;; The compiled libraries are only in the output at this point,
+ ;; but they are needed to run tests.
+ ;; FIXME: This should be handled by the pyargs pytest argument,
+ ;; but is not for some reason.
+ (add-before 'check 'pre-check
+ (lambda _
+ (copy-recursively
+ (string-append #$output
+ "/lib/python3.10/site-packages/pandas/_libs")
+ "pandas/_libs"))))))
(propagated-inputs
(list python-jinja2
python-numpy
python-openpyxl
python-pytz
python-dateutil
+ python-tzdata
python-xlrd
python-xlsxwriter))
(inputs
@@ -546,9 +552,15 @@ (define-public python-pandas
python-beautifulsoup4
python-lxml
python-html5lib
- python-pytest
+ meson-python
+ python-matplotlib
+ python-openpyxl
+ python-pytest-next
+ python-pytest-asyncio
+ python-pytest-localserver
python-pytest-mock
python-pytest-xdist
+ python-versioneer
;; Needed to test clipboard support.
xorg-server-for-tests))
(home-page "https://pandas.pydata.org")
--
2.41.0
R
R
Ricardo Wurmus wrote on 11 Jan 10:52 +0100
[PATCH 00/12] Update python-pandas to version 2.1.1.
(address . 67813@debbugs.gnu.org)
875y005h2z.fsf@elephly.net
Good work!

I only just noticed this patch set. I started work on the
wip-python-science branch, which includes an upgrade to Pandas 1.5.

I think it’s worth keeping Pandas 1.x around, which is still used by
many packages.

Your changes to matplotlib look good; I had updated to 3.8.2 already,
but the changes to the test flags look very useful.

I’ll try to port your patch set to wip-python-science.

--
Ricardo
N
N
Nicolas Graves wrote on 4 Feb 03:36 +0100
87bk8xj6q6.fsf@ngraves.fr
On 2024-01-11 10:52, Ricardo Wurmus wrote:

Toggle quote (13 lines)
> Good work!
>
> I only just noticed this patch set. I started work on the
> wip-python-science branch, which includes an upgrade to Pandas 1.5.
>
> I think it’s worth keeping Pandas 1.x around, which is still used by
> many packages.
>
> Your changes to matplotlib look good; I had updated to 3.8.2 already,
> but the changes to the test flags look very useful.
>
> I’ll try to port your patch set to wip-python-science.

Hi Ricardo,

I've noticed some patches in that direction, thanks! Should I rebase
that on wip-python-science and send a v2?

--
Best regards,
Nicolas Graves
?