[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
26/96: gnu: python-isort: Use gexps.
From: |
guix-commits |
Subject: |
26/96: gnu: python-isort: Use gexps. |
Date: |
Wed, 19 Apr 2023 21:41:07 -0400 (EDT) |
apteryx pushed a commit to branch core-updates
in repository guix.
commit 52e8f4d42634a3b9c9f143084aa9a246cf29124a
Author: Maxim Cournoyer <maxim.cournoyer@gmail.com>
AuthorDate: Sun Apr 16 21:59:22 2023 -0400
gnu: python-isort: Use gexps.
* gnu/packages/python-xyz.scm (python-isort) [arguments]: Use gexps.
Delete extraneous add-installed-pythonpath call in check phase.
---
gnu/packages/python-xyz.scm | 67 ++++++++++++++++++++++-----------------------
1 file changed, 33 insertions(+), 34 deletions(-)
diff --git a/gnu/packages/python-xyz.scm b/gnu/packages/python-xyz.scm
index 316c3aaacf..0dc2f1c7cb 100644
--- a/gnu/packages/python-xyz.scm
+++ b/gnu/packages/python-xyz.scm
@@ -20297,40 +20297,39 @@ builds partial trees by inspecting living objects.")
"1vbwc4gpffclf6hw08lvvgqlvsgfjlw7gjsm28jfcrln2pixla7j"))))
(build-system python-build-system)
(arguments
- `(#:phases
- (modify-phases %standard-phases
- (replace 'build
- (lambda _
- (invoke "python" "-m" "build" "--wheel" "--no-isolation" ".")))
- (replace 'install
- (lambda* (#:key outputs #:allow-other-keys)
- (let ((out (assoc-ref outputs "out"))
- (whl (car (find-files "dist" "\\.whl$"))))
- (invoke "pip" "--no-cache-dir" "--no-input"
- "install" "--no-deps" "--prefix" out whl))))
- (add-after 'install 'install-example-plugins
- (lambda _
- (for-each (lambda (source-directory)
- (invoke "python" "-m" "build" "--wheel"
- "--no-isolation" "--outdir=dist"
- source-directory))
- '("example_isort_formatting_plugin"
- "example_isort_sorting_plugin"
- "example_shared_isort_profile"))
- ;; Install them to temporary storage, for the test.
- (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 (assoc-ref outputs "out") "/bin")))
- (setenv "PATH" (string-append (getenv "PATH") ":" bin)))
- (add-installed-pythonpath inputs outputs)
- (invoke "pytest" "-vv" "tests/unit/"
- "-k" "not test_gitignore" ;requires git
- "--ignore=tests/unit/test_deprecated_finders.py")))))))
+ (list
+ #: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)
+ (invoke "python" "-m" "build" "--wheel"
+ "--no-isolation" "--outdir=dist"
+ source-directory))
+ '("example_isort_formatting_plugin"
+ "example_isort_sorting_plugin"
+ "example_shared_isort_profile"))
+ ;; Install them to temporary storage, for the test.
+ (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")))))))
(native-inputs
(list python-black
python-colorama
- 52/96: gnu: usbutils: Use G-Expressions., (continued)
- 52/96: gnu: usbutils: Use G-Expressions., guix-commits, 2023/04/19
- 16/96: gnu: python-flit-scm: Update to 1.7.0., guix-commits, 2023/04/19
- 01/96: gnu: python-xyz: Move some packages to (gnu packages python-build)., guix-commits, 2023/04/19
- 05/96: gnu: python-tomli-w: Use pyproject-build-system., guix-commits, 2023/04/19
- 02/96: gnu: Add python-trove-classifiers., guix-commits, 2023/04/19
- 14/96: gnu: python-typing-extensions: Move to (gnu packages python-build)., guix-commits, 2023/04/19
- 17/96: gnu: python-hatchling: Move to (gnu packages python-build)., guix-commits, 2023/04/19
- 19/96: gnu: Add python-hatch-vcs., guix-commits, 2023/04/19
- 22/96: gnu: opendht: Fix build., guix-commits, 2023/04/19
- 24/96: gnu: python-packaging: Remove labels., guix-commits, 2023/04/19
- 26/96: gnu: python-isort: Use gexps.,
guix-commits <=
- 28/96: gnu: python-numpydoc: Update to 1.5.0., guix-commits, 2023/04/19
- 29/96: gnu: python-typing-extensions: Update to 4.5.0., guix-commits, 2023/04/19
- 31/96: gnu: python-pycares: Update to 4.3.0., guix-commits, 2023/04/19
- 32/96: gnu: python-aiodns: Update to 3.0.0., guix-commits, 2023/04/19
- 34/96: gnu: python-aiosignal: Update to 1.3.1., guix-commits, 2023/04/19
- 35/96: gnu: python-pyzmq: Disable two tests to fix build., guix-commits, 2023/04/19
- 38/96: gnu: gfeeds: Update to 2.2.0., guix-commits, 2023/04/19
- 39/96: gnu: Add python-hatch-fancy-pypi-readme., guix-commits, 2023/04/19
- 42/96: gnu: python-fonttools-full: Rename to python-fonttools., guix-commits, 2023/04/19
- 45/96: gnu: Add converseen., guix-commits, 2023/04/19