[PATCH 00/13] Update and cleanup pre-commit & friends.

  • Open
  • quality assurance status badge
Details
2 participants
  • Vinicius Monego
  • Nicolas Graves
Owner
unassigned
Submitted by
Vinicius Monego
Severity
normal
V
V
Vinicius Monego wrote on 24 Mar 14:38 +0100
(address . guix-patches@gnu.org)(name . Vinicius Monego)(address . monego@posteo.net)
cover.1711287459.git.monego@posteo.net
Vinicius Monego (13):
gnu: python-loguru: Remove pre-commit from native-inputs.
gnu: python-jsonargparse: Remove pre-commit from native-inputs.
gnu: python-traitlets: Remove pre-commit from native-inputs.
gnu: python-seaborn: Remove pre-commit from native-inputs.
gnu: python-rich-click: Remove pre-commit from native-inputs.
gnu: python-lazy-loader: Remove pre-commit from native-inputs.
gnu: python-jupytext: Remove pre-commit from native-inputs.
gnu: python-omnipath: Remove pre-commit from native-inputs.
gnu: python-cfgv: Update to 3.4.0.
gnu: Add python-ukkonen.
gnu: python-identify: Update to 2.5.35.
gnu: python-nodeenv: Update to 1.8.0.
gnu: pre-commit: Update to 3.6.2.

gnu/packages/python-web.scm | 1 -
gnu/packages/python-xyz.scm | 81 +++++++++++------------
gnu/packages/version-control.scm | 106 +++++++++++++------------------
3 files changed, 85 insertions(+), 103 deletions(-)


base-commit: bf530017f0e847ae895919b32ef37d79fa636a1e
--
2.39.2
V
V
Vinicius Monego wrote on 24 Mar 14:40 +0100
[PATCH 05/13] gnu: python-rich-click: Remove pre-commit from native-inputs.
(address . 69980@debbugs.gnu.org)(name . Vinicius Monego)(address . monego@posteo.net)
5dfa23017fe074f376ea27db18851bbf55c323c0.1711287459.git.monego@posteo.net
* gnu/packages/python-xyz.scm (python-rich-click)[native-inputs]: Remove
python-pre-commit.

Change-Id: I7a1de6166e4fe9f255cff8819b4779e76d7a4537
---
gnu/packages/python-xyz.scm | 1 -
1 file changed, 1 deletion(-)

Toggle diff (14 lines)
diff --git a/gnu/packages/python-xyz.scm b/gnu/packages/python-xyz.scm
index 898c884fa5..d8056bc127 100644
--- a/gnu/packages/python-xyz.scm
+++ b/gnu/packages/python-xyz.scm
@@ -19588,7 +19588,6 @@ (define-public python-rich-click
(build-system python-build-system)
(propagated-inputs
(list python-click python-importlib-metadata python-rich))
- (native-inputs (list python-pre-commit))
(home-page "https://github.com/ewels/rich-click")
(synopsis "Format click help output nicely with rich")
(description "Click is a \"Python package for creating beautiful command
--
2.39.2
V
V
Vinicius Monego wrote on 24 Mar 14:40 +0100
[PATCH 07/13] gnu: python-jupytext: Remove pre-commit from native-inputs.
(address . 69980@debbugs.gnu.org)(name . Vinicius Monego)(address . monego@posteo.net)
b7c96dc30ad844b681580561e78cb5747ab1b96a.1711287459.git.monego@posteo.net
* gnu/packages/python-xyz.scm (python-jupytext)[native-inputs]: Remove
pre-commit.

Change-Id: I9e43aa760ef11ffabd0d374593e2e1ea77e9b086
---
gnu/packages/python-xyz.scm | 1 -
1 file changed, 1 deletion(-)

Toggle diff (14 lines)
diff --git a/gnu/packages/python-xyz.scm b/gnu/packages/python-xyz.scm
index 77c29edb45..23a6490154 100644
--- a/gnu/packages/python-xyz.scm
+++ b/gnu/packages/python-xyz.scm
@@ -375,7 +375,6 @@ (define-public python-jupytext
" and not "))))))))))
(native-inputs
(list git-minimal
- pre-commit
python-autopep8
python-black
python-flake8
--
2.39.2
V
V
Vinicius Monego wrote on 24 Mar 14:40 +0100
[PATCH 08/13] gnu: python-omnipath: Remove pre-commit from native-inputs.
(address . 69980@debbugs.gnu.org)(name . Vinicius Monego)(address . monego@posteo.net)
2b19671d98e4c87b60791caac20f54834dc290be.1711287459.git.monego@posteo.net
* gnu/packages/python-xyz.scm (python-omnipath)[native-inputs]: Remove
python-pre-commit.

Change-Id: Idfdf978df55e2c3cb3c8447aa18456cc9de4c4c2
---
gnu/packages/python-web.scm | 1 -
1 file changed, 1 deletion(-)

Toggle diff (14 lines)
diff --git a/gnu/packages/python-web.scm b/gnu/packages/python-web.scm
index fc01fc4b83..bbe4ddd788 100644
--- a/gnu/packages/python-web.scm
+++ b/gnu/packages/python-web.scm
@@ -2101,7 +2101,6 @@ (define-public python-omnipath
python-wrapt))
(native-inputs
(list python-bump2version
- python-pre-commit
python-pytest
python-pytest-mock
python-requests-mock
--
2.39.2
V
V
Vinicius Monego wrote on 24 Mar 14:40 +0100
[PATCH 09/13] gnu: python-cfgv: Update to 3.4.0.
(address . 69980@debbugs.gnu.org)(name . Vinicius Monego)(address . monego@posteo.net)
0ecea872e409c8625768b6269933a3aeffe6c284.1711287459.git.monego@posteo.net
* gnu/packages/python-xyz.scm (python-cfgv): Update to 3.4.0.
[build-system]: Use pyproject-build-system.
[arguments]: Do not override the check phase.

Change-Id: Id666a57e4d619697ffa272893930f1c94d5c283e
---
gnu/packages/python-xyz.scm | 13 +++----------
1 file changed, 3 insertions(+), 10 deletions(-)

Toggle diff (33 lines)
diff --git a/gnu/packages/python-xyz.scm b/gnu/packages/python-xyz.scm
index 23a6490154..cead8ece1d 100644
--- a/gnu/packages/python-xyz.scm
+++ b/gnu/packages/python-xyz.scm
@@ -26902,7 +26902,7 @@ (define-public python-dns-lexicon
(define-public python-cfgv
(package
(name "python-cfgv")
- (version "3.3.1")
+ (version "3.4.0")
(source
(origin
;; There are no tests in the PyPI tarball.
@@ -26912,15 +26912,8 @@ (define-public python-cfgv
(commit (string-append "v" version))))
(file-name (git-file-name name version))
(sha256
- (base32 "1pci97cmn3v45sfch9s3lshidrl0309ls9byidic0l8drkwnkwcj"))))
- (build-system python-build-system)
- (arguments
- `(#:phases
- (modify-phases %standard-phases
- (replace 'check
- (lambda* (#:key tests? #:allow-other-keys)
- (when tests?
- (invoke "pytest" "-vv")))))))
+ (base32 "0g7jg6dssyax6k85lk8afs8qdzgq138g6ij0jmmhgdv5fzks6k9z"))))
+ (build-system pyproject-build-system)
(native-inputs
(list python-pytest))
(home-page "https://github.com/asottile/cfgv")
--
2.39.2
V
V
Vinicius Monego wrote on 24 Mar 14:40 +0100
[PATCH 10/13] gnu: Add python-ukkonen.
(address . 69980@debbugs.gnu.org)(name . Vinicius Monego)(address . monego@posteo.net)
afa7121d3f5b60b8edc2e444e55fa9f3da1836dd.1711287459.git.monego@posteo.net
* gnu/packages/python-xyz.scm (python-ukkonen): New variable.

Change-Id: I826b003f1c22e5bf28829d9f2adc5f467d17ed45
---
gnu/packages/python-xyz.scm | 23 +++++++++++++++++++++++
1 file changed, 23 insertions(+)

Toggle diff (36 lines)
diff --git a/gnu/packages/python-xyz.scm b/gnu/packages/python-xyz.scm
index cead8ece1d..03fdccba78 100644
--- a/gnu/packages/python-xyz.scm
+++ b/gnu/packages/python-xyz.scm
@@ -26691,6 +26691,29 @@ (define-public python-requests-file
library to allow local file system access via @code{file://} URLs.")
(license license:asl2.0)))
+(define-public python-ukkonen
+ (package
+ (name "python-ukkonen")
+ (version "1.0.1")
+ (source
+ (origin
+ ;; There are no tests in the PyPI tarball.
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/asottile/ukkonen")
+ (commit (string-append "v" version))))
+ (file-name (git-file-name name version))
+ (sha256
+ (base32 "17gspl2dsykg000275svvyam4k7wz9ypi9xrfrmsgcgryczravlc"))))
+ (build-system pyproject-build-system)
+ (native-inputs (list python-pytest))
+ (propagated-inputs (list python-cffi))
+ (home-page "https://github.com/asottile/ukkonen")
+ (synopsis "Implementation of bounded Levenshtein distance (Ukkonen)")
+ (description "This package is an implementation of of bounded Levenshtein
+distance (Ukkonen).")
+ (license license:expat)))
+
(define-public python-identify
(package
(name "python-identify")
--
2.39.2
V
V
Vinicius Monego wrote on 24 Mar 14:40 +0100
[PATCH 12/13] gnu: python-nodeenv: Update to 1.8.0.
(address . 69980@debbugs.gnu.org)(name . Vinicius Monego)(address . monego@posteo.net)
5b312ec5d9cbabf7b1191eebff0da40422120f15.1711287459.git.monego@posteo.net
* gnu/packages/python-xyz.scm (python-nodeenv): Update to 1.8.0.
[build-system]: Use pyproject-build-system.
[arguments]: Do not override the check phase, skip tests in #:test-flags
instead.

Change-Id: I01ca1948c30327827d6f76697b471a4d90cd6530
---
gnu/packages/python-xyz.scm | 16 +++++++---------
1 file changed, 7 insertions(+), 9 deletions(-)

Toggle diff (37 lines)
diff --git a/gnu/packages/python-xyz.scm b/gnu/packages/python-xyz.scm
index d7af0646fc..b8abe5fd75 100644
--- a/gnu/packages/python-xyz.scm
+++ b/gnu/packages/python-xyz.scm
@@ -26813,7 +26813,7 @@ (define-public python-tldr
(define-public python-nodeenv
(package
(name "python-nodeenv")
- (version "1.4.0")
+ (version "1.8.0")
(source
(origin
;; There's no tarball in PyPI.
@@ -26823,15 +26823,13 @@ (define-public python-nodeenv
(commit version)))
(file-name (git-file-name name version))
(sha256
- (base32 "0y443icx0w7jlzmxmmcm4q8dqfiwgafbb9cp8jpm68mbqxbz40a7"))))
- (build-system python-build-system)
+ (base32 "0g8zp8zw5nnfc14ml0sil9yh7lnpz3xrdkazdkwg6pf5jqsxlvv9"))))
+ (build-system pyproject-build-system)
(arguments
- `(#:phases
- (modify-phases %standard-phases
- (replace 'check
- (lambda _
- ;; This test fails. It tries to open a network socket.
- (invoke "pytest" "-vv" "-k" "not test_smoke"))))))
+ (list #:test-flags
+ #~(list "-k" (string-append
+ "not test_smoke"
+ " and not test_smoke_n_system_special_chars"))))
(native-inputs
(list python-coverage python-mock python-pytest))
(home-page "https://ekalinin.github.io/nodeenv/")
--
2.39.2
V
V
Vinicius Monego wrote on 24 Mar 14:40 +0100
[PATCH 01/13] gnu: python-loguru: Remove pre-commit from native-inputs.
(address . 69980@debbugs.gnu.org)(name . Vinicius Monego)(address . monego@posteo.net)
bfa29505ee7beb472cf1120ec7920767f491d360.1711287459.git.monego@posteo.net
* gnu/packages/python-xyz.scm (python-loguru)[native-inputs]: Remove
python-pre-commit.

Change-Id: Id14b518c310c47c19d5911f694248cab22f50d8d
---
gnu/packages/python-xyz.scm | 1 -
1 file changed, 1 deletion(-)

Toggle diff (14 lines)
diff --git a/gnu/packages/python-xyz.scm b/gnu/packages/python-xyz.scm
index aad89d251e..7b7e56a538 100644
--- a/gnu/packages/python-xyz.scm
+++ b/gnu/packages/python-xyz.scm
@@ -31941,7 +31941,6 @@ (define-public python-loguru
(native-inputs (list python-colorama
python-freezegun
python-mypy
- python-pre-commit
python-pytest
python-pytest-cov
python-pytest-mypy-plugins
--
2.39.2
V
V
Vinicius Monego wrote on 24 Mar 14:40 +0100
[PATCH 11/13] gnu: python-identify: Update to 2.5.35.
(address . 69980@debbugs.gnu.org)(name . Vinicius Monego)(address . monego@posteo.net)
3decec1b473777fe52d7b32c455dea1ea5a5b68c.1711287459.git.monego@posteo.net
* gnu/packages/python-xyz.scm (python-identify): Update to 2.5.35.
[build-system]: Use pyproject-build-system.
[arguments]: Use G-Expressions. Do not override the check phase.
[native-inputs]: Add python-ukkonen.

Change-Id: I970507dc358029b4e2cc0a295d19db4b28202544
---
gnu/packages/python-xyz.scm | 20 ++++++++------------
1 file changed, 8 insertions(+), 12 deletions(-)

Toggle diff (42 lines)
diff --git a/gnu/packages/python-xyz.scm b/gnu/packages/python-xyz.scm
index 03fdccba78..d7af0646fc 100644
--- a/gnu/packages/python-xyz.scm
+++ b/gnu/packages/python-xyz.scm
@@ -26717,7 +26717,7 @@ (define-public python-ukkonen
(define-public python-identify
(package
(name "python-identify")
- (version "1.4.25")
+ (version "2.5.35")
(source
(origin
;; There are no tests in the PyPI tarball.
@@ -26727,19 +26727,15 @@ (define-public python-identify
(commit (string-append "v" version))))
(file-name (git-file-name name version))
(sha256
- (base32 "1fqgci6skckcq0x5pnxh6k2qjzn1ndsrgha1j6wwv1ld4g9bd3hz"))))
- (build-system python-build-system)
+ (base32 "0w1wnh4y6xll3980m555k5g4iwwk31pwjx4j0b5x88bdvfml0h4i"))))
+ (build-system pyproject-build-system)
(arguments
- `(#:phases
- (modify-phases %standard-phases
- ;; system-error "utime" "~A" ("No such file or directory")
- (delete 'ensure-no-mtimes-pre-1980)
- (replace 'check
- (lambda* (#:key tests? #:allow-other-keys)
- (when tests?
- (invoke "pytest" "-vv")))))))
+ (list
+ #:phases #~(modify-phases %standard-phases
+ ;; system-error "utime" "~A" ("No such file or directory")
+ (delete 'ensure-no-mtimes-pre-1980))))
(native-inputs
- (list python-coverage python-pytest))
+ (list python-coverage python-pytest python-ukkonen))
(propagated-inputs
(list python-editdistance))
(home-page "https://github.com/chriskuehl/identify")
--
2.39.2
V
V
Vinicius Monego wrote on 24 Mar 14:40 +0100
[PATCH 04/13] gnu: python-seaborn: Remove pre-commit from native-inputs.
(address . 69980@debbugs.gnu.org)(name . Vinicius Monego)(address . monego@posteo.net)
269de570a554f1f87079c4c3370ffd2e18f08dd8.1711287459.git.monego@posteo.net
* gnu/packages/python-xyz.scm (python-seaborn)[native-inputs]: Remove
python-pre-commit.

Change-Id: I8b7016f1d8103dd9297626b7ec74a120fa1c848b
---
gnu/packages/python-xyz.scm | 1 -
1 file changed, 1 deletion(-)

Toggle diff (14 lines)
diff --git a/gnu/packages/python-xyz.scm b/gnu/packages/python-xyz.scm
index 261dde03a2..898c884fa5 100644
--- a/gnu/packages/python-xyz.scm
+++ b/gnu/packages/python-xyz.scm
@@ -13133,7 +13133,6 @@ (define-public python-seaborn
(native-inputs
(list python-flake8
python-flit-core
- python-pre-commit
python-pytest
python-pytest-cov
python-pytest-xdist))
--
2.39.2
V
V
Vinicius Monego wrote on 24 Mar 14:40 +0100
[PATCH 13/13] gnu: pre-commit: Update to 3.6.2.
(address . 69980@debbugs.gnu.org)(name . Vinicius Monego)(address . monego@posteo.net)
923daa675a7cbc414ebc2e4032044ba8b9fb2f37.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(-)

Toggle diff (139 lines)
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
V
V
Vinicius Monego wrote on 24 Mar 14:40 +0100
[PATCH 02/13] gnu: python-jsonargparse: Remove pre-commit from native-inputs.
(address . 69980@debbugs.gnu.org)(name . Vinicius Monego)(address . monego@posteo.net)
a8c1190b73f342c11d83f9bb18e9ea2606d3e885.1711287459.git.monego@posteo.net
* gnu/packages/python-xyz.scm (python-jsonargparse)[native-inputs]: Remove
python-pre-commit.

Change-Id: Iac844f4521f985cb07ef407b999dfc7f61605bca
---
gnu/packages/python-xyz.scm | 1 -
1 file changed, 1 deletion(-)

Toggle diff (14 lines)
diff --git a/gnu/packages/python-xyz.scm b/gnu/packages/python-xyz.scm
index 7b7e56a538..2aec657662 100644
--- a/gnu/packages/python-xyz.scm
+++ b/gnu/packages/python-xyz.scm
@@ -4241,7 +4241,6 @@ (define-public python-jsonargparse
(native-inputs
(list python-attrs
python-coverage
- python-pre-commit
python-pycodestyle
python-pydantic
python-pytest
--
2.39.2
V
V
Vinicius Monego wrote on 24 Mar 14:40 +0100
[PATCH 03/13] gnu: python-traitlets: Remove pre-commit from native-inputs.
(address . 69980@debbugs.gnu.org)(name . Vinicius Monego)(address . monego@posteo.net)
3b3dd7a031bdfa10d92fa6167bbab0df701e5ec5.1711287459.git.monego@posteo.net
* gnu/packages/python-xyz.scm (python-traitlets)[native-inputs]: Remove
python-pre-commit.

Change-Id: I3d36f47e8955c648282bc707fafa57ba00cda933
---
gnu/packages/python-xyz.scm | 1 -
1 file changed, 1 deletion(-)

Toggle diff (14 lines)
diff --git a/gnu/packages/python-xyz.scm b/gnu/packages/python-xyz.scm
index 2aec657662..261dde03a2 100644
--- a/gnu/packages/python-xyz.scm
+++ b/gnu/packages/python-xyz.scm
@@ -11708,7 +11708,6 @@ (define-public python-traitlets
(build-system pyproject-build-system)
(native-inputs
(list python-hatchling
- python-pre-commit
python-pytest
python-pytest-mock))
(home-page "https://ipython.org")
--
2.39.2
V
V
Vinicius Monego wrote on 24 Mar 14:40 +0100
[PATCH 06/13] gnu: python-lazy-loader: Remove pre-commit from native-inputs.
(address . 69980@debbugs.gnu.org)(name . Vinicius Monego)(address . monego@posteo.net)
30a7cd9b8aa6ddcd4c3ed1b6c96a916f37dcce9c.1711287459.git.monego@posteo.net
* gnu/packages/python-xyz.scm (python-lazy-loader)[native-inputs]: Remove
python-pre-commit.

Change-Id: Id360c7c6a34457d95084227805fcd0bad1b30e12
---
gnu/packages/python-xyz.scm | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)

Toggle diff (16 lines)
diff --git a/gnu/packages/python-xyz.scm b/gnu/packages/python-xyz.scm
index d8056bc127..77c29edb45 100644
--- a/gnu/packages/python-xyz.scm
+++ b/gnu/packages/python-xyz.scm
@@ -20981,8 +20981,7 @@ (define-public python-lazy-loader
"0dwghffnsjjf4pi4gwbl43rx04jmap375hdamafs5cpm6j78js1v"))))
(build-system pyproject-build-system)
(native-inputs
- (list python-pre-commit
- python-pytest
+ (list python-pytest
python-pytest-cov))
(propagated-inputs
(list python-flit-core))
--
2.39.2
N
N
Nicolas Graves wrote on 18 Apr 00:07 +0200
Re: [bug#69980] [PATCH 11/13] gnu: python-identify: Update to 2.5.35.
(name . Vinicius Monego)(address . monego@posteo.net)
87msprmymq.fsf@ngraves.fr
lint complains about permanent redirect from


On 2024-03-24 13:40, Vinicius Monego wrote:

Toggle quote (51 lines)
> * gnu/packages/python-xyz.scm (python-identify): Update to 2.5.35.
> [build-system]: Use pyproject-build-system.
> [arguments]: Use G-Expressions. Do not override the check phase.
> [native-inputs]: Add python-ukkonen.
>
> Change-Id: I970507dc358029b4e2cc0a295d19db4b28202544
> ---
> gnu/packages/python-xyz.scm | 20 ++++++++------------
> 1 file changed, 8 insertions(+), 12 deletions(-)
>
> diff --git a/gnu/packages/python-xyz.scm b/gnu/packages/python-xyz.scm
> index 03fdccba78..d7af0646fc 100644
> --- a/gnu/packages/python-xyz.scm
> +++ b/gnu/packages/python-xyz.scm
> @@ -26717,7 +26717,7 @@ (define-public python-ukkonen
> (define-public python-identify
> (package
> (name "python-identify")
> - (version "1.4.25")
> + (version "2.5.35")
> (source
> (origin
> ;; There are no tests in the PyPI tarball.
> @@ -26727,19 +26727,15 @@ (define-public python-identify
> (commit (string-append "v" version))))
> (file-name (git-file-name name version))
> (sha256
> - (base32 "1fqgci6skckcq0x5pnxh6k2qjzn1ndsrgha1j6wwv1ld4g9bd3hz"))))
> - (build-system python-build-system)
> + (base32 "0w1wnh4y6xll3980m555k5g4iwwk31pwjx4j0b5x88bdvfml0h4i"))))
> + (build-system pyproject-build-system)
> (arguments
> - `(#:phases
> - (modify-phases %standard-phases
> - ;; system-error "utime" "~A" ("No such file or directory")
> - (delete 'ensure-no-mtimes-pre-1980)
> - (replace 'check
> - (lambda* (#:key tests? #:allow-other-keys)
> - (when tests?
> - (invoke "pytest" "-vv")))))))
> + (list
> + #:phases #~(modify-phases %standard-phases
> + ;; system-error "utime" "~A" ("No such file or directory")
> + (delete 'ensure-no-mtimes-pre-1980))))
> (native-inputs
> - (list python-coverage python-pytest))
> + (list python-coverage python-pytest python-ukkonen))
> (propagated-inputs
> (list python-editdistance))
> (home-page "https://github.com/chriskuehl/identify")

--
Best regards,
Nicolas Graves
N
N
Nicolas Graves wrote on 9 May 16:46 +0200
[PATCH v2 00/14] Update and cleanup pre-commit & friends.
(address . 69980@debbugs.gnu.org)(address . ngraves@ngraves.fr)
20240509144944.30385-1-ngraves@ngraves.fr
This patch series is a rebased (thus updated) and fixed (jupytext
wasn't building) version of Vinicius' original patch series.

Nicolas Graves (2):
gnu: python-jupytext: Move to pyproject-build-system.
gnu: jupytext: Fix pre-commit native-input removal.

Vinicius Monego (12):
gnu: python-jsonargparse: Remove pre-commit from native-inputs.
gnu: python-traitlets: Remove pre-commit from native-inputs.
gnu: python-seaborn: Remove pre-commit from native-inputs.
gnu: python-rich-click: Remove pre-commit from native-inputs.
gnu: python-lazy-loader: Remove pre-commit from native-inputs.
gnu: python-jupytext: Remove pre-commit from native-inputs.
gnu: python-omnipath: Remove pre-commit from native-inputs.
gnu: python-cfgv: Update to 3.4.0.
gnu: Add python-ukkonen.
gnu: python-identify: Update to 2.5.35.
gnu: python-nodeenv: Update to 1.8.0.
gnu: pre-commit: Update to 3.6.2.

gnu/packages/python-web.scm | 1 -
gnu/packages/python-xyz.scm | 106 ++++++++++++++++---------------
gnu/packages/version-control.scm | 106 +++++++++++++------------------
3 files changed, 98 insertions(+), 115 deletions(-)

--
2.41.0
N
N
Nicolas Graves wrote on 9 May 16:47 +0200
[PATCH v2 01/14] gnu: python-jsonargparse: Remove pre-commit from native-inputs.
(address . 69980@debbugs.gnu.org)
20240509144944.30385-2-ngraves@ngraves.fr
From: Vinicius Monego <monego@posteo.net>

* gnu/packages/python-xyz.scm (python-jsonargparse)[native-inputs]: Remove
python-pre-commit.

Change-Id: Iac844f4521f985cb07ef407b999dfc7f61605bca
---
gnu/packages/python-xyz.scm | 1 -
1 file changed, 1 deletion(-)

Toggle diff (14 lines)
diff --git a/gnu/packages/python-xyz.scm b/gnu/packages/python-xyz.scm
index bf989646f6b..f376e396da6 100644
--- a/gnu/packages/python-xyz.scm
+++ b/gnu/packages/python-xyz.scm
@@ -4534,7 +4534,6 @@ (define-public python-jsonargparse
(native-inputs
(list python-attrs
python-coverage
- python-pre-commit
python-pycodestyle
python-pydantic
python-pytest
--
2.41.0
N
N
Nicolas Graves wrote on 9 May 16:47 +0200
[PATCH v2 02/14] gnu: python-traitlets: Remove pre-commit from native-inputs.
(address . 69980@debbugs.gnu.org)
20240509144944.30385-3-ngraves@ngraves.fr
From: Vinicius Monego <monego@posteo.net>

* gnu/packages/python-xyz.scm (python-traitlets)[native-inputs]: Remove
python-pre-commit.

Change-Id: I3d36f47e8955c648282bc707fafa57ba00cda933
---
gnu/packages/python-xyz.scm | 1 -
1 file changed, 1 deletion(-)

Toggle diff (14 lines)
diff --git a/gnu/packages/python-xyz.scm b/gnu/packages/python-xyz.scm
index f376e396da6..366bce92e5f 100644
--- a/gnu/packages/python-xyz.scm
+++ b/gnu/packages/python-xyz.scm
@@ -12327,7 +12327,6 @@ (define-public python-traitlets
(list python-argcomplete
python-hatchling
python-mypy
- python-pre-commit
python-pytest
python-pytest-mock
python-pytest-mypy-testing))
--
2.41.0
N
N
Nicolas Graves wrote on 9 May 16:47 +0200
[PATCH v2 03/14] gnu: python-seaborn: Remove pre-commit from native-inputs.
(address . 69980@debbugs.gnu.org)
20240509144944.30385-4-ngraves@ngraves.fr
From: Vinicius Monego <monego@posteo.net>

* gnu/packages/python-xyz.scm (python-seaborn)[native-inputs]: Remove
python-pre-commit.

Change-Id: I8b7016f1d8103dd9297626b7ec74a120fa1c848b
---
gnu/packages/python-xyz.scm | 1 -
1 file changed, 1 deletion(-)

Toggle diff (14 lines)
diff --git a/gnu/packages/python-xyz.scm b/gnu/packages/python-xyz.scm
index 366bce92e5f..1e4574f70a8 100644
--- a/gnu/packages/python-xyz.scm
+++ b/gnu/packages/python-xyz.scm
@@ -13848,7 +13848,6 @@ (define-public python-seaborn
(native-inputs
(list python-flake8
python-flit-core
- python-pre-commit
python-pytest
python-pytest-cov
python-pytest-xdist))
--
2.41.0
N
N
Nicolas Graves wrote on 9 May 16:47 +0200
[PATCH v2 04/14] gnu: python-rich-click: Remove pre-commit from native-inputs.
(address . 69980@debbugs.gnu.org)
20240509144944.30385-5-ngraves@ngraves.fr
From: Vinicius Monego <monego@posteo.net>

* gnu/packages/python-xyz.scm (python-rich-click)[native-inputs]: Remove
python-pre-commit.

Change-Id: I7a1de6166e4fe9f255cff8819b4779e76d7a4537
---
gnu/packages/python-xyz.scm | 1 -
1 file changed, 1 deletion(-)

Toggle diff (14 lines)
diff --git a/gnu/packages/python-xyz.scm b/gnu/packages/python-xyz.scm
index 1e4574f70a8..5c2b1bed608 100644
--- a/gnu/packages/python-xyz.scm
+++ b/gnu/packages/python-xyz.scm
@@ -20446,7 +20446,6 @@ (define-public python-rich-click
(build-system python-build-system)
(propagated-inputs
(list python-click python-importlib-metadata python-rich))
- (native-inputs (list python-pre-commit))
(home-page "https://github.com/ewels/rich-click")
(synopsis "Format click help output nicely with rich")
(description "Click is a \"Python package for creating beautiful command
--
2.41.0
N
N
Nicolas Graves wrote on 9 May 16:47 +0200
[PATCH v2 05/14] gnu: python-lazy-loader: Remove pre-commit from native-inputs.
(address . 69980@debbugs.gnu.org)
20240509144944.30385-6-ngraves@ngraves.fr
From: Vinicius Monego <monego@posteo.net>

* gnu/packages/python-xyz.scm (python-lazy-loader)[native-inputs]: Remove
python-pre-commit.

Change-Id: Id360c7c6a34457d95084227805fcd0bad1b30e12
---
gnu/packages/python-xyz.scm | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)

Toggle diff (16 lines)
diff --git a/gnu/packages/python-xyz.scm b/gnu/packages/python-xyz.scm
index 5c2b1bed608..a2e837dc790 100644
--- a/gnu/packages/python-xyz.scm
+++ b/gnu/packages/python-xyz.scm
@@ -21865,8 +21865,7 @@ (define-public python-lazy-loader
"0dwghffnsjjf4pi4gwbl43rx04jmap375hdamafs5cpm6j78js1v"))))
(build-system pyproject-build-system)
(native-inputs
- (list python-pre-commit
- python-pytest
+ (list python-pytest
python-pytest-cov))
(propagated-inputs
(list python-flit-core))
--
2.41.0
N
N
Nicolas Graves wrote on 9 May 16:47 +0200
[PATCH v2 06/14] gnu: python-jupytext: Remove pre-commit from native-inputs.
(address . 69980@debbugs.gnu.org)
20240509144944.30385-7-ngraves@ngraves.fr
From: Vinicius Monego <monego@posteo.net>

* gnu/packages/python-xyz.scm (python-jupytext)[native-inputs]: Remove
pre-commit.

Change-Id: I9e43aa760ef11ffabd0d374593e2e1ea77e9b086
---
gnu/packages/python-xyz.scm | 1 -
1 file changed, 1 deletion(-)

Toggle diff (14 lines)
diff --git a/gnu/packages/python-xyz.scm b/gnu/packages/python-xyz.scm
index a2e837dc790..1c93236c8b0 100644
--- a/gnu/packages/python-xyz.scm
+++ b/gnu/packages/python-xyz.scm
@@ -481,7 +481,6 @@ (define-public python-jupytext
" and not "))))))))))
(native-inputs
(list git-minimal
- pre-commit
python-autopep8
python-black
python-flake8
--
2.41.0
N
N
Nicolas Graves wrote on 9 May 16:47 +0200
[PATCH v2 07/14] gnu: python-omnipath: Remove pre-commit from native-inputs.
(address . 69980@debbugs.gnu.org)
20240509144944.30385-8-ngraves@ngraves.fr
From: Vinicius Monego <monego@posteo.net>

* gnu/packages/python-xyz.scm (python-omnipath)[native-inputs]: Remove
python-pre-commit.

Change-Id: Idfdf978df55e2c3cb3c8447aa18456cc9de4c4c2
---
gnu/packages/python-web.scm | 1 -
1 file changed, 1 deletion(-)

Toggle diff (14 lines)
diff --git a/gnu/packages/python-web.scm b/gnu/packages/python-web.scm
index dd1e005b721..3cebbbbe739 100644
--- a/gnu/packages/python-web.scm
+++ b/gnu/packages/python-web.scm
@@ -2136,7 +2136,6 @@ (define-public python-omnipath
python-wrapt))
(native-inputs
(list python-bump2version
- python-pre-commit
python-pytest
python-pytest-mock
python-pytest-socket
--
2.41.0
N
N
Nicolas Graves wrote on 9 May 16:47 +0200
[PATCH v2 08/14] gnu: python-cfgv: Update to 3.4.0.
(address . 69980@debbugs.gnu.org)
20240509144944.30385-9-ngraves@ngraves.fr
From: Vinicius Monego <monego@posteo.net>

* gnu/packages/python-xyz.scm (python-cfgv): Update to 3.4.0.
[build-system]: Use pyproject-build-system.
[arguments]: Do not override the check phase.

Change-Id: Id666a57e4d619697ffa272893930f1c94d5c283e
---
gnu/packages/python-xyz.scm | 13 +++----------
1 file changed, 3 insertions(+), 10 deletions(-)

Toggle diff (33 lines)
diff --git a/gnu/packages/python-xyz.scm b/gnu/packages/python-xyz.scm
index 1c93236c8b0..714e44b916d 100644
--- a/gnu/packages/python-xyz.scm
+++ b/gnu/packages/python-xyz.scm
@@ -27935,7 +27935,7 @@ (define-public python-dns-lexicon
(define-public python-cfgv
(package
(name "python-cfgv")
- (version "3.3.1")
+ (version "3.4.0")
(source
(origin
;; There are no tests in the PyPI tarball.
@@ -27945,15 +27945,8 @@ (define-public python-cfgv
(commit (string-append "v" version))))
(file-name (git-file-name name version))
(sha256
- (base32 "1pci97cmn3v45sfch9s3lshidrl0309ls9byidic0l8drkwnkwcj"))))
- (build-system python-build-system)
- (arguments
- `(#:phases
- (modify-phases %standard-phases
- (replace 'check
- (lambda* (#:key tests? #:allow-other-keys)
- (when tests?
- (invoke "pytest" "-vv")))))))
+ (base32 "0g7jg6dssyax6k85lk8afs8qdzgq138g6ij0jmmhgdv5fzks6k9z"))))
+ (build-system pyproject-build-system)
(native-inputs
(list python-pytest))
(home-page "https://github.com/asottile/cfgv")
--
2.41.0
N
N
Nicolas Graves wrote on 9 May 16:47 +0200
[PATCH v2 09/14] gnu: Add python-ukkonen.
(address . 69980@debbugs.gnu.org)
20240509144944.30385-10-ngraves@ngraves.fr
From: Vinicius Monego <monego@posteo.net>

* gnu/packages/python-xyz.scm (python-ukkonen): New variable.

Change-Id: I826b003f1c22e5bf28829d9f2adc5f467d17ed45
---
gnu/packages/python-xyz.scm | 23 +++++++++++++++++++++++
1 file changed, 23 insertions(+)

Toggle diff (36 lines)
diff --git a/gnu/packages/python-xyz.scm b/gnu/packages/python-xyz.scm
index 714e44b916d..67b167bfcc5 100644
--- a/gnu/packages/python-xyz.scm
+++ b/gnu/packages/python-xyz.scm
@@ -27724,6 +27724,29 @@ (define-public python-requests-file
library to allow local file system access via @code{file://} URLs.")
(license license:asl2.0)))
+(define-public python-ukkonen
+ (package
+ (name "python-ukkonen")
+ (version "1.0.1")
+ (source
+ (origin
+ ;; There are no tests in the PyPI tarball.
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/asottile/ukkonen")
+ (commit (string-append "v" version))))
+ (file-name (git-file-name name version))
+ (sha256
+ (base32 "17gspl2dsykg000275svvyam4k7wz9ypi9xrfrmsgcgryczravlc"))))
+ (build-system pyproject-build-system)
+ (native-inputs (list python-pytest))
+ (propagated-inputs (list python-cffi))
+ (home-page "https://github.com/asottile/ukkonen")
+ (synopsis "Implementation of bounded Levenshtein distance (Ukkonen)")
+ (description "This package is an implementation of of bounded Levenshtein
+distance (Ukkonen).")
+ (license license:expat)))
+
(define-public python-identify
(package
(name "python-identify")
--
2.41.0
N
N
Nicolas Graves wrote on 9 May 16:47 +0200
[PATCH v2 10/14] gnu: python-identify: Update to 2.5.35.
(address . 69980@debbugs.gnu.org)
20240509144944.30385-11-ngraves@ngraves.fr
From: Vinicius Monego <monego@posteo.net>

* gnu/packages/python-xyz.scm (python-identify): Update to 2.5.35.
[build-system]: Use pyproject-build-system.
[arguments]: Use G-Expressions. Do not override the check phase.
[native-inputs]: Add python-ukkonen.

Change-Id: I970507dc358029b4e2cc0a295d19db4b28202544
---
gnu/packages/python-xyz.scm | 20 ++++++++------------
1 file changed, 8 insertions(+), 12 deletions(-)

Toggle diff (42 lines)
diff --git a/gnu/packages/python-xyz.scm b/gnu/packages/python-xyz.scm
index 67b167bfcc5..443c484ce8e 100644
--- a/gnu/packages/python-xyz.scm
+++ b/gnu/packages/python-xyz.scm
@@ -27750,7 +27750,7 @@ (define-public python-ukkonen
(define-public python-identify
(package
(name "python-identify")
- (version "1.4.25")
+ (version "2.5.35")
(source
(origin
;; There are no tests in the PyPI tarball.
@@ -27760,19 +27760,15 @@ (define-public python-identify
(commit (string-append "v" version))))
(file-name (git-file-name name version))
(sha256
- (base32 "1fqgci6skckcq0x5pnxh6k2qjzn1ndsrgha1j6wwv1ld4g9bd3hz"))))
- (build-system python-build-system)
+ (base32 "0w1wnh4y6xll3980m555k5g4iwwk31pwjx4j0b5x88bdvfml0h4i"))))
+ (build-system pyproject-build-system)
(arguments
- `(#:phases
- (modify-phases %standard-phases
- ;; system-error "utime" "~A" ("No such file or directory")
- (delete 'ensure-no-mtimes-pre-1980)
- (replace 'check
- (lambda* (#:key tests? #:allow-other-keys)
- (when tests?
- (invoke "pytest" "-vv")))))))
+ (list
+ #:phases #~(modify-phases %standard-phases
+ ;; system-error "utime" "~A" ("No such file or directory")
+ (delete 'ensure-no-mtimes-pre-1980))))
(native-inputs
- (list python-coverage python-pytest))
+ (list python-coverage python-pytest python-ukkonen))
(propagated-inputs
(list python-editdistance))
(home-page "https://github.com/chriskuehl/identify")
--
2.41.0
N
N
Nicolas Graves wrote on 9 May 16:47 +0200
[PATCH v2 12/14] gnu: pre-commit: Update to 3.6.2.
(address . 69980@debbugs.gnu.org)
20240509144944.30385-13-ngraves@ngraves.fr
From: Vinicius Monego <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(-)

Toggle diff (139 lines)
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 <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>
@@ -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
N
N
Nicolas Graves wrote on 9 May 16:47 +0200
[PATCH v2 13/14] gnu: python-jupytext: Move to pyproject-build-system.
(address . 69980@debbugs.gnu.org)(address . ngraves@ngraves.fr)
20240509144944.30385-14-ngraves@ngraves.fr
* gnu/packages/python-xyz.scm (python-jupytext):
[build-system]: Move to pyproject-build-system.
[arguments]<#:test-flags>: Add flags.
<#:phases>: Remove 'check phase replacement.

Change-Id: I5d708c2fc76b609105c1551a6ed1755c56efcada
---
gnu/packages/python-xyz.scm | 25 ++++++++++++-------------
1 file changed, 12 insertions(+), 13 deletions(-)

Toggle diff (45 lines)
diff --git a/gnu/packages/python-xyz.scm b/gnu/packages/python-xyz.scm
index 58405d1deaf..5dc1e512228 100644
--- a/gnu/packages/python-xyz.scm
+++ b/gnu/packages/python-xyz.scm
@@ -459,26 +459,25 @@ (define-public python-jupytext
(file-name (git-file-name name version))
(sha256
(base32 "0bgf0c4py22ip7qfla8mrmypfh3bg151c8awsr1gvcbw7m4ni01k"))))
- (build-system python-build-system)
+ (build-system pyproject-build-system)
(arguments
(list
+ #:test-flags
+ '(list "-k" (string-append
+ "not "
+ (string-join
+ (list "test_create_header_with_set_formats"
+ "test_pre_commit_hook"
+ "test_sync_with_pre_commit_hook")
+ " and not ")))
#:phases
#~(modify-phases %standard-phases
- (replace 'check
- (lambda* (#:key tests? #:allow-other-keys)
+ (add-before 'check 'pre-check
+ (lambda _
;; some tests fail when HOME=/homeless-shelter.
(setenv "HOME" "/tmp")
;; OSError: [Errno 18] Invalid cross-device link
- (setenv "TMPDIR" "/tmp")
- (when tests?
- (let ((disabled-tests
- (list "test_create_header_with_set_formats"
- "test_pre_commit_hook"
- "test_sync_with_pre_commit_hook")))
- (invoke "pytest" "-vv" "-k"
- (string-append "not "
- (string-join disabled-tests
- " and not "))))))))))
+ (setenv "TMPDIR" "/tmp"))))))
(native-inputs
(list git-minimal
python-autopep8
--
2.41.0
N
N
Nicolas Graves wrote on 9 May 16:47 +0200
[PATCH v2 14/14] gnu: jupytext: Fix pre-commit native-input removal.
(address . 69980@debbugs.gnu.org)(address . ngraves@ngraves.fr)
20240509144944.30385-15-ngraves@ngraves.fr
* gnu/packages/python-xyz.scm (jupytext):
[arguments]<#:test-flags>: Add a flag to ignore pre_commit tests.

Change-Id: Ifa2097da721c4927ec304c51371eea96bc0cdf41
---
gnu/packages/python-xyz.scm | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)

Toggle diff (16 lines)
diff --git a/gnu/packages/python-xyz.scm b/gnu/packages/python-xyz.scm
index 5dc1e512228..6fbc6f55591 100644
--- a/gnu/packages/python-xyz.scm
+++ b/gnu/packages/python-xyz.scm
@@ -469,7 +469,8 @@ (define-public python-jupytext
(list "test_create_header_with_set_formats"
"test_pre_commit_hook"
"test_sync_with_pre_commit_hook")
- " and not ")))
+ " and not "))
+ "--ignore-glob=tests/test_pre_commit_*.py")
#:phases
#~(modify-phases %standard-phases
(add-before 'check 'pre-check
--
2.41.0
N
N
Nicolas Graves wrote on 9 May 16:47 +0200
[PATCH v2 11/14] gnu: python-nodeenv: Update to 1.8.0.
(address . 69980@debbugs.gnu.org)
20240509144944.30385-12-ngraves@ngraves.fr
From: Vinicius Monego <monego@posteo.net>

* gnu/packages/python-xyz.scm (python-nodeenv): Update to 1.8.0.
[build-system]: Use pyproject-build-system.
[arguments]: Do not override the check phase, skip tests in #:test-flags
instead.

Change-Id: I01ca1948c30327827d6f76697b471a4d90cd6530
---
gnu/packages/python-xyz.scm | 16 +++++++---------
1 file changed, 7 insertions(+), 9 deletions(-)

Toggle diff (37 lines)
diff --git a/gnu/packages/python-xyz.scm b/gnu/packages/python-xyz.scm
index 443c484ce8e..58405d1deaf 100644
--- a/gnu/packages/python-xyz.scm
+++ b/gnu/packages/python-xyz.scm
@@ -27846,7 +27846,7 @@ (define-public python-tldr
(define-public python-nodeenv
(package
(name "python-nodeenv")
- (version "1.4.0")
+ (version "1.8.0")
(source
(origin
;; There's no tarball in PyPI.
@@ -27856,15 +27856,13 @@ (define-public python-nodeenv
(commit version)))
(file-name (git-file-name name version))
(sha256
- (base32 "0y443icx0w7jlzmxmmcm4q8dqfiwgafbb9cp8jpm68mbqxbz40a7"))))
- (build-system python-build-system)
+ (base32 "0g8zp8zw5nnfc14ml0sil9yh7lnpz3xrdkazdkwg6pf5jqsxlvv9"))))
+ (build-system pyproject-build-system)
(arguments
- `(#:phases
- (modify-phases %standard-phases
- (replace 'check
- (lambda _
- ;; This test fails. It tries to open a network socket.
- (invoke "pytest" "-vv" "-k" "not test_smoke"))))))
+ (list #:test-flags
+ #~(list "-k" (string-append
+ "not test_smoke"
+ " and not test_smoke_n_system_special_chars"))))
(native-inputs
(list python-coverage python-mock python-pytest))
(home-page "https://ekalinin.github.io/nodeenv/")
--
2.41.0
N
N
Nicolas Graves wrote on 1 Jun 16:57 +0200
[PATCH python-team v3 00/14] Update pre-commit and remove dependents
(address . 69980@debbugs.gnu.org)(address . ngraves@ngraves.fr)
20240601145902.26806-1-ngraves@ngraves.fr
Nicolas Graves (2):
gnu: python-jupytext: Move to pyproject-build-system.
gnu: jupytext: Fix pre-commit native-input removal.

Vinicius Monego (12):
gnu: python-jsonargparse: Remove pre-commit from native-inputs.
gnu: python-traitlets: Remove pre-commit from native-inputs.
gnu: python-rich-click: Remove pre-commit from native-inputs.
gnu: python-lazy-loader: Remove pre-commit from native-inputs.
gnu: python-omnipath: Remove pre-commit from native-inputs.
gnu: python-jupytext: Remove pre-commit from native-inputs.
gnu: python-seaborn: Remove pre-commit from native-inputs.
gnu: python-cfgv: Update to 3.4.0.
gnu: Add python-ukkonen.
gnu: python-identify: Update to 2.5.36.
gnu: python-nodeenv: Update to 1.8.0.
gnu: pre-commit: Update to 3.7.1.

gnu/packages/python-web.scm | 1 -
gnu/packages/python-xyz.scm | 109 ++++++++++++++++---------------
gnu/packages/version-control.scm | 90 ++++++++++---------------
3 files changed, 92 insertions(+), 108 deletions(-)

--
2.41.0
N
N
Nicolas Graves wrote on 1 Jun 16:57 +0200
[PATCH python-team v3 01/14] gnu: python-jsonargparse: Remove pre-commit from native-inputs.
(address . 69980@debbugs.gnu.org)
20240601145902.26806-2-ngraves@ngraves.fr
From: Vinicius Monego <monego@posteo.net>

* gnu/packages/python-xyz.scm (python-jsonargparse)[native-inputs]: Remove
python-pre-commit.

Change-Id: Iac844f4521f985cb07ef407b999dfc7f61605bca
---
gnu/packages/python-xyz.scm | 1 -
1 file changed, 1 deletion(-)

Toggle diff (14 lines)
diff --git a/gnu/packages/python-xyz.scm b/gnu/packages/python-xyz.scm
index 30b84d284d0..4f42bdd85de 100644
--- a/gnu/packages/python-xyz.scm
+++ b/gnu/packages/python-xyz.scm
@@ -4525,7 +4525,6 @@ (define-public python-jsonargparse
(native-inputs
(list python-attrs
python-coverage
- python-pre-commit
python-pycodestyle
python-pydantic
python-pytest
--
2.41.0
N
N
Nicolas Graves wrote on 1 Jun 16:57 +0200
[PATCH python-team v3 02/14] gnu: python-traitlets: Remove pre-commit from native-inputs.
(address . 69980@debbugs.gnu.org)
20240601145902.26806-3-ngraves@ngraves.fr
From: Vinicius Monego <monego@posteo.net>

* gnu/packages/python-xyz.scm (python-traitlets)[native-inputs]: Remove
python-pre-commit.

Change-Id: I3d36f47e8955c648282bc707fafa57ba00cda933
---
gnu/packages/python-xyz.scm | 1 -
1 file changed, 1 deletion(-)

Toggle diff (14 lines)
diff --git a/gnu/packages/python-xyz.scm b/gnu/packages/python-xyz.scm
index 4f42bdd85de..aff8d97374c 100644
--- a/gnu/packages/python-xyz.scm
+++ b/gnu/packages/python-xyz.scm
@@ -12206,7 +12206,6 @@ (define-public python-traitlets
(list python-argcomplete
python-hatchling
python-mypy
- python-pre-commit
python-pytest
python-pytest-mock
python-pytest-mypy-testing))
--
2.41.0
N
N
Nicolas Graves wrote on 1 Jun 16:57 +0200
[PATCH python-team v3 03/14] gnu: python-rich-click: Remove pre-commit from native-inputs.
(address . 69980@debbugs.gnu.org)
20240601145902.26806-4-ngraves@ngraves.fr
From: Vinicius Monego <monego@posteo.net>

* gnu/packages/python-xyz.scm (python-rich-click)[native-inputs]: Remove
python-pre-commit.

Change-Id: I7a1de6166e4fe9f255cff8819b4779e76d7a4537
---
gnu/packages/python-xyz.scm | 1 -
1 file changed, 1 deletion(-)

Toggle diff (14 lines)
diff --git a/gnu/packages/python-xyz.scm b/gnu/packages/python-xyz.scm
index aff8d97374c..18b8998c217 100644
--- a/gnu/packages/python-xyz.scm
+++ b/gnu/packages/python-xyz.scm
@@ -20304,7 +20304,6 @@ (define-public python-rich-click
(build-system python-build-system)
(propagated-inputs
(list python-click python-importlib-metadata python-rich))
- (native-inputs (list python-pre-commit))
(home-page "https://github.com/ewels/rich-click")
(synopsis "Format click help output nicely with rich")
(description "Click is a \"Python package for creating beautiful command
--
2.41.0
N
N
Nicolas Graves wrote on 1 Jun 16:57 +0200
[PATCH python-team v3 04/14] gnu: python-lazy-loader: Remove pre-commit from native-inputs.
(address . 69980@debbugs.gnu.org)
20240601145902.26806-5-ngraves@ngraves.fr
From: Vinicius Monego <monego@posteo.net>

* gnu/packages/python-xyz.scm (python-lazy-loader)[native-inputs]: Remove
python-pre-commit.

Change-Id: Id360c7c6a34457d95084227805fcd0bad1b30e12
---
gnu/packages/python-xyz.scm | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)

Toggle diff (16 lines)
diff --git a/gnu/packages/python-xyz.scm b/gnu/packages/python-xyz.scm
index 18b8998c217..aab27142ef6 100644
--- a/gnu/packages/python-xyz.scm
+++ b/gnu/packages/python-xyz.scm
@@ -21723,8 +21723,7 @@ (define-public python-lazy-loader
"0dwghffnsjjf4pi4gwbl43rx04jmap375hdamafs5cpm6j78js1v"))))
(build-system pyproject-build-system)
(native-inputs
- (list python-pre-commit
- python-pytest
+ (list python-pytest
python-pytest-cov))
(propagated-inputs
(list python-flit-core))
--
2.41.0
N
N
Nicolas Graves wrote on 1 Jun 16:57 +0200
[PATCH python-team v3 05/14] gnu: python-omnipath: Remove pre-commit from native-inputs.
(address . 69980@debbugs.gnu.org)
20240601145902.26806-6-ngraves@ngraves.fr
From: Vinicius Monego <monego@posteo.net>

* gnu/packages/python-xyz.scm (python-omnipath)[native-inputs]: Remove
python-pre-commit.

Change-Id: Idfdf978df55e2c3cb3c8447aa18456cc9de4c4c2
---
gnu/packages/python-web.scm | 1 -
1 file changed, 1 deletion(-)

Toggle diff (14 lines)
diff --git a/gnu/packages/python-web.scm b/gnu/packages/python-web.scm
index e8ead0ef12d..e417fc2bb47 100644
--- a/gnu/packages/python-web.scm
+++ b/gnu/packages/python-web.scm
@@ -2135,7 +2135,6 @@ (define-public python-omnipath
python-wrapt))
(native-inputs
(list python-bump2version
- python-pre-commit
python-pytest
python-pytest-mock
python-pytest-socket
--
2.41.0
N
N
Nicolas Graves wrote on 1 Jun 16:57 +0200
[PATCH python-team v3 06/14] gnu: python-jupytext: Remove pre-commit from native-inputs.
(address . 69980@debbugs.gnu.org)
20240601145902.26806-7-ngraves@ngraves.fr
From: Vinicius Monego <monego@posteo.net>

* gnu/packages/python-xyz.scm (python-jupytext)[native-inputs]: Remove
pre-commit.

Change-Id: I9e43aa760ef11ffabd0d374593e2e1ea77e9b086
---
gnu/packages/python-xyz.scm | 1 -
1 file changed, 1 deletion(-)

Toggle diff (14 lines)
diff --git a/gnu/packages/python-xyz.scm b/gnu/packages/python-xyz.scm
index aab27142ef6..36ff7b61f46 100644
--- a/gnu/packages/python-xyz.scm
+++ b/gnu/packages/python-xyz.scm
@@ -477,7 +477,6 @@ (define-public python-jupytext
" and not "))))))))))
(native-inputs
(list git-minimal
- pre-commit
python-autopep8
python-black
python-flake8
--
2.41.0
N
N
Nicolas Graves wrote on 1 Jun 16:57 +0200
[PATCH python-team v3 07/14] gnu: python-seaborn: Remove pre-commit from native-inputs.
(address . 69980@debbugs.gnu.org)
20240601145902.26806-8-ngraves@ngraves.fr
From: Vinicius Monego <monego@posteo.net>

* gnu/packages/python-xyz.scm (python-seaborn)[native-inputs]: Remove
python-pre-commit.

Change-Id: I8b7016f1d8103dd9297626b7ec74a120fa1c848b
---
gnu/packages/python-xyz.scm | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)

Toggle diff (18 lines)
diff --git a/gnu/packages/python-xyz.scm b/gnu/packages/python-xyz.scm
index 36ff7b61f46..e2d447b5095 100644
--- a/gnu/packages/python-xyz.scm
+++ b/gnu/packages/python-xyz.scm
@@ -13716,10 +13716,9 @@ (define-public python-seaborn
(list python-flake8
python-flit-core
python-ipykernel
- python-mypy
python-nbconvert
python-numpydoc
- python-pre-commit
+ python-mypy
python-pytest
python-pytest-cov
python-pytest-xdist
--
2.41.0
N
N
Nicolas Graves wrote on 1 Jun 16:57 +0200
[PATCH python-team v3 08/14] gnu: python-cfgv: Update to 3.4.0.
(address . 69980@debbugs.gnu.org)
20240601145902.26806-9-ngraves@ngraves.fr
From: Vinicius Monego <monego@posteo.net>

* gnu/packages/python-xyz.scm (python-cfgv): Update to 3.4.0.
[build-system]: Use pyproject-build-system.
[arguments]: Do not override the check phase.

Change-Id: Id666a57e4d619697ffa272893930f1c94d5c283e
---
gnu/packages/python-xyz.scm | 13 +++----------
1 file changed, 3 insertions(+), 10 deletions(-)

Toggle diff (33 lines)
diff --git a/gnu/packages/python-xyz.scm b/gnu/packages/python-xyz.scm
index e2d447b5095..82a29f6a9b6 100644
--- a/gnu/packages/python-xyz.scm
+++ b/gnu/packages/python-xyz.scm
@@ -27784,7 +27784,7 @@ (define-public python-dns-lexicon
(define-public python-cfgv
(package
(name "python-cfgv")
- (version "3.3.1")
+ (version "3.4.0")
(source
(origin
;; There are no tests in the PyPI tarball.
@@ -27794,15 +27794,8 @@ (define-public python-cfgv
(commit (string-append "v" version))))
(file-name (git-file-name name version))
(sha256
- (base32 "1pci97cmn3v45sfch9s3lshidrl0309ls9byidic0l8drkwnkwcj"))))
- (build-system python-build-system)
- (arguments
- `(#:phases
- (modify-phases %standard-phases
- (replace 'check
- (lambda* (#:key tests? #:allow-other-keys)
- (when tests?
- (invoke "pytest" "-vv")))))))
+ (base32 "0g7jg6dssyax6k85lk8afs8qdzgq138g6ij0jmmhgdv5fzks6k9z"))))
+ (build-system pyproject-build-system)
(native-inputs
(list python-pytest python-setuptools python-wheel))
(home-page "https://github.com/asottile/cfgv")
--
2.41.0
N
N
Nicolas Graves wrote on 1 Jun 16:57 +0200
[PATCH python-team v3 09/14] gnu: Add python-ukkonen.
(address . 69980@debbugs.gnu.org)
20240601145902.26806-10-ngraves@ngraves.fr
From: Vinicius Monego <monego@posteo.net>

* gnu/packages/python-xyz.scm (python-ukkonen): New variable.

Change-Id: I826b003f1c22e5bf28829d9f2adc5f467d17ed45
---
gnu/packages/python-xyz.scm | 23 +++++++++++++++++++++++
1 file changed, 23 insertions(+)

Toggle diff (36 lines)
diff --git a/gnu/packages/python-xyz.scm b/gnu/packages/python-xyz.scm
index 82a29f6a9b6..cfff41569e1 100644
--- a/gnu/packages/python-xyz.scm
+++ b/gnu/packages/python-xyz.scm
@@ -27569,6 +27569,29 @@ (define-public python-requests-file
library to allow local file system access via @code{file://} URLs.")
(license license:asl2.0)))
+(define-public python-ukkonen
+ (package
+ (name "python-ukkonen")
+ (version "1.0.1")
+ (source
+ (origin
+ ;; There are no tests in the PyPI tarball.
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/asottile/ukkonen")
+ (commit (string-append "v" version))))
+ (file-name (git-file-name name version))
+ (sha256
+ (base32 "17gspl2dsykg000275svvyam4k7wz9ypi9xrfrmsgcgryczravlc"))))
+ (build-system pyproject-build-system)
+ (native-inputs (list python-pytest))
+ (propagated-inputs (list python-cffi))
+ (home-page "https://github.com/asottile/ukkonen")
+ (synopsis "Implementation of bounded Levenshtein distance (Ukkonen)")
+ (description "This package is an implementation of of bounded Levenshtein
+distance (Ukkonen).")
+ (license license:expat)))
+
(define-public python-identify
(package
(name "python-identify")
--
2.41.0
N
N
Nicolas Graves wrote on 1 Jun 16:57 +0200
[PATCH python-team v3 10/14] gnu: python-identify: Update to 2.5.36.
(address . 69980@debbugs.gnu.org)
20240601145902.26806-11-ngraves@ngraves.fr
From: Vinicius Monego <monego@posteo.net>

* gnu/packages/python-xyz.scm (python-identify): Update to 2.5.36.
[build-system]: Use pyproject-build-system.
[arguments]: Use G-Expressions. Do not override the check phase.
[native-inputs]: Add python-ukkonen.

Change-Id: I970507dc358029b4e2cc0a295d19db4b28202544
---
gnu/packages/python-xyz.scm | 21 +++++++++------------
1 file changed, 9 insertions(+), 12 deletions(-)

Toggle diff (43 lines)
diff --git a/gnu/packages/python-xyz.scm b/gnu/packages/python-xyz.scm
index cfff41569e1..53762b111f3 100644
--- a/gnu/packages/python-xyz.scm
+++ b/gnu/packages/python-xyz.scm
@@ -27595,7 +27595,7 @@ (define-public python-ukkonen
(define-public python-identify
(package
(name "python-identify")
- (version "1.4.25")
+ (version "2.5.36")
(source
(origin
;; There are no tests in the PyPI tarball.
@@ -27605,19 +27605,16 @@ (define-public python-identify
(commit (string-append "v" version))))
(file-name (git-file-name name version))
(sha256
- (base32 "1fqgci6skckcq0x5pnxh6k2qjzn1ndsrgha1j6wwv1ld4g9bd3hz"))))
- (build-system python-build-system)
+ (base32 "1il0d1zh31jx36m0lvhpiykx95i95dcfrgrfbz2x6la884zsmvq8"))))
+ (build-system pyproject-build-system)
(arguments
- `(#:phases
- (modify-phases %standard-phases
- ;; system-error "utime" "~A" ("No such file or directory")
- (delete 'ensure-no-mtimes-pre-1980)
- (replace 'check
- (lambda* (#:key tests? #:allow-other-keys)
- (when tests?
- (invoke "pytest" "-vv")))))))
+ (list
+ #:phases #~(modify-phases %standard-phases
+ ;; system-error "utime" "~A" ("No such file or directory")
+ (delete 'ensure-no-mtimes-pre-1980))))
(native-inputs
- (list python-coverage python-pytest python-setuptools python-wheel))
+ (list python-coverage python-pytest python-setuptools
+ python-ukkonen python-wheel))
(propagated-inputs
(list python-editdistance))
(home-page "https://github.com/chriskuehl/identify")
--
2.41.0
N
N
Nicolas Graves wrote on 1 Jun 16:57 +0200
[PATCH python-team v3 11/14] gnu: python-nodeenv: Update to 1.8.0.
(address . 69980@debbugs.gnu.org)
20240601145902.26806-12-ngraves@ngraves.fr
From: Vinicius Monego <monego@posteo.net>

* gnu/packages/python-xyz.scm (python-nodeenv): Update to 1.8.0.
[build-system]: Use pyproject-build-system.
[arguments]: Do not override the check phase, skip tests in #:test-flags
instead.

Change-Id: I01ca1948c30327827d6f76697b471a4d90cd6530
---
gnu/packages/python-xyz.scm | 16 +++++++---------
1 file changed, 7 insertions(+), 9 deletions(-)

Toggle diff (37 lines)
diff --git a/gnu/packages/python-xyz.scm b/gnu/packages/python-xyz.scm
index 53762b111f3..65345f2b6b5 100644
--- a/gnu/packages/python-xyz.scm
+++ b/gnu/packages/python-xyz.scm
@@ -27692,7 +27692,7 @@ (define-public python-tldr
(define-public python-nodeenv
(package
(name "python-nodeenv")
- (version "1.4.0")
+ (version "1.8.0")
(source
(origin
;; There's no tarball in PyPI.
@@ -27702,15 +27702,13 @@ (define-public python-nodeenv
(commit version)))
(file-name (git-file-name name version))
(sha256
- (base32 "0y443icx0w7jlzmxmmcm4q8dqfiwgafbb9cp8jpm68mbqxbz40a7"))))
- (build-system python-build-system)
+ (base32 "0g8zp8zw5nnfc14ml0sil9yh7lnpz3xrdkazdkwg6pf5jqsxlvv9"))))
+ (build-system pyproject-build-system)
(arguments
- `(#:phases
- (modify-phases %standard-phases
- (replace 'check
- (lambda _
- ;; This test fails. It tries to open a network socket.
- (invoke "pytest" "-vv" "-k" "not test_smoke"))))))
+ (list #:test-flags
+ #~(list "-k" (string-append
+ "not test_smoke"
+ " and not test_smoke_n_system_special_chars"))))
(native-inputs
(list python-coverage
python-mock
--
2.41.0
N
N
Nicolas Graves wrote on 1 Jun 16:58 +0200
[PATCH python-team v3 13/14] gnu: python-jupytext: Move to pyproject-build-system.
(address . 69980@debbugs.gnu.org)(address . ngraves@ngraves.fr)
20240601145902.26806-14-ngraves@ngraves.fr
* gnu/packages/python-xyz.scm (python-jupytext):
[build-system]: Move to pyproject-build-system.
[arguments]<#:test-flags>: Add flags.
<#:phases>: Remove 'check phase replacement.

Change-Id: I5d708c2fc76b609105c1551a6ed1755c56efcada
---
gnu/packages/python-xyz.scm | 25 ++++++++++++-------------
1 file changed, 12 insertions(+), 13 deletions(-)

Toggle diff (45 lines)
diff --git a/gnu/packages/python-xyz.scm b/gnu/packages/python-xyz.scm
index 65345f2b6b5..ae94d13e803 100644
--- a/gnu/packages/python-xyz.scm
+++ b/gnu/packages/python-xyz.scm
@@ -455,26 +455,25 @@ (define-public python-jupytext
(file-name (git-file-name name version))
(sha256
(base32 "0bgf0c4py22ip7qfla8mrmypfh3bg151c8awsr1gvcbw7m4ni01k"))))
- (build-system python-build-system)
+ (build-system pyproject-build-system)
(arguments
(list
+ #:test-flags
+ '(list "-k" (string-append
+ "not "
+ (string-join
+ (list "test_create_header_with_set_formats"
+ "test_pre_commit_hook"
+ "test_sync_with_pre_commit_hook")
+ " and not ")))
#:phases
#~(modify-phases %standard-phases
- (replace 'check
- (lambda* (#:key tests? #:allow-other-keys)
+ (add-before 'check 'pre-check
+ (lambda _
;; some tests fail when HOME=/homeless-shelter.
(setenv "HOME" "/tmp")
;; OSError: [Errno 18] Invalid cross-device link
- (setenv "TMPDIR" "/tmp")
- (when tests?
- (let ((disabled-tests
- (list "test_create_header_with_set_formats"
- "test_pre_commit_hook"
- "test_sync_with_pre_commit_hook")))
- (invoke "pytest" "-vv" "-k"
- (string-append "not "
- (string-join disabled-tests
- " and not "))))))))))
+ (setenv "TMPDIR" "/tmp"))))))
(native-inputs
(list git-minimal
python-autopep8
--
2.41.0
N
N
Nicolas Graves wrote on 1 Jun 16:58 +0200
[PATCH python-team v3 12/14] gnu: pre-commit: Update to 3.7.1.
(address . 69980@debbugs.gnu.org)
20240601145902.26806-13-ngraves@ngraves.fr
From: Vinicius Monego <monego@posteo.net>

* gnu/packages/version-control.scm (pre-commit): Update to 3.7.1.
[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 | 90 +++++++++++++-------------------
1 file changed, 35 insertions(+), 55 deletions(-)

Toggle diff (122 lines)
diff --git a/gnu/packages/version-control.scm b/gnu/packages/version-control.scm
index c70f1209c42..0016c5bc9b6 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>
@@ -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.7.1")
(source
(origin
(method git-fetch) ; no tests in PyPI release
@@ -2023,64 +2023,44 @@ (define-public pre-commit
(commit (string-append "v" version))))
(file-name (git-file-name name version))
(sha256
- (base32 "1spkg3ld3s6l7wz24lcywlf1z2ywp751bcdlxjfdsln76bi9ylp8"))
+ (base32 "1m2cs21xq2j1x80s7bh47fm2nsbnfxgscxfijaqwdsi2rrf4vlzv"))
(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
(list git-minimal
python-covdefaults
--
2.41.0
N
N
Nicolas Graves wrote on 1 Jun 16:58 +0200
[PATCH python-team v3 14/14] gnu: jupytext: Fix pre-commit native-input removal.
(address . 69980@debbugs.gnu.org)(address . ngraves@ngraves.fr)
20240601145902.26806-15-ngraves@ngraves.fr
* gnu/packages/python-xyz.scm (jupytext):
[arguments]<#:test-flags>: Add a flag to ignore pre_commit tests.

Change-Id: Ifa2097da721c4927ec304c51371eea96bc0cdf41
---
gnu/packages/python-xyz.scm | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)

Toggle diff (16 lines)
diff --git a/gnu/packages/python-xyz.scm b/gnu/packages/python-xyz.scm
index ae94d13e803..d81de891c4f 100644
--- a/gnu/packages/python-xyz.scm
+++ b/gnu/packages/python-xyz.scm
@@ -465,7 +465,8 @@ (define-public python-jupytext
(list "test_create_header_with_set_formats"
"test_pre_commit_hook"
"test_sync_with_pre_commit_hook")
- " and not ")))
+ " and not "))
+ "--ignore-glob=tests/test_pre_commit_*.py")
#:phases
#~(modify-phases %standard-phases
(add-before 'check 'pre-check
--
2.41.0
N
N
Nicolas Graves wrote on 1 Jun 17:41 +0200
control message for bug #70858
(address . control@debbugs.gnu.org)
871q5gbrgg.fsf@ngraves.fr
block 70858 by 69980
quit


--
Best regards,
Nicolas Graves
?
Your comment

Commenting via the web interface is currently disabled.

To comment on this conversation send an email to 69980@debbugs.gnu.org

To respond to this issue using the mumi CLI, first switch to it
mumi current 69980
Then, you may apply the latest patchset in this issue (with sign off)
mumi am -- -s
Or, compose a reply to this issue
mumi compose
Or, send patches to this issue
mumi send-email *.patch