guix-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

57/166: gnu: Add python-pip-run.


From: guix-commits
Subject: 57/166: gnu: Add python-pip-run.
Date: Tue, 19 Apr 2022 09:17:56 -0400 (EDT)

apteryx pushed a commit to branch wip-ipython+polyglossia
in repository guix.

commit f96747422a1983a8ad0ac06bc9ff995c3fdf4885
Author: Maxim Cournoyer <maxim.cournoyer@gmail.com>
AuthorDate: Wed Apr 6 01:09:32 2022 -0400

    gnu: Add python-pip-run.
    
    * gnu/packages/python-xyz.scm (python-pip-run): New variable.
---
 gnu/packages/python-xyz.scm | 38 ++++++++++++++++++++++++++++++++++++++
 1 file changed, 38 insertions(+)

diff --git a/gnu/packages/python-xyz.scm b/gnu/packages/python-xyz.scm
index dc410da132..0f6731efe7 100644
--- a/gnu/packages/python-xyz.scm
+++ b/gnu/packages/python-xyz.scm
@@ -12850,6 +12850,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")



reply via email to

[Prev in Thread] Current Thread [Next in Thread]