diff options
| author | Sharlatan Hellseher <sharlatanus@gmail.com> | 2025-05-01 09:33:52 +0100 |
|---|---|---|
| committer | Sharlatan Hellseher <sharlatanus@gmail.com> | 2025-05-01 12:29:19 +0100 |
| commit | 4296310b59e8f04680c81ffa511adddfb9166897 (patch) | |
| tree | c833490d4939754e9870444a8f8cf1dcd08e47b7 | |
| parent | 3cecec63c5762efa037d2b7885366ac20990b97c (diff) | |
gnu: python-cram: Move to python-check.
* gnu/packages/python-xyz.scm (python-cram): Move from here ...
* gnu/packages/python-check.scm: ... to here.
* gnu/packages/rcm.scm: Replace python-xyz with python-check module.
* gnu/packages/benchmark.scm: Add python-check module.
Change-Id: I0192701e4d4890735a18cc60abd2782fed8db090
| -rw-r--r-- | gnu/packages/benchmark.scm | 1 | ||||
| -rw-r--r-- | gnu/packages/python-check.scm | 61 | ||||
| -rw-r--r-- | gnu/packages/python-xyz.scm | 59 | ||||
| -rw-r--r-- | gnu/packages/rcm.scm | 2 |
4 files changed, 62 insertions, 61 deletions
diff --git a/gnu/packages/benchmark.scm b/gnu/packages/benchmark.scm index bc630bf723a..a851d6b8e07 100644 --- a/gnu/packages/benchmark.scm +++ b/gnu/packages/benchmark.scm | |||
| @@ -67,6 +67,7 @@ | |||
| 67 | #:use-module (gnu packages polkit) | 67 | #:use-module (gnu packages polkit) |
| 68 | #:use-module (gnu packages python) | 68 | #:use-module (gnu packages python) |
| 69 | #:use-module (gnu packages python-build) | 69 | #:use-module (gnu packages python-build) |
| 70 | #:use-module (gnu packages python-check) | ||
| 70 | #:use-module (gnu packages python-science) | 71 | #:use-module (gnu packages python-science) |
| 71 | #:use-module (gnu packages python-web) | 72 | #:use-module (gnu packages python-web) |
| 72 | #:use-module (gnu packages python-xyz) | 73 | #:use-module (gnu packages python-xyz) |
diff --git a/gnu/packages/python-check.scm b/gnu/packages/python-check.scm index 518282921e2..52ce51aa2e6 100644 --- a/gnu/packages/python-check.scm +++ b/gnu/packages/python-check.scm | |||
| @@ -1,7 +1,7 @@ | |||
| 1 | ;;; GNU Guix --- Functional package management for GNU | 1 | ;;; GNU Guix --- Functional package management for GNU |
| 2 | ;;; Copyright © 2015 Cyril Roelandt <tipecaml@gmail.com> | 2 | ;;; Copyright © 2015 Cyril Roelandt <tipecaml@gmail.com> |
| 3 | ;;; Copyright © 2016, 2018, 2019, 2020, 2022 Marius Bakke <marius@gnu.org> | ||
| 3 | ;;; Copyright © 2017 Muriithi Frederick Muriuki <fredmanglis@gmail.com> | 4 | ;;; Copyright © 2017 Muriithi Frederick Muriuki <fredmanglis@gmail.com> |
| 4 | ;;; Copyright © 2018, 2020, 2022 Marius Bakke <marius@gnu.org> | ||
| 5 | ;;; Copyright © 2018-2020 Tobias Geerinckx-Rice <me@tobias.gr> | 5 | ;;; Copyright © 2018-2020 Tobias Geerinckx-Rice <me@tobias.gr> |
| 6 | ;;; Copyright © 2019, 2021-2025 Ricardo Wurmus <rekado@elephly.net> | 6 | ;;; Copyright © 2019, 2021-2025 Ricardo Wurmus <rekado@elephly.net> |
| 7 | ;;; Copyright © 2019, 2020, 2021 Efraim Flashner <efraim@flashner.co.il> | 7 | ;;; Copyright © 2019, 2020, 2021 Efraim Flashner <efraim@flashner.co.il> |
| @@ -445,6 +445,65 @@ This package provides seamless integration with coverage.py (and thus pytest, | |||
| 445 | nosetests, etc...) in Python projects.") | 445 | nosetests, etc...) in Python projects.") |
| 446 | (license license:expat))) | 446 | (license license:expat))) |
| 447 | 447 | ||
| 448 | (define-public python-cram | ||
| 449 | (package | ||
| 450 | (name "python-cram") | ||
| 451 | (version "0.7") | ||
| 452 | (home-page "https://bitheap.org/cram/") | ||
| 453 | (source (origin | ||
| 454 | (method url-fetch) | ||
| 455 | (uri (list (string-append home-page "cram-" | ||
| 456 | version ".tar.gz") | ||
| 457 | (pypi-uri "cram" version))) | ||
| 458 | (sha256 | ||
| 459 | (base32 | ||
| 460 | "0bvz6fwdi55rkrz3f50zsy35gvvwhlppki2yml5bj5ffy9d499vx")))) | ||
| 461 | (arguments | ||
| 462 | '(#:phases | ||
| 463 | (modify-phases %standard-phases | ||
| 464 | (add-after 'unpack 'patch-source | ||
| 465 | (lambda _ | ||
| 466 | (substitute* (find-files "cram" ".*\\.py$") | ||
| 467 | ;; Replace default shell path. | ||
| 468 | (("/bin/sh") (which "sh"))) | ||
| 469 | (substitute* (find-files "tests" ".*\\.t$") | ||
| 470 | (("md5") "md5sum") | ||
| 471 | (("/bin/bash") (which "bash")) | ||
| 472 | (("/bin/sh") (which "sh"))) | ||
| 473 | (substitute* "cram/_test.py" | ||
| 474 | ;; This hack works around a bug triggered by substituting | ||
| 475 | ;; the /bin/sh paths. "tests/usage.t" compares the output of | ||
| 476 | ;; "cram -h", which breaks the output at 80 characters. This | ||
| 477 | ;; causes the line showing the default shell to break into two | ||
| 478 | ;; lines, but the test expects a single line... | ||
| 479 | (("env\\['COLUMNS'\\] = '80'") | ||
| 480 | "env['COLUMNS'] = '160'")) | ||
| 481 | |||
| 482 | (substitute* "Makefile" | ||
| 483 | ;; Recent versions of python-coverage have caused the test | ||
| 484 | ;; coverage to decrease (as of version 0.7). Allow that. | ||
| 485 | (("--fail-under=100") | ||
| 486 | "--fail-under=90")) | ||
| 487 | |||
| 488 | #t)) | ||
| 489 | (replace 'check | ||
| 490 | ;; The test phase uses the built library and executable. | ||
| 491 | (lambda* (#:key inputs outputs #:allow-other-keys) | ||
| 492 | (add-installed-pythonpath inputs outputs) | ||
| 493 | (setenv "PATH" (string-append (getenv "PATH") ":" | ||
| 494 | (assoc-ref outputs "out") "/bin")) | ||
| 495 | (invoke "make" "test")))))) | ||
| 496 | (build-system python-build-system) | ||
| 497 | (native-inputs | ||
| 498 | (list python-coverage python-setuptools python-wheel which)) | ||
| 499 | (synopsis "Simple testing framework for command line applications") | ||
| 500 | (description | ||
| 501 | "Cram is a functional testing framework for command line applications. | ||
| 502 | Cram tests look like snippets of interactive shell sessions. Cram runs each | ||
| 503 | command and compares the command output in the test with the command’s actual | ||
| 504 | output.") | ||
| 505 | (license license:gpl2+))) | ||
| 506 | |||
| 448 | (define-public python-crosshair | 507 | (define-public python-crosshair |
| 449 | (package | 508 | (package |
| 450 | (name "python-crosshair") | 509 | (name "python-crosshair") |
diff --git a/gnu/packages/python-xyz.scm b/gnu/packages/python-xyz.scm index baeeed31d3c..f3d23215ed2 100644 --- a/gnu/packages/python-xyz.scm +++ b/gnu/packages/python-xyz.scm | |||
| @@ -17047,65 +17047,6 @@ functionalities with some extras.") | |||
| 17047 | pseudo terminal (pty), and interact with both the process and its pty.") | 17047 | pseudo terminal (pty), and interact with both the process and its pty.") |
| 17048 | (license license:isc))) | 17048 | (license license:isc))) |
| 17049 | 17049 | ||
| 17050 | (define-public python-cram | ||
| 17051 | (package | ||
| 17052 | (name "python-cram") | ||
| 17053 | (version "0.7") | ||
| 17054 | (home-page "https://bitheap.org/cram/") | ||
| 17055 | (source (origin | ||
| 17056 | (method url-fetch) | ||
| 17057 | (uri (list (string-append home-page "cram-" | ||
| 17058 | version ".tar.gz") | ||
| 17059 | (pypi-uri "cram" version))) | ||
| 17060 | (sha256 | ||
| 17061 | (base32 | ||
| 17062 | "0bvz6fwdi55rkrz3f50zsy35gvvwhlppki2yml5bj5ffy9d499vx")))) | ||
| 17063 | (arguments | ||
| 17064 | '(#:phases | ||
| 17065 | (modify-phases %standard-phases | ||
| 17066 | (add-after 'unpack 'patch-source | ||
| 17067 | (lambda _ | ||
| 17068 | (substitute* (find-files "cram" ".*\\.py$") | ||
| 17069 | ;; Replace default shell path. | ||
| 17070 | (("/bin/sh") (which "sh"))) | ||
| 17071 | (substitute* (find-files "tests" ".*\\.t$") | ||
| 17072 | (("md5") "md5sum") | ||
| 17073 | (("/bin/bash") (which "bash")) | ||
| 17074 | (("/bin/sh") (which "sh"))) | ||
| 17075 | (substitute* "cram/_test.py" | ||
| 17076 | ;; This hack works around a bug triggered by substituting | ||
| 17077 | ;; the /bin/sh paths. "tests/usage.t" compares the output of | ||
| 17078 | ;; "cram -h", which breaks the output at 80 characters. This | ||
| 17079 | ;; causes the line showing the default shell to break into two | ||
| 17080 | ;; lines, but the test expects a single line... | ||
| 17081 | (("env\\['COLUMNS'\\] = '80'") | ||
| 17082 | "env['COLUMNS'] = '160'")) | ||
| 17083 | |||
| 17084 | (substitute* "Makefile" | ||
| 17085 | ;; Recent versions of python-coverage have caused the test | ||
| 17086 | ;; coverage to decrease (as of version 0.7). Allow that. | ||
| 17087 | (("--fail-under=100") | ||
| 17088 | "--fail-under=90")) | ||
| 17089 | |||
| 17090 | #t)) | ||
| 17091 | (replace 'check | ||
| 17092 | ;; The test phase uses the built library and executable. | ||
| 17093 | (lambda* (#:key inputs outputs #:allow-other-keys) | ||
| 17094 | (add-installed-pythonpath inputs outputs) | ||
| 17095 | (setenv "PATH" (string-append (getenv "PATH") ":" | ||
| 17096 | (assoc-ref outputs "out") "/bin")) | ||
| 17097 | (invoke "make" "test")))))) | ||
| 17098 | (build-system python-build-system) | ||
| 17099 | (native-inputs | ||
| 17100 | (list python-coverage python-setuptools python-wheel which)) | ||
| 17101 | (synopsis "Simple testing framework for command line applications") | ||
| 17102 | (description | ||
| 17103 | "Cram is a functional testing framework for command line applications. | ||
| 17104 | Cram tests look like snippets of interactive shell sessions. Cram runs each | ||
| 17105 | command and compares the command output in the test with the command’s actual | ||
| 17106 | output.") | ||
| 17107 | (license license:gpl2+))) | ||
| 17108 | |||
| 17109 | (define-public python-crccheck | 17050 | (define-public python-crccheck |
| 17110 | (package | 17051 | (package |
| 17111 | (name "python-crccheck") | 17052 | (name "python-crccheck") |
diff --git a/gnu/packages/rcm.scm b/gnu/packages/rcm.scm index 6bdeeb7e9db..cca8583b4c3 100644 --- a/gnu/packages/rcm.scm +++ b/gnu/packages/rcm.scm | |||
| @@ -22,7 +22,7 @@ | |||
| 22 | #:use-module (guix download) | 22 | #:use-module (guix download) |
| 23 | #:use-module (guix build-system gnu) | 23 | #:use-module (guix build-system gnu) |
| 24 | #:use-module (guix licenses) | 24 | #:use-module (guix licenses) |
| 25 | #:use-module (gnu packages python-xyz) | 25 | #:use-module (gnu packages python-check) |
| 26 | #:use-module (gnu packages perl)) | 26 | #:use-module (gnu packages perl)) |
| 27 | 27 | ||
| 28 | (define-public rcm | 28 | (define-public rcm |
