From patchwork Wed Dec 13 21:56:32 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Nicolas Graves X-Patchwork-Id: 57587 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 9E46327BBEA; Wed, 13 Dec 2023 21:59:05 +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=ham 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 3748227BBE2 for ; Wed, 13 Dec 2023 21:59:04 +0000 (GMT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rDXEo-0007sA-Jr; 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 1rDXEl-0007rZ-FQ for guix-patches@gnu.org; Wed, 13 Dec 2023 16:57:52 -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 1rDXEk-0000hY-2N for guix-patches@gnu.org; Wed, 13 Dec 2023 16:57:51 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1rDXF0-0003Vx-7e for guix-patches@gnu.org; Wed, 13 Dec 2023 16:58:06 -0500 X-Loop: help-debbugs@gnu.org Subject: [bug#67813] [PATCH 12/12] gnu: python-pandas: Update to 2.1.1. Resent-From: Nicolas Graves Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Wed, 13 Dec 2023 21:58:06 +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.170250464813388 (code B ref 67813); Wed, 13 Dec 2023 21:58:06 +0000 Received: (at 67813) by debbugs.gnu.org; 13 Dec 2023 21:57:28 +0000 Received: from localhost ([127.0.0.1]:59813 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rDXEN-0003Tm-Jy for submit@debbugs.gnu.org; Wed, 13 Dec 2023 16:57:28 -0500 Received: from 3.mo561.mail-out.ovh.net ([46.105.44.175]:41541) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rDXEK-0003TE-Jf for 67813@debbugs.gnu.org; Wed, 13 Dec 2023 16:57:25 -0500 Received: from director5.ghost.mail-out.ovh.net (unknown [10.108.9.77]) by mo561.mail-out.ovh.net (Postfix) with ESMTP id 361FD26669 for <67813@debbugs.gnu.org>; Wed, 13 Dec 2023 21:57:07 +0000 (UTC) Received: from ghost-submission-6684bf9d7b-v5btb (unknown [10.111.174.17]) by director5.ghost.mail-out.ovh.net (Postfix) with ESMTPS id 013431FE3C; Wed, 13 Dec 2023 21:57:06 +0000 (UTC) Received: from ngraves.fr ([37.59.142.97]) by ghost-submission-6684bf9d7b-v5btb with ESMTPSA id 4JOaNbIoemWzAQAAJNK1sw (envelope-from ); Wed, 13 Dec 2023 21:57:06 +0000 Authentication-Results: garm.ovh; auth=pass (GARM-97G0024566fcf3-4df6-4543-9e75-881452a5cb37, 883E2374CD84F629F690BC25EE7F4A5127ADD52F) smtp.auth=ngraves@ngraves.fr X-OVh-ClientIp: 81.67.140.142 Date: Wed, 13 Dec 2023 22:56:32 +0100 Message-ID: <20231213215635.15562-12-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: 2932687785635472098 X-VR-SPAMSTATE: OK X-VR-SPAMSCORE: 0 X-VR-SPAMCAUSE: gggruggvucftvghtrhhoucdtuddrgedvkedrudeljedgleegucetufdoteggodetrfdotffvucfrrhhofhhilhgvmecuqfggjfdpvefjgfevmfevgfenuceurghilhhouhhtmecuhedttdenucenucfjughrpefhvfevufffkffojghfggfgsedtkeertdertddtnecuhfhrohhmpefpihgtohhlrghsucfirhgrvhgvshcuoehnghhrrghvvghssehnghhrrghvvghsrdhfrheqnecuggftrfgrthhtvghrnhepudeigfffudffkeehhfefgedugeelteelffefgedvteetkeeujeduleejieevheejnecuffhomhgrihhnpehgihhthhhusgdrtghomhdpphihuggrthgrrdhorhhgnecukfhppeduvdejrddtrddtrddupdekuddrieejrddugedtrddugedvpdefjedrheelrddugedvrdeljeenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepihhnvghtpeduvdejrddtrddtrddupdhmrghilhhfrhhomhepoehnghhrrghvvghssehnghhrrghvvghsrdhfrheqpdhnsggprhgtphhtthhopedupdhrtghpthhtohepieejkedufeesuggvsggsuhhgshdrghhnuhdrohhrghdpoffvtefjohhsthepmhhoheeiuddpmhhouggvpehsmhhtphhouhht 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-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(-) 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")