From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp1.migadu.com ([2001:41d0:403:4876::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms8.migadu.com with LMTPS id sEQbCeQwAGaYMQAA62LTzQ:P1 (envelope-from ) for ; Sun, 24 Mar 2024 14:55:48 +0100 Received: from aspmx1.migadu.com ([2001:41d0:403:4876::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp1.migadu.com with LMTPS id sEQbCeQwAGaYMQAA62LTzQ (envelope-from ) for ; Sun, 24 Mar 2024 14:55:48 +0100 X-Envelope-To: larch@yhetil.org Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=posteo.net header.s=2017 header.b=eMKuWjm2; 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"; dmarc=fail reason="SPF not aligned (strict)" header.from=posteo.net (policy=none) ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1711288547; h=from:from:sender:sender: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:dkim-signature; bh=7xLtHxjvOLEhiAheIywq67P9u93jXdkOCucVxiIH/cs=; b=cbUkp1OlZ7VucCe2m4bDljO5fZz7WEnKJ6hN8vkYl5jNgKiboUF9qWOLDbCTnoNCpOSoow en0SvmIIRcGFeGiFle80SXM42anUmIK4uymVp87RzXBqW73o+8ZxB2g5JBYUKXWaBe46RS /5hAMMdEhvjNgUKbJeHHUvBULuZdZ+OSCqpLr7IYcMdchdNaTxTbyUE4C5M7mx00d1M7tT slwxMMLHPrP8p8+YZRjEyaMKgkqyVKeexL/pA1fUFodrMGJkHu9fSoaXUG3wdDfN/BOWlh /AuSLVvzEuEcG9jmjJNUhw29aSwlV2UfvAOnJKorvE9mGxCEYUu8NLBc1W6tYg== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=posteo.net header.s=2017 header.b=eMKuWjm2; 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"; dmarc=fail reason="SPF not aligned (strict)" header.from=posteo.net (policy=none) ARC-Seal: i=1; s=key1; d=yhetil.org; t=1711288547; a=rsa-sha256; cv=none; b=jtlNisY6jbCRiJvF80yZRSYuvrqYCffDTFNlXESJkxWOrP9zu5zh0hDLJacSeNlfs3pRgh 6pAHkJdGIoWjHwP5uQ27/CXDpgAKHROFQ3nx4QaLmHCO1MNogkDfHFGEFqT5q5VGeKkiso aJ/Mqtmy/gbSgjWP+VUzBIg9XcXJxYQ/fNwN5HmevkH6S1IhVUHk+seOg/uqPAx4NpQmKB eQzaAu9q+oQhg8aoOZO93b3Gf70r0gg+KBAhKMephC2bStUzGtZbTvoQTu68hxE6rHrXQd cYrARYqEazGtwGuAS3e+a5GqY43HxPRS+8qW1swqwS7v/tfMQUPVwPKA+Ey3Pg== 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 2C22324AE3 for ; Sun, 24 Mar 2024 14:55:46 +0100 (CET) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1roOJm-0005Od-LT; Sun, 24 Mar 2024 09:55:22 -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 1roOJl-0005OS-Hi for guix-patches@gnu.org; Sun, 24 Mar 2024 09:55:21 -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 1roOJl-0002yo-9g for guix-patches@gnu.org; Sun, 24 Mar 2024 09:55:21 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1roOKR-000459-2N for guix-patches@gnu.org; Sun, 24 Mar 2024 09:56:03 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#69980] [PATCH 13/13] gnu: pre-commit: Update to 3.6.2. Resent-From: Vinicius Monego Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Sun, 24 Mar 2024 13:56:03 +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 Received: via spool by 69980-submit@debbugs.gnu.org id=B69980.171128852014253 (code B ref 69980); Sun, 24 Mar 2024 13:56:03 +0000 Received: (at 69980) by debbugs.gnu.org; 24 Mar 2024 13:55:20 +0000 Received: from localhost ([127.0.0.1]:60183 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1roOJi-0003hg-LC for submit@debbugs.gnu.org; Sun, 24 Mar 2024 09:55:20 -0400 Received: from mout02.posteo.de ([185.67.36.66]:33571) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1roO7d-000348-6v for 69980@debbugs.gnu.org; Sun, 24 Mar 2024 09:42:50 -0400 Received: from submission (posteo.de [185.67.36.169]) by mout02.posteo.de (Postfix) with ESMTPS id 897D2240101 for <69980@debbugs.gnu.org>; Sun, 24 Mar 2024 14:42:01 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.net; s=2017; t=1711287721; bh=eB7bONurmxxWPIX9TF9rmORYfvPFnBqXAhqpiW8xz3g=; h=From:To:Cc:Subject:Date:Message-Id:MIME-Version:Content-Type: Content-Transfer-Encoding:From; b=eMKuWjm2UGVpyPHFK7WMoLFcZEb55KpG1+IvvvoeKNcnvE7KIhTDqnnwBMAG/0O+w Q7eJHVrGhmr0QVFHrrrcXokVRl4D4yG2ULguylMSMix1jN2DGzgtOdcvE5sLJFIh23 L+6x/M9C7CjWEJrERn+UAru21t8m+kTGfmlY7oVdE6zrRyBO2U5fMPEUNjOdv27p8c 8a5lXtQ3V4uXfnyorzbyd422jUv1Ri4ne+Gd8uCBFgMX6izJvZPLYHx9swbEHirAQO gTPnRQsDycuR4Z6PkYnxvR5CsQUumD/UvnHO8ABf3oxAiaa+sCE4P0uyAN3ISAYgAT zssA/YheMjV/A== Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 4V2cgD5gSMz6txx; Sun, 24 Mar 2024 14:42:00 +0100 (CET) From: Vinicius Monego Date: Sun, 24 Mar 2024 13:40:38 +0000 Message-Id: <923daa675a7cbc414ebc2e4032044ba8b9fb2f37.1711287459.git.monego@posteo.net> In-Reply-To: References: MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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: , 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: 2C22324AE3 X-Spam-Score: -4.43 X-Migadu-Spam-Score: -4.43 X-Migadu-Scanner: mx10.migadu.com X-TUID: JNbBm/UYc+Bm * 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 946b1f5aac..1fc3c7274e 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 @@ -1987,7 +1987,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 @@ -1996,73 +1996,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.39.2