[PATCH 1/2] gnu: pre-commit: Update to 2.13.0.

  • Done
  • quality assurance status badge
Details
2 participants
  • Efraim Flashner
  • Vinicius Monego
Owner
unassigned
Submitted by
Vinicius Monego
Severity
normal
V
V
Vinicius Monego wrote on 12 Jun 2021 23:19
(address . guix-patches@gnu.org)(name . Vinicius Monego)(address . monego@posteo.net)
20210612211933.785958-1-monego@posteo.net
* gnu/packages/version-control.scm (pre-commit): Update to 2.13.0.
[arguments]<#:phases>: Don't return #t.
[synopsis]: Slightly shorten it.
---
gnu/packages/version-control.scm | 12 +++++-------
1 file changed, 5 insertions(+), 7 deletions(-)

Toggle diff (53 lines)
diff --git a/gnu/packages/version-control.scm b/gnu/packages/version-control.scm
index 5900779de8..9f5341b4f9 100644
--- a/gnu/packages/version-control.scm
+++ b/gnu/packages/version-control.scm
@@ -1520,7 +1520,7 @@ control to Git repositories.")
(define-public pre-commit
(package
(name "pre-commit")
- (version "2.12.1")
+ (version "2.13.0")
(source
(origin
;; No tests in the PyPI tarball.
@@ -1530,7 +1530,7 @@ control to Git repositories.")
(commit (string-append "v" version))))
(file-name (git-file-name name version))
(sha256
- (base32 "0gwy5bnjnlj6yjcmghsibrcijvz9isxcygln7ihvi728p04rgymf"))))
+ (base32 "02lr8d6fkr32j4rpp2ac84a5gjwq16k1hb74j6js0kxg83qw6raf"))))
(build-system python-build-system)
(arguments
`(#:phases
@@ -1550,8 +1550,7 @@ control to Git repositories.")
;; 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")
- #t))
+ (invoke "git" "config" "--global" "user.email" "you@example.com")))
(replace 'check
(lambda* (#:key inputs outputs #:allow-other-keys)
(add-installed-pythonpath inputs outputs)
@@ -1579,8 +1578,7 @@ control to Git repositories.")
;; 'reset-gzip-timestamps' phase can do its work.
(let ((out (assoc-ref outputs "out")))
(for-each make-file-writable
- (find-files out "\\.gz$"))
- #t))))))
+ (find-files out "\\.gz$"))))))))
(native-inputs
`(("git" ,git-minimal)
("python-covdefaults" ,python-covdefaults)
@@ -1599,7 +1597,7 @@ control to Git repositories.")
("python-toml" ,python-toml)
("python-virtualenv" ,python-virtualenv)))
(home-page "https://pre-commit.com/")
- (synopsis "Framework for managing and maintaining multi-language pre-commit hooks")
+ (synopsis "Framework for managing and maintaining pre-commit hooks")
(description
"Pre-commit is a multi-language package manager for pre-commit hooks. You
specify a list of hooks you want and pre-commit manages the installation and
--
2.32.0
V
V
Vinicius Monego wrote on 12 Jun 2021 23:21
[PATCH 2/2] gnu: pre-commit: Respect #:tests?.
(address . 48981@debbugs.gnu.org)(name . Vinicius Monego)(address . monego@posteo.net)
20210612212110.786147-1-monego@posteo.net
* gnu/packages/version-control.scm (pre-commit)[arguments]: Respect #:tests?
in the 'check phase.
---
gnu/packages/version-control.scm | 39 ++++++++++++++++----------------
1 file changed, 20 insertions(+), 19 deletions(-)

Toggle diff (53 lines)
diff --git a/gnu/packages/version-control.scm b/gnu/packages/version-control.scm
index 9f5341b4f9..7792c608e4 100644
--- a/gnu/packages/version-control.scm
+++ b/gnu/packages/version-control.scm
@@ -1552,26 +1552,27 @@ control to Git repositories.")
(invoke "git" "config" "--global" "user.name" "Your Name")
(invoke "git" "config" "--global" "user.email" "you@example.com")))
(replace 'check
- (lambda* (#:key inputs outputs #:allow-other-keys)
+ (lambda* (#:key inputs outputs tests? #:allow-other-keys)
(add-installed-pythonpath inputs outputs)
- ;; The file below contains about 30 tests that fail because they
- ;; depend on tools from multiple languages (cargo, npm, cpan,
- ;; Rscript, etc). There are other tests that pass, but it's more
- ;; convenient to skip the whole 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"
- ;; FIXME: Python tests fail because of distlib version
- ;; mismatch. Even with python-distlib/next it is
- ;; pulling version 0.3.0, while 0.3.1 is required.
- "--ignore=tests/languages/python_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"))))
+ (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"
+ ;; FIXME: Python tests fail because of distlib version
+ ;; mismatch. Even with python-distlib/next it is
+ ;; pulling version 0.3.0, while 0.3.1 is required.
+ "--ignore=tests/languages/python_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")))))
(add-before 'reset-gzip-timestamps 'make-gz-writable
(lambda* (#:key outputs #:allow-other-keys)
;; Make sure .gz files are writable so that the
--
2.32.0
E
E
Efraim Flashner wrote on 13 Jun 2021 09:19
Re: [bug#48981] [PATCH 1/2] gnu: pre-commit: Update to 2.13.0.
(name . Vinicius Monego)(address . monego@posteo.net)(address . 48981-done@debbugs.gnu.org)
YMWxaAcNqNz/5H7D@3900XT
Thanks. Patches pushed!

--
Efraim Flashner <efraim@flashner.co.il> ????? ?????
GPG key = A28B F40C 3E55 1372 662D 14F7 41AA E7DC CA3D 8351
Confidentiality cannot be guaranteed on emails sent or received unencrypted
-----BEGIN PGP SIGNATURE-----

iQIzBAABCgAdFiEEoov0DD5VE3JmLRT3Qarn3Mo9g1EFAmDFsWgACgkQQarn3Mo9
g1FYhA/9GlPDDzSfc6dxj/Bn60kE88uQ3GWAoFtuDZXN3Cr4Zi6GBKJTBig7o+SE
kFsywQvPQPmH3QNyczztXT3aKvLyixKtt+LYoHKjCuiQs3R/3wFLI4MrLreJilNL
mKUqC5pA69q7ysuQ8yLIm3r8wntheT4CCR9//CLiWyoLNQ2h3qyhjAwGY1GUMxxM
04Q3T9tbJsEGcTyoVZTCQzKofkshp0BNzr5CemYUUJpHoHVv9xD/LFBRhXuowbqI
RAqs7OqwtqAxhSUqoEytNlVrAYgDDubTCAw9k5bk8VP0jZ2VXe3m6AL2pvTk20mD
ijhW37QNkiZlEak+0gC+mIGFAnYg9MIg2s4jUiuSMCk1Tux+PopbLSWsgp3ggeBN
ELZE6wA5GSrjpimAlvB1bczsvgS87u2CzCJlByLa0mZB/YMmFLe8uxC3+mFJ+Z1v
eVSLQgs8eiwg9hn+b/I4Npq67fv/LxTYwYXjoIMVfTVLmD6Ikpbf/VlnBx6qop+L
3o+TbGQsB6X6XXrQnx1JVGSyhtM1uuBA4sPyYP0SzACeLBJjEys6SegjMe19uAfq
xC6ieHD3ZVq1w8wz5ofPTz2gvVAezDDqj/u8eRwLWcxOODrqpIQ3mfrnRuoQjd5+
N3hnGvuzJjxoCb1MzufKwfDgLLZ0YVAZs99FR5CKXD7iQnLfEAg=
=3akh
-----END PGP SIGNATURE-----


Closed
?