about summary refs log tree commit diff
path: root/gn/packages/check.scm
diff options
context:
space:
mode:
authorFrederick Muriuki Muriithi2025-10-06 09:54:09 -0500
committerFrederick Muriuki Muriithi2025-10-06 11:30:12 -0500
commita3926a5c29f1a6360e2ad0fd5bf0d6f009090406 (patch)
tree6650d9989306684ef001d2c2a868eaafd6708e9e /gn/packages/check.scm
parentd9a10dd3e6f370f068e9c7a96318546d550a3731 (diff)
downloadguix-bioinformatics-a3926a5c29f1a6360e2ad0fd5bf0d6f009090406.tar.gz
python-unittest2: Copy deleted package over from guix mainline
Certain packages in guix-bioinformatics have `python-unittest2` as a
dependency, but the package was deleted from guix mainline.

This commit copies the deleted package definition over to
guix-bioinformatics and includes the module where the package is used.
Diffstat (limited to 'gn/packages/check.scm')
-rw-r--r--gn/packages/check.scm34
1 files changed, 33 insertions, 1 deletions
diff --git a/gn/packages/check.scm b/gn/packages/check.scm
index 69c9f1f..960e78e 100644
--- a/gn/packages/check.scm
+++ b/gn/packages/check.scm
@@ -3,7 +3,9 @@
   #:use-module (guix download)
   #:use-module (guix build-system python)
   #:use-module ((guix licenses) #:prefix license:)
-  #:use-module (gnu packages check))
+  #:use-module (gnu packages check)
+  #:use-module (gnu packages python-xyz)
+  #:use-module (past packages python27))
 
 (define-public python-nosexcover
   (package
@@ -27,3 +29,33 @@ to a file named coverage.xml.
 It will honor all the options you pass to the Nose coverage plugin,
 especially -cover-package.")
     (license license:expat)))
+
+(define-public python-unittest2
+  (package
+    (name "python-unittest2")
+    (version "1.1.0")
+    (source
+     (origin
+       (method url-fetch)
+       (uri (pypi-uri "unittest2" version))
+       (patches
+        (search-patches "python-unittest2-python3-compat.patch"
+                        "python-unittest2-remove-argparse.patch"))
+       (sha256
+        (base32
+         "0y855kmx7a8rnf81d3lh5lyxai1908xjp0laf4glwa4c8472m212"))))
+    (build-system python-build-system)
+    (arguments
+     '(#:phases
+       (modify-phases %standard-phases
+         (replace 'check
+           (lambda _
+             (zero? (system* "python" "-m" "unittest2" "discover" "--verbose")))))))
+    (propagated-inputs
+     (list python-six python-traceback2))
+    (home-page "https://pypi.org/project/unittest2/")
+    (synopsis "Python unit testing library")
+    (description
+     "Unittest2 is a replacement for the unittest module in the Python
+standard library.")
+    (license license:psfl)))