From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp0.migadu.com ([2001:41d0:303:e224::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms1.migadu.com with LMTPS id sI7RNf1UPWZHSgEAqHPOHw:P1 (envelope-from ) for ; Fri, 10 May 2024 00:58:06 +0200 Received: from aspmx1.migadu.com ([2001:41d0:303:e224::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp0.migadu.com with LMTPS id sI7RNf1UPWZHSgEAqHPOHw (envelope-from ) for ; Fri, 10 May 2024 00:58:06 +0200 X-Envelope-To: larch@yhetil.org Authentication-Results: aspmx1.migadu.com; dkim=none; dmarc=pass (policy=none) header.from=gnu.org; spf=pass (aspmx1.migadu.com: domain of "guix-patches-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-patches-bounces+larch=yhetil.org@gnu.org" ARC-Seal: i=1; s=key1; d=yhetil.org; t=1715295485; a=rsa-sha256; cv=none; b=rQ0GRqQPGQfIHmjeenTKifM0mpbTX/L1vbU+iVICZkJU4MjXeZw5MdZIohNdhUtfFq8whM n+GzvfSQSE8AfSD/kOu+5IMdebuYvaae00X6yLXEy+k8BCM7xyKh4Okdb2xMgvQU0HKfSZ VYcNfAPexT/QRe3w5VzhU7+i1PYz2lDygwJcsHt0A3Q3H6QECy/mUZIpo2zECpvWqFtZnY vM1le532dxGtOyvPcAqEI7qPd2nmvojx4QY4vYylx/B1MoSRmcZUQ617fPYSdlr4ZyKGdX 06DkWUQIM2lInowkkHaD5snYPiRYDRW7qo7VfToMa1cr3RaPluDT568WAp2+Cg== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=none; dmarc=pass (policy=none) header.from=gnu.org; spf=pass (aspmx1.migadu.com: domain of "guix-patches-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-patches-bounces+larch=yhetil.org@gnu.org" ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1715295485; h=from:from:sender:sender:reply-to:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding:resent-cc: resent-from:resent-sender:resent-message-id:in-reply-to:in-reply-to: references:references:list-id:list-help:list-unsubscribe: list-subscribe:list-post; bh=s9EkYm4Ye8ocwAY2iZVSfVTnOU1okRaakePuCJWOe1E=; b=p3mBHjQidGjqdfpyXSlBsi90wtbIDchICuU9kbHThdhC3h2m4Pdleu8ikaidDogdNwLi6Y ScCQjHjIjSDoNu5niiksMVCLTMEqA+MYYJsmq729jVCynaDeQa4fOHEtMAQ2hgc+cb3U8v DZtrEE1zaJl2t5fUtXWQKC+wgtBOSTy/c3/I24lQ12w1apVj/vpywe1hBd8c+IhgDp67Qj tB1NI8MRDy3IXtFpHqvB5rr6GFDxa5bam7U9uwvNdHnbnPWyZnr4V5bR/9ANITqrGQSp7p aNGf6yb7hk8nhhP89KbmsKRqfJezk9F+lVikfiU9bd6d3IJFIIebnCc4W1yY4Q== Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id 8815E1B5AC for ; Fri, 10 May 2024 00:58:05 +0200 (CEST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1s5ChU-0005xz-OX; Thu, 09 May 2024 18:57:20 -0400 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 1s5ChN-0005tP-HL for guix-patches@gnu.org; Thu, 09 May 2024 18:57:13 -0400 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 1s5ChN-0006S3-90 for guix-patches@gnu.org; Thu, 09 May 2024 18:57:13 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1s5ChL-0002gc-JZ for guix-patches@gnu.org; Thu, 09 May 2024 18:57:11 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#70855] [PATCH 21/92] gnu: conda: Move to pyproject-build-system. Resent-From: Nicolas Graves Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Thu, 09 May 2024 22:57:11 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 70855 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 70855@debbugs.gnu.org Cc: ngraves@ngraves.fr Received: via spool by 70855-submit@debbugs.gnu.org id=B70855.17152954089979 (code B ref 70855); Thu, 09 May 2024 22:57:11 +0000 Received: (at 70855) by debbugs.gnu.org; 9 May 2024 22:56:48 +0000 Received: from localhost ([127.0.0.1]:41092 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1s5Cgx-0002an-DE for submit@debbugs.gnu.org; Thu, 09 May 2024 18:56:48 -0400 Received: from 6.mo575.mail-out.ovh.net ([46.105.63.100]:56291) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1s5Cgp-0002Zp-SW for 70855@debbugs.gnu.org; Thu, 09 May 2024 18:56:41 -0400 Received: from director6.ghost.mail-out.ovh.net (unknown [10.109.176.101]) by mo575.mail-out.ovh.net (Postfix) with ESMTP id 4Vb6p015pnz1RrG for <70855@debbugs.gnu.org>; Thu, 9 May 2024 22:56:40 +0000 (UTC) Received: from ghost-submission-6684bf9d7b-p9pbd (unknown [10.108.42.39]) by director6.ghost.mail-out.ovh.net (Postfix) with ESMTPS id C3B621FD60; Thu, 9 May 2024 22:56:39 +0000 (UTC) Received: from ngraves.fr ([37.59.142.109]) by ghost-submission-6684bf9d7b-p9pbd with ESMTPSA id YRHyJqdUPWbkfgUAm9iK8Q (envelope-from ); Thu, 09 May 2024 22:56:39 +0000 X-OVh-ClientIp: 81.67.146.208 Date: Fri, 10 May 2024 00:53:16 +0200 Message-ID: <20240509225530.24649-21-ngraves@ngraves.fr> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20240509225530.24649-1-ngraves@ngraves.fr> References: <20240509225530.24649-1-ngraves@ngraves.fr> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Ovh-Tracer-Id: 6100125695709799138 X-VR-SPAMSTATE: OK X-VR-SPAMSCORE: 0 X-VR-SPAMCAUSE: gggruggvucftvghtrhhoucdtuddrgedvledrvdeffedgudehucetufdoteggodetrfdotffvucfrrhhofhhilhgvmecuqfggjfdpvefjgfevmfevgfenuceurghilhhouhhtmecuhedttdenucenucfjughrpefhvfevufffkffojghfggfgsedtkeertdertddtnecuhfhrohhmpefpihgtohhlrghsucfirhgrvhgvshcuoehnghhrrghvvghssehnghhrrghvvghsrdhfrheqnecuggftrfgrthhtvghrnhepleffjeetueethfefkeffffefvddukeejkefgleduiedthfekvefhiedvhfffgeegnecukfhppeduvdejrddtrddtrddupdekuddrieejrddugeeirddvtdekpdefjedrheelrddugedvrddutdelnecuvehluhhsthgvrhfuihiivgepudenucfrrghrrghmpehinhgvthepuddvjedrtddrtddruddpmhgrihhlfhhrohhmpehnghhrrghvvghssehnghhrrghvvghsrdhfrhdpnhgspghrtghpthhtohepuddprhgtphhtthhopeejtdekheehseguvggssghughhsrdhgnhhurdhorhhgpdfovfetjfhoshhtpehmohehjeehpdhmohguvgepshhmthhpohhuth 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 From: Nicolas Graves via Guix-patches via Errors-To: guix-patches-bounces+larch=yhetil.org@gnu.org Sender: guix-patches-bounces+larch=yhetil.org@gnu.org X-Migadu-Country: US X-Migadu-Flow: FLOW_IN X-Migadu-Queue-Id: 8815E1B5AC X-Migadu-Scanner: mx12.migadu.com X-Migadu-Spam-Score: -6.39 X-Spam-Score: -6.39 X-TUID: 1FsgXMnov5if * gnu/packages/package-management.scm (conda): Improve package style. [build-system]: Move to pyproject-build-system. [arguments]<#:test-flags>: Use field instead of check phase replacement. <#:phases>: Remove check phase replacement. Improve use of format in phase do-not-use-python-root-as-prefix. Use gexp. Put phase init after phase create-entrypoints. Change-Id: Id1affbf8f80fae2882e4c8a88b1e817cf49a5c00 --- gnu/packages/package-management.scm | 104 +++++++++++++--------------- 1 file changed, 50 insertions(+), 54 deletions(-) diff --git a/gnu/packages/package-management.scm b/gnu/packages/package-management.scm index f4c2cf91492..8a47135ad02 100644 --- a/gnu/packages/package-management.scm +++ b/gnu/packages/package-management.scm @@ -1170,10 +1170,49 @@ (define-public conda (sha256 (base32 "16vz4vx311ry9w35mi5wna8p8n3abd6wdqrpqzjfdlwv7hcr44s4")))) - (build-system python-build-system) + (build-system pyproject-build-system) (arguments - `(#:phases - (modify-phases %standard-phases + (list + #:test-flags + '(list + "--ignore=tests/cli/test_main_clean.py" + "--ignore=tests/cli/test_main_rename.py" + "-k" (string-append + "not " + (string-join + (list + "integration" + ;; This one reports a newer version of conda than + ;; expected; conda-1.5.2-py27_0 instead of + ;; conda-1.3.5-py27_0. + "test_auto_update_conda" + ;; This fails because the output directory is not a + ;; Conda environment. + "test_list" + ;; This fails because we patched the default root + ;; prefix. + "test_default_target_is_root_prefix" + ;; This fails because of missing features in python-flaky. + "test_no_features" + ;; These fail because they require network access + "test_no_ssl" + "test_run_readonly_env" + "test_run_returns_int" + "test_run_returns_nonzero_errorlevel" + "test_run_returns_zero_errorlevel" + "test_run_uncaptured" + + ;; TODO: I don't understand what this failure means + "test_PrefixData_return_value_contract" + ;; TODO: same here + "test_install_1" + ;; Not sure if this is really wrong. This fails because + ;; /gnu/store/...conda-22.9.0/bin/python + ;; is not /gnu/store/...python-wrapper-3.9.9/bin/python + "test_make_entry_point") + " and not "))) + #:phases + #~(modify-phases %standard-phases ;; The default version of pytest does not support these options. (add-after 'unpack 'use-older-pytest (lambda _ @@ -1186,10 +1225,6 @@ (define-public conda (add-after 'unpack 'correct-python-executable-name (lambda* (#:key inputs #:allow-other-keys) (let ((python (assoc-ref inputs "python-wrapper"))) - #; - (substitute* "conda/common/path.py" - (("python_version or ''") - "python_version or '3'")) (substitute* "conda/core/initialize.py" (("python_exe = join") (format #f "python_exe = \"~a/bin/python\" #" @@ -1200,19 +1235,19 @@ (define-public conda (python (assoc-ref inputs "python-wrapper"))) (substitute* "tests/core/test_initialize.py" (("\"\"\"\\) % conda_prefix") - (format #f "\"\"\") % \"~a\"" python)) + (format #f "\"\"\") % ~s" python)) (("CONDA_PYTHON_EXE \"%s\"' % join\\(conda_prefix") - (format #f "CONDA_PYTHON_EXE \"%s\"' % join(\"~a\"" + (format #f "CONDA_PYTHON_EXE \"%s\"' % join(~s" python)) (("conda_prefix = abspath\\(sys.prefix\\)") - (format #f "conda_prefix = abspath(\"~a\")" out))) + (format #f "conda_prefix = abspath(~s)" out))) (substitute* "conda/base/context.py" (("os.chdir\\(sys.prefix\\)") - (format #f "os.chdir(\"~a\")" out)) + (format #f "os.chdir(~s)" out)) (("sys.prefix, '.condarc'") - (format #f "\"~a\", '.condarc'" out)) + (format #f "~s, '.condarc'" out)) (("return abspath\\(sys.prefix\\)") - (format #f "return abspath(\"~a\")" out)) + (format #f "return abspath(~s)" out)) (("os.path.join\\(sys.prefix, bin_dir, exe\\)") (format #f "\"~a/bin/conda\"" out)) (("'CONDA_EXE', sys.executable") @@ -1220,47 +1255,8 @@ (define-public conda (add-before 'build 'create-version-file (lambda _ (with-output-to-file "conda/.version" - (lambda () (display ,version))))) - (replace 'check - (lambda* (#:key tests? #:allow-other-keys) - ;; These tests all require network access. - (for-each delete-file '("tests/cli/test_main_clean.py" - "tests/cli/test_main_rename.py")) - (when tests? - (setenv "HOME" "/tmp") - (invoke "py.test" "-vv" - "-k" - (string-append - "not integration" - ;; This one reports a newer version of conda than - ;; expected; conda-1.5.2-py27_0 instead of - ;; conda-1.3.5-py27_0. - " and not test_auto_update_conda" - ;; This fails because the output directory is not a - ;; Conda environment. - " and not test_list" - ;; This fails because we patched the default root - ;; prefix. - " and not test_default_target_is_root_prefix" - ;; This fails because of missing features in python-flaky. - " and not test_no_features" - ;; These fail because they require network access - " and not test_no_ssl" - " and not test_run_readonly_env" - " and not test_run_returns_int" - " and not test_run_returns_nonzero_errorlevel" - " and not test_run_returns_zero_errorlevel" - " and not test_run_uncaptured" - - ;; TODO: I don't understand what this failure means - " and not test_PrefixData_return_value_contract" - ;; TODO: same here - " and not test_install_1" - ;; Not sure if this is really wrong. This fails because - ;; /gnu/store/...conda-22.9.0/bin/python - ;; is not /gnu/store/...python-wrapper-3.9.9/bin/python - " and not test_make_entry_point"))))) - (add-after 'install 'init + (lambda () (display #$version))))) + (add-after 'create-entrypoints 'init ;; This writes a whole bunch of shell initialization files to the ;; prefix directory. Many features of conda can only be used after ;; running "conda init". -- 2.41.0