From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp2.migadu.com ([2001:41d0:403:58f0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms1.migadu.com with LMTPS id UMFqH+7iPGbThAEAe85BDQ:P1 (envelope-from ) for ; Thu, 09 May 2024 16:51:26 +0200 Received: from aspmx1.migadu.com ([2001:41d0:403:58f0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp2.migadu.com with LMTPS id UMFqH+7iPGbThAEAe85BDQ (envelope-from ) for ; Thu, 09 May 2024 16:51:26 +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-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1715266286; 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-type:content-type: 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=vIm14CgDV4mbZp5n7G/OwLSFrywn3w9/FozByBdcxdg=; b=QVBTKwqWnG0lxNpDWOEtoZvsqCBR/kYetvOSh7BY18FGIPCJuel9kjLowas4VrHp1gbfuf 7/XY/6GEwXpuzgR46NH7HIwcZyp+csIK9/CK7yTSyA4hpyWTO9q+OduWi16MFbMOmLl1e+ v6muUsfMLq11jeFUaMLCAZVLeFXW07m1anpIHzW4YwZJjuxlikE5uIaURGGkuq+KYcaq0D Y3xz+dRFk0REMB/iDUUUu+pR3P3kFBeULlhdAPzUERrAJgYdPSfqBSzSaCp2Jh8ujyZ/Ye bNd8J1ISZ08FBM1bubFpY7MarWuJLZIkQN6CxMJpyAbN1wm6vQoH6TNBGMs+mA== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1715266286; a=rsa-sha256; cv=none; b=nWZrUlH0BkxZUvTIFJqXzvzUBu27Z8mB/h1rq28RV71jMTOVNIAjWH5PhdeW0rRYW7Q3Z9 +bWiaC+oGOzgIZNKBSpVN2A+QPEv2A8jtslOsEKR5p+rFUMTq8bG3xDUAz6S1cmM3ZxTnj bxUJS3WKq0QZxUeKvBtZButl3cZiGy3/DN8PvUoAb9MbsJ/k432p+f4Af5jjABImye7vks /oas+ycboddZIdepFxnsnIkYRWAch/JLgRM9dYKg6DJymYVV4FF+45M4mXL1e0GUHNDB88 jNdn+1Y2jR1hNC+nrM3sympxq6c2eQMn0rEMV1IFgzJ8tVsswEVf/SC5D4l+nA== 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" 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 082686DA2 for ; Thu, 09 May 2024 16:51:26 +0200 (CEST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1s556a-0005Kd-Ny; Thu, 09 May 2024 10:50:44 -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 1s556Y-0005JT-Fz for guix-patches@gnu.org; Thu, 09 May 2024 10:50:42 -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 1s556Y-0003H7-7i for guix-patches@gnu.org; Thu, 09 May 2024 10:50:42 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1s556y-0003zK-7V for guix-patches@gnu.org; Thu, 09 May 2024 10:51:08 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#69980] [PATCH v2 12/14] gnu: pre-commit: Update to 3.6.2. Resent-From: Nicolas Graves Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Thu, 09 May 2024 14:51:08 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 69980 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 69980@debbugs.gnu.org Cc: Vinicius Monego , ngraves@ngraves.fr Received: via spool by 69980-submit@debbugs.gnu.org id=B69980.171526626715316 (code B ref 69980); Thu, 09 May 2024 14:51:08 +0000 Received: (at 69980) by debbugs.gnu.org; 9 May 2024 14:51:07 +0000 Received: from localhost ([127.0.0.1]:55730 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1s556v-0003yf-Em for submit@debbugs.gnu.org; Thu, 09 May 2024 10:51:06 -0400 Received: from 17.mo561.mail-out.ovh.net ([87.98.178.58]:56839) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1s556r-0003xX-Dx for 69980@debbugs.gnu.org; Thu, 09 May 2024 10:51:04 -0400 Received: from director2.ghost.mail-out.ovh.net (unknown [10.108.2.55]) by mo561.mail-out.ovh.net (Postfix) with ESMTP id 4VZw161WtPz1FYq for <69980@debbugs.gnu.org>; Thu, 9 May 2024 14:50:34 +0000 (UTC) Received: from ghost-submission-6684bf9d7b-rlnt2 (unknown [10.108.54.36]) by director2.ghost.mail-out.ovh.net (Postfix) with ESMTPS id D0A561FD9E; Thu, 9 May 2024 14:50:33 +0000 (UTC) Received: from ngraves.fr ([37.59.142.103]) by ghost-submission-6684bf9d7b-rlnt2 with ESMTPSA id srDqKbniPGbQ6AQAbHn/wg (envelope-from ); Thu, 09 May 2024 14:50:33 +0000 X-OVh-ClientIp: 81.67.146.208 Date: Thu, 9 May 2024 16:47:11 +0200 Message-ID: <20240509144944.30385-13-ngraves@ngraves.fr> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20240509144944.30385-1-ngraves@ngraves.fr> References: <20240509144944.30385-1-ngraves@ngraves.fr> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Ovh-Tracer-Id: 16337370598613508627 X-VR-SPAMSTATE: OK X-VR-SPAMSCORE: -100 X-VR-SPAMCAUSE: gggruggvucftvghtrhhoucdtuddrgedvledrvdefvddgkedtucetufdoteggodetrfdotffvucfrrhhofhhilhgvmecuqfggjfdpvefjgfevmfevgfenuceurghilhhouhhtmecuhedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmnecujfgurhephffvvefufffkofgjfhggtgfgsehtkeertdertdejnecuhfhrohhmpefpihgtohhlrghsucfirhgrvhgvshcuoehnghhrrghvvghssehnghhrrghvvghsrdhfrheqnecuggftrfgrthhtvghrnhepvdelleegfeefteelkeeugedvhfetvdeuffeihfektdeljeekudevlefgudefudelnecukfhppeduvdejrddtrddtrddupdekuddrieejrddugeeirddvtdekpdefjedrheelrddugedvrddutdefnecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehinhgvthepuddvjedrtddrtddruddpmhgrihhlfhhrohhmpehnghhrrghvvghssehnghhrrghvvghsrdhfrhdpnhgspghrtghpthhtohepuddprhgtphhtthhopeeileelkedtseguvggssghughhsrdhgnhhurdhorhhgpdfovfetjfhoshhtpehmohehiedupdhmohguvgepshhmthhpohhuth 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-Flow: FLOW_IN X-Migadu-Country: US X-Migadu-Spam-Score: -3.89 X-Spam-Score: -3.89 X-Migadu-Queue-Id: 082686DA2 X-Migadu-Scanner: mx11.migadu.com X-TUID: IuJJjuGVOTeP From: Vinicius Monego * gnu/packages/version-control.scm (pre-commit): Update to 3.6.2. [build-system]: Use pyproject-build-system. [arguments]: Use G-Expressions. Do not override the check phase, skip the tests in #:test-flags instead. Don't make source tree writable in the prepare-check-env phase. [native-inputs]: Use the new style. Change-Id: I4a1c56ce0903d6aa185d65d39c03c9566a6cf0d9 --- gnu/packages/version-control.scm | 106 +++++++++++++------------------ 1 file changed, 43 insertions(+), 63 deletions(-) diff --git a/gnu/packages/version-control.scm b/gnu/packages/version-control.scm index 2567acd2afc..226bcd4ad63 100644 --- a/gnu/packages/version-control.scm +++ b/gnu/packages/version-control.scm @@ -29,7 +29,7 @@ ;;; Copyright © 2020, 2021 Brice Waegeneire ;;; Copyright © 2020 John D. Boy ;;; Copyright © 2020, 2023 Janneke Nieuwenhuizen -;;; Copyright © 2020, 2021, 2022, 2023 Vinicius Monego +;;; Copyright © 2020, 2021, 2022, 2023, 2024 Vinicius Monego ;;; Copyright © 2020 Tanguy Le Carrour ;;; Copyright © 2020, 2021, 2022 Michael Rohleder ;;; Copyright © 2021 Greg Hogan @@ -2014,7 +2014,7 @@ (define-public gitile (define-public pre-commit (package (name "pre-commit") ;formerly known as python-pre-commit - (version "3.3.3") + (version "3.6.2") (source (origin (method git-fetch) ; no tests in PyPI release @@ -2023,73 +2023,53 @@ (define-public pre-commit (commit (string-append "v" version)))) (file-name (git-file-name name version)) (sha256 - (base32 "1spkg3ld3s6l7wz24lcywlf1z2ywp751bcdlxjfdsln76bi9ylp8")) + (base32 "01b8mphyvm961n8hsk4ajqqgm5vwkr2kbi837s231bablnhs8ldf")) (modules '((guix build utils))) (snippet '(substitute* "setup.cfg" (("virtualenv>=20.10.0") ;our virtualenv (20.3.1) is fine "virtualenv>=20.0.8"))))) - (build-system python-build-system) + (build-system pyproject-build-system) (arguments - `(#:phases - (modify-phases %standard-phases - (add-before 'check 'prepare-check-env - (lambda _ - ;; Change from /homeless-shelter to /tmp for write permission. - (setenv "HOME" "/tmp") - ;; Environment variables used in the tests. - (setenv "GIT_AUTHOR_NAME" "Your Name") - (setenv "GIT_COMMITTER_NAME" "Your Name") - (setenv "GIT_AUTHOR_EMAIL" "you@example.com") - (setenv "GIT_COMMITTER_EMAIL" "you@example.com") - ;; Some tests still fail with PermissionError. Make the source - ;; tree writable. - (for-each make-file-writable (find-files ".")) - ;; Some tests will need a working git repository. - (invoke "git" "init") - (invoke "git" "config" "--global" "user.name" "Your Name") - (invoke "git" "config" "--global" "user.email" "you@example.com"))) - (replace 'check - (lambda* (#:key inputs outputs tests? #:allow-other-keys) - (add-installed-pythonpath inputs outputs) - (when tests? - ;; The file below contains 30+ tests that fail because they - ;; depend on tools from multiple languages (cargo, npm, cpan, - ;; Rscript, etc). Other tests are passing, but it's more - ;; convenient to skip the file than list 30 tests to skip. - (invoke "pytest" "--ignore=tests/repository_test.py" - ;; Ruby and Node tests require node and gem. - "--ignore=tests/languages/node_test.py" - "--ignore=tests/languages/ruby_test.py" - ;; Skip lang-specific (network) tests added in 3.1.1 - "--ignore=tests/languages/conda_test.py" - "--ignore=tests/languages/coursier_test.py" - "--ignore=tests/languages/dart_test.py" - "--ignore=tests/languages/docker_test.py" - "--ignore=tests/languages/docker_image_test.py" - "--ignore=tests/languages/dotnet_test.py" - "--ignore=tests/languages/golang_test.py" - "--ignore=tests/languages/lua_test.py" - "--ignore=tests/languages/perl_test.py" - "--ignore=tests/languages/rust_test.py" - "--ignore=tests/languages/swift_test.py" - "-k" - (string-append - ;; TODO: these tests fail with AssertionError. It may - ;; be possible to fix them. - "not test_install_existing_hooks_no_overwrite" - " and not test_uninstall_restores_legacy_hooks" - " and not test_installed_from_venv" - " and not test_healthy_venv_creator" - " and not test_r_hook and not test_r_inline")))))))) + (list + ;; Skip language-specific tests because they depennd on language tools. + #:test-flags + #~(list "--ignore" "tests/languages" + ;; These fail with AssertionError. + "-k" (string-append + "not test_additional_dependencies_roll_forward" + " and not test_control_c_control_c_on_install" + " and not test_invalidated_virtualenv" + " and not test_local_python_repo" + " and not test_install_existing_hooks_no_overwrite" + " and not test_uninstall_restores_legacy_hooks" + " and not test_installed_from_venv")) + #:phases + #~(modify-phases %standard-phases + (add-before 'check 'prepare-check-env + (lambda _ + ;; Change from /homeless-shelter to /tmp for write permission. + (setenv "HOME" "/tmp") + ;; Environment variables used in the tests. + (setenv "GIT_AUTHOR_NAME" "Your Name") + (setenv "GIT_COMMITTER_NAME" "Your Name") + (setenv "GIT_AUTHOR_EMAIL" "you@example.com") + (setenv "GIT_COMMITTER_EMAIL" "you@example.com") + ;; Some tests still fail with PermissionError. Make the source + ;; tree writable. + ;; (for-each make-file-writable (find-files ".")) + ;; Some tests will need a working git repository. + (invoke "git" "init") + (invoke "git" "config" "--global" "user.name" "Your Name") + (invoke "git" "config" "--global" "user.email" "you@example.com")))))) (native-inputs - `(("git" ,git-minimal) - ("python-covdefaults" ,python-covdefaults) - ("python-coverage" ,python-coverage) - ("python-distlib" ,python-distlib) - ("python-pytest" ,python-pytest) - ("python-pytest-env" ,python-pytest-env) - ("python-re-assert" ,python-re-assert) - ("which" ,which))) + (list git-minimal + python-covdefaults + python-coverage + python-distlib + python-pytest + python-pytest-env + python-re-assert + which)) ;; Propagate because pre-commit is also used as a module. (propagated-inputs (list python-cfgv -- 2.41.0