From: Vinicius Monego <monego@posteo.net>
To: 69980@debbugs.gnu.org
Cc: Vinicius Monego <monego@posteo.net>
Subject: [bug#69980] [PATCH 13/13] gnu: pre-commit: Update to 3.6.2.
Date: Sun, 24 Mar 2024 13:40:38 +0000 [thread overview]
Message-ID: <923daa675a7cbc414ebc2e4032044ba8b9fb2f37.1711287459.git.monego@posteo.net> (raw)
In-Reply-To: <cover.1711287459.git.monego@posteo.net>
* 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 <brice@waegenei.re>
;;; Copyright © 2020 John D. Boy <jboy@bius.moe>
;;; Copyright © 2020, 2023 Janneke Nieuwenhuizen <janneke@gnu.org>
-;;; Copyright © 2020, 2021, 2022, 2023 Vinicius Monego <monego@posteo.net>
+;;; Copyright © 2020, 2021, 2022, 2023, 2024 Vinicius Monego <monego@posteo.net>
;;; Copyright © 2020 Tanguy Le Carrour <tanguy@bioneland.org>
;;; Copyright © 2020, 2021, 2022 Michael Rohleder <mike@rohleder.de>
;;; Copyright © 2021 Greg Hogan <code@greghogan.com>
@@ -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
next prev parent reply other threads:[~2024-03-24 13:55 UTC|newest]
Thread overview: 45+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-03-24 13:38 [bug#69980] [PATCH 00/13] Update and cleanup pre-commit & friends Vinicius Monego
2024-03-24 13:40 ` [bug#69980] [PATCH 01/13] gnu: python-loguru: Remove pre-commit from native-inputs Vinicius Monego
2024-03-24 13:40 ` [bug#69980] [PATCH 02/13] gnu: python-jsonargparse: " Vinicius Monego
2024-03-24 13:40 ` [bug#69980] [PATCH 03/13] gnu: python-traitlets: " Vinicius Monego
2024-03-24 13:40 ` [bug#69980] [PATCH 04/13] gnu: python-seaborn: " Vinicius Monego
2024-03-24 13:40 ` [bug#69980] [PATCH 05/13] gnu: python-rich-click: " Vinicius Monego
2024-03-24 13:40 ` [bug#69980] [PATCH 06/13] gnu: python-lazy-loader: " Vinicius Monego
2024-03-24 13:40 ` [bug#69980] [PATCH 07/13] gnu: python-jupytext: " Vinicius Monego
2024-03-24 13:40 ` [bug#69980] [PATCH 08/13] gnu: python-omnipath: " Vinicius Monego
2024-03-24 13:40 ` [bug#69980] [PATCH 09/13] gnu: python-cfgv: Update to 3.4.0 Vinicius Monego
2024-03-24 13:40 ` [bug#69980] [PATCH 10/13] gnu: Add python-ukkonen Vinicius Monego
2024-03-24 13:40 ` [bug#69980] [PATCH 11/13] gnu: python-identify: Update to 2.5.35 Vinicius Monego
2024-04-17 22:07 ` Nicolas Graves via Guix-patches via
2024-03-24 13:40 ` [bug#69980] [PATCH 12/13] gnu: python-nodeenv: Update to 1.8.0 Vinicius Monego
2024-03-24 13:40 ` Vinicius Monego [this message]
2024-05-09 14:46 ` [bug#69980] [PATCH v2 00/14] Update and cleanup pre-commit & friends Nicolas Graves via Guix-patches via
2024-05-09 14:47 ` [bug#69980] [PATCH v2 01/14] gnu: python-jsonargparse: Remove pre-commit from native-inputs Nicolas Graves via Guix-patches via
2024-05-09 14:47 ` [bug#69980] [PATCH v2 02/14] gnu: python-traitlets: " Nicolas Graves via Guix-patches via
2024-05-09 14:47 ` [bug#69980] [PATCH v2 03/14] gnu: python-seaborn: " Nicolas Graves via Guix-patches via
2024-05-09 14:47 ` [bug#69980] [PATCH v2 04/14] gnu: python-rich-click: " Nicolas Graves via Guix-patches via
2024-05-09 14:47 ` [bug#69980] [PATCH v2 05/14] gnu: python-lazy-loader: " Nicolas Graves via Guix-patches via
2024-05-09 14:47 ` [bug#69980] [PATCH v2 06/14] gnu: python-jupytext: " Nicolas Graves via Guix-patches via
2024-05-09 14:47 ` [bug#69980] [PATCH v2 07/14] gnu: python-omnipath: " Nicolas Graves via Guix-patches via
2024-05-09 14:47 ` [bug#69980] [PATCH v2 08/14] gnu: python-cfgv: Update to 3.4.0 Nicolas Graves via Guix-patches via
2024-05-09 14:47 ` [bug#69980] [PATCH v2 09/14] gnu: Add python-ukkonen Nicolas Graves via Guix-patches via
2024-05-09 14:47 ` [bug#69980] [PATCH v2 10/14] gnu: python-identify: Update to 2.5.35 Nicolas Graves via Guix-patches via
2024-05-09 14:47 ` [bug#69980] [PATCH v2 11/14] gnu: python-nodeenv: Update to 1.8.0 Nicolas Graves via Guix-patches via
2024-05-09 14:47 ` [bug#69980] [PATCH v2 12/14] gnu: pre-commit: Update to 3.6.2 Nicolas Graves via Guix-patches via
2024-05-09 14:47 ` [bug#69980] [PATCH v2 13/14] gnu: python-jupytext: Move to pyproject-build-system Nicolas Graves via Guix-patches via
2024-05-09 14:47 ` [bug#69980] [PATCH v2 14/14] gnu: jupytext: Fix pre-commit native-input removal Nicolas Graves via Guix-patches via
2024-06-01 14:57 ` [bug#69980] [PATCH python-team v3 00/14] Update pre-commit and remove dependents Nicolas Graves via Guix-patches via
2024-06-01 14:57 ` [bug#69980] [PATCH python-team v3 01/14] gnu: python-jsonargparse: Remove pre-commit from native-inputs Nicolas Graves via Guix-patches via
2024-06-01 14:57 ` [bug#69980] [PATCH python-team v3 02/14] gnu: python-traitlets: " Nicolas Graves via Guix-patches via
2024-06-01 14:57 ` [bug#69980] [PATCH python-team v3 03/14] gnu: python-rich-click: " Nicolas Graves via Guix-patches via
2024-06-01 14:57 ` [bug#69980] [PATCH python-team v3 04/14] gnu: python-lazy-loader: " Nicolas Graves via Guix-patches via
2024-06-01 14:57 ` [bug#69980] [PATCH python-team v3 05/14] gnu: python-omnipath: " Nicolas Graves via Guix-patches via
2024-06-01 14:57 ` [bug#69980] [PATCH python-team v3 06/14] gnu: python-jupytext: " Nicolas Graves via Guix-patches via
2024-06-01 14:57 ` [bug#69980] [PATCH python-team v3 07/14] gnu: python-seaborn: " Nicolas Graves via Guix-patches via
2024-06-01 14:57 ` [bug#69980] [PATCH python-team v3 08/14] gnu: python-cfgv: Update to 3.4.0 Nicolas Graves via Guix-patches via
2024-06-01 14:57 ` [bug#69980] [PATCH python-team v3 09/14] gnu: Add python-ukkonen Nicolas Graves via Guix-patches via
2024-06-01 14:57 ` [bug#69980] [PATCH python-team v3 10/14] gnu: python-identify: Update to 2.5.36 Nicolas Graves via Guix-patches via
2024-06-01 14:57 ` [bug#69980] [PATCH python-team v3 11/14] gnu: python-nodeenv: Update to 1.8.0 Nicolas Graves via Guix-patches via
2024-06-01 14:58 ` [bug#69980] [PATCH python-team v3 12/14] gnu: pre-commit: Update to 3.7.1 Nicolas Graves via Guix-patches via
2024-06-01 14:58 ` [bug#69980] [PATCH python-team v3 13/14] gnu: python-jupytext: Move to pyproject-build-system Nicolas Graves via Guix-patches via
2024-06-01 14:58 ` [bug#69980] [PATCH python-team v3 14/14] gnu: jupytext: Fix pre-commit native-input removal Nicolas Graves via Guix-patches via
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://guix.gnu.org/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=923daa675a7cbc414ebc2e4032044ba8b9fb2f37.1711287459.git.monego@posteo.net \
--to=monego@posteo.net \
--cc=69980@debbugs.gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/guix.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).