summaryrefslogtreecommitdiff
path: root/gnu/packages/python-science.scm
diff options
context:
space:
mode:
authorSharlatan Hellseher <sharlatanus@gmail.com>2026-06-16 02:07:17 +0100
committerSharlatan Hellseher <sharlatanus@gmail.com>2026-08-08 23:02:05 +0100
commit313fda1006fd194c4349b374f36a657bb6f34708 (patch)
tree6faf38f85c80b7b54f77b49f3ae25956ec6fd32e /gnu/packages/python-science.scm
parenta82556a59d73ad0d96af59ff2db06717a3ccf6b7 (diff)
gnu: Add python-pandas-2.
* gnu/packages/python-science.scm (python-pandas-2): New variable. Change-Id: If844ed26e830ea10cb7dd9d81cb2f7184945a522
Diffstat (limited to 'gnu/packages/python-science.scm')
-rw-r--r--gnu/packages/python-science.scm81
1 files changed, 81 insertions, 0 deletions
diff --git a/gnu/packages/python-science.scm b/gnu/packages/python-science.scm
index 3b72cf31b29..d92439b5e72 100644
--- a/gnu/packages/python-science.scm
+++ b/gnu/packages/python-science.scm
@@ -4437,6 +4437,87 @@ and intuitive. It aims to be the fundamental high-level building block for
4437doing practical, real world data analysis in Python.") 4437doing practical, real world data analysis in Python.")
4438 (license license:bsd-3))) 4438 (license license:bsd-3)))
4439 4439
4440(define-public python-pandas-2
4441 (package
4442 (inherit python-pandas)
4443 (name "python-pandas")
4444 (version "2.3.3")
4445 (source
4446 (origin
4447 (method git-fetch)
4448 (uri (git-reference
4449 (url "https://github.com/pandas-dev/pandas")
4450 (commit (string-append "v" version))))
4451 (file-name (git-file-name name version))
4452 (sha256
4453 (base32 "0qf4frgj31kd9i544n8v03a0bv9mgml3f7n9n1rik187q3r8ygfg"))
4454 (patches (search-patches "python-pandas-2-no-pytz_datetime.patch"))))
4455 (build-system pyproject-build-system)
4456 (arguments
4457 (list
4458 ;; tests: 173093 passed, 24265 skipped, 990 xfailed, 77 xpassed, 110 warnings
4459 #:test-flags
4460 #~(list "-m" (string-join
4461 (list "not db" "network" "single_cpu" "slow" "slow_arm")
4462 " and not ")
4463 "--numprocesses" (number->string (min 4 (parallel-job-count)))
4464 "-k" (string-join
4465 (list "not test_git_version"
4466 "test_parsing_tzlocal_deprecated"
4467 "test_show_versions_console"
4468 ;; XXX: Introduced by NumPy 2.4.6 and Cython 3.2.5:
4469 ;; NotImplementedError
4470 ;; See:
4471 ;; <https://github.com/pandas-dev/pandas/issues/62820>,
4472 ;; <https://github.com/pandas-dev/pandas/issues/63078>.
4473 "test_categorical_block_pickle"
4474 "test_pickle"
4475 "test_pickle_freq"
4476 "test_pickle_preserves_block_ndim"
4477 "test_pickle_preserves_name"
4478 "test_pickle_round_trip"
4479 "test_pickle_roundtrip"
4480 "test_pickle_roundtrip_containers"
4481 "test_round_trip_current"
4482 ;; AssertionError: Series are different.
4483 #$@(if (target-64bit?)
4484 '()
4485 '("test_rolling_var_numerical_issues")))
4486 " and not "))
4487 #:phases
4488 #~(modify-phases %standard-phases
4489 (add-after 'unpack 'patch-generate-version
4490 (lambda _
4491 ;; See: <https://github.com/pandas-dev/pandas/issues/59459>.
4492 (substitute* "generate_version.py"
4493 (("version =.*")
4494 (format #f "version = ~s~%" #$version))
4495 (("git_version =.*")
4496 (format #f "git_version = ~s~%" #$version)))))
4497 (replace 'check
4498 (lambda* (#:key inputs outputs test-flags tests? #:allow-other-keys)
4499 (when tests?
4500 (setenv "HOME" "/tmp")
4501 (with-directory-excursion
4502 (string-append (string-append (site-packages inputs outputs)
4503 "/pandas"))
4504 (apply invoke "pytest" "-vv" test-flags))))))))
4505 (propagated-inputs
4506 (list python-numpy
4507 python-dateutil
4508 python-pytz
4509 python-tzdata))
4510 (inputs
4511 (list xclip xsel))
4512 (native-inputs
4513 (list python-meson
4514 python-lxml
4515 python-pytest
4516 python-pytest-asyncio
4517 python-pytest-xdist
4518 python-versioneer
4519 tzdata-for-tests))))
4520
4440;; A bare minimal package, mainly to use in tests and reduce closure size. 4521;; A bare minimal package, mainly to use in tests and reduce closure size.
4441;; Tests are left out in the main package to slim down native-inputs and 4522;; Tests are left out in the main package to slim down native-inputs and
4442;; propagated-inputs. 4523;; propagated-inputs.