[PATCH 015/714] gnu: python-isort: Improve package style.

  • Done
  • quality assurance status badge
Details
One participant
  • Nicolas Graves
Owner
unassigned
Submitted by
Nicolas Graves
Severity
normal
N
N
Nicolas Graves wrote on 3 May 18:55 +0200
(address . guix-patches@gnu.org)(address . ngraves@ngraves.fr)
20240503172650.32434-15-ngraves@ngraves.fr
* gnu/packages/python-xyz.scm (python-isort): Improve package style.
[build-system]: Move to pyproject-build-system.
[arguments]<#:test-flags>: Add option to replace former check phase.
<#:phases>: Remove phases build, install and check.

Change-Id: Idac8f151977f2494eb44d51aa1fcbf3156b5cc87
---
gnu/packages/python-xyz.scm | 22 ++++------------------
1 file changed, 4 insertions(+), 18 deletions(-)

Toggle diff (46 lines)
diff --git a/gnu/packages/python-xyz.scm b/gnu/packages/python-xyz.scm
index 2c81cd2d51..8be0040220 100644
--- a/gnu/packages/python-xyz.scm
+++ b/gnu/packages/python-xyz.scm
@@ -23654,19 +23654,13 @@ (define-public python-isort
(sha256
(base32
"1vbwc4gpffclf6hw08lvvgqlvsgfjlw7gjsm28jfcrln2pixla7j"))))
- (build-system python-build-system)
+ (build-system pyproject-build-system)
(arguments
(list
+ #:test-flags '(list "tests/unit/" "-k" "not test_gitignore"
+ "--ignore=tests/unit/test_deprecated_finders.py")
#:phases
#~(modify-phases %standard-phases
- (replace 'build
- (lambda _
- (invoke "python" "-m" "build" "--wheel" "--no-isolation" ".")))
- (replace 'install
- (lambda _
- (let ((whl (car (find-files "dist" "\\.whl$"))))
- (invoke "pip" "--no-cache-dir" "--no-input"
- "install" "--no-deps" "--prefix" #$output whl))))
(add-after 'install 'install-example-plugins
(lambda _
(for-each (lambda (source-directory)
@@ -23680,15 +23674,7 @@ (define-public python-isort
(setenv "HOME" (getcwd))
(let ((example-whls (find-files "dist" "^example.*\\.whl$")))
(apply invoke "pip" "--no-cache-dir" "--no-input"
- "install" "--user" "--no-deps" example-whls))))
- (replace 'check
- (lambda* (#:key tests? inputs outputs #:allow-other-keys)
- (when tests?
- (let ((bin (string-append #$output "/bin")))
- (setenv "PATH" (string-append (getenv "PATH") ":" bin)))
- (invoke "pytest" "-vv" "tests/unit/"
- "-k" "not test_gitignore" ;requires git
- "--ignore=tests/unit/test_deprecated_finders.py")))))))
+ "install" "--user" "--no-deps" example-whls)))))))
(native-inputs
(list python-black
python-colorama
--
2.41.0
N
N
Nicolas Graves wrote on 3 May 23:09 +0200
control message for bug #70750
(address . control@debbugs.gnu.org)
87jzkaob4v.fsf@ngraves.fr
close 70750
quit


--
Best regards,
Nicolas Graves
?