summary refs log tree commit diff
diff options
context:
space:
mode:
authorMaxim Cournoyer <maxim.cournoyer@gmail.com>2022-04-06 01:09:32 -0400
committerMaxim Cournoyer <maxim.cournoyer@gmail.com>2022-05-12 12:45:33 -0400
commita293faef3fbd6a3f8b128ee35a3e56a6cc458734 (patch)
tree8cb175a8ac1e6de090c1d92deb6855fe6ee0bad7
parent831bf98f6ceed5b1ac400c90f74c3a49587d7d0b (diff)
downloadguix-a293faef3fbd6a3f8b128ee35a3e56a6cc458734.tar.gz
gnu: Add python-pip-run.
* gnu/packages/python-xyz.scm (python-pip-run): New variable.
-rw-r--r--gnu/packages/python-xyz.scm38
1 files changed, 38 insertions, 0 deletions
diff --git a/gnu/packages/python-xyz.scm b/gnu/packages/python-xyz.scm
index 88435942ce..8e6dee235e 100644
--- a/gnu/packages/python-xyz.scm
+++ b/gnu/packages/python-xyz.scm
@@ -12866,6 +12866,44 @@ $ rm -rf /tmp/env
 @end example")
      (license license:expat))))
 
+(define-public python-pip-run
+  (package/inherit python-pip-run-bootstrap
+    (name "python-pip-run")
+    (arguments
+     (substitute-keyword-arguments (package-arguments python-pip-run-bootstrap)
+       ((#:tests? _ #f)
+        #t)
+       ((#:phases phases #~%standard-phases)
+        #~(modify-phases #$phases
+            (replace 'check
+              (lambda* (#:key tests? #:allow-other-keys)
+                (when tests?
+                  (invoke "pytest" "-k"
+                          (string-append
+                           ;; Do not test the myproject.toml build as it tries
+                           ;; to pull dependencies from the internet.
+                           "not project "
+                           ;; These tests attempt to install dependencies from
+                           ;; the network and fail.
+                           "and not test_pkg_imported "
+                           "and not test_pkg_loaded_from_alternate_index ")))))))))
+    (propagated-inputs
+     (modify-inputs (package-propagated-inputs python-pip-run-bootstrap)
+       (replace "python-path-bootstrap" python-path)))
+    (native-inputs
+     (modify-inputs (package-native-inputs python-pip-run-bootstrap)
+       (append python-nbformat
+               python-pygments
+               python-pytest
+               python-pytest-black
+               python-pytest-checkdocs
+               python-pytest-cov
+               python-pytest-enabler
+               python-pytest-flake8
+               python-pytest-mypy)))
+    (properties (alist-delete 'hidden? (package-properties
+                                        python-pip-run-bootstrap)))))
+
 (define-public python-tlsh
   (package
     (name "python-tlsh")