[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
304/361: gnu: python-pexpect: Improve package style.
From: |
guix-commits |
Subject: |
304/361: gnu: python-pexpect: Improve package style. |
Date: |
Thu, 21 Nov 2024 06:29:39 -0500 (EST) |
sharlatan pushed a commit to branch python-team
in repository guix.
commit de6cdd7d907beb356e28ef9acb1350e8166567d0
Author: Sharlatan Hellseher <sharlatanus@gmail.com>
AuthorDate: Sat Nov 16 19:58:29 2024 +0000
gnu: python-pexpect: Improve package style.
* gnu/packages/python-xyz.scm (python-pexpect): Use G-expression,
improve style.
[build-system]: Swap to pyproject-build-system.
[arguments]<test-flags>: Move test exclusion logic here from
'prepare-tests phase.
[native-inputs]: Remove python-nose; add python-setuptools and
python-wheel.
Change-Id: I16da2bfbeabf21b02acf93f7fed765f262a56596
---
gnu/packages/python-xyz.scm | 72 ++++++++++++++++++++++++++-------------------
1 file changed, 42 insertions(+), 30 deletions(-)
diff --git a/gnu/packages/python-xyz.scm b/gnu/packages/python-xyz.scm
index 197bdae81f..97e618aaa9 100644
--- a/gnu/packages/python-xyz.scm
+++ b/gnu/packages/python-xyz.scm
@@ -11807,43 +11807,55 @@ wraps Python's standard library threading and
multiprocessing objects.")
(uri (pypi-uri "pexpect" version))
(sha256
(base32 "032cg337h8awydgypz6f4wx848lw8dyrj4zy988x0lyib4ws8rgw"))))
- (build-system python-build-system)
+ (build-system pyproject-build-system)
(arguments
- `(#:phases
- (modify-phases %standard-phases
- (add-before 'check 'prepare-tests
- (lambda _
- (substitute* (find-files "tests")
- (("/bin/ls") (which "ls"))
- (("/bin/echo") (which "echo"))
- (("/bin/which") (which "which"))
- ;; Many tests try to use the /bin directory which
- ;; is not present in the build environment.
- ;; Use one that's non-empty and unlikely to change.
- (("/bin'") "/dev'")
- ;; Disable failing test. See upstream bug report
- ;; https://github.com/pexpect/pexpect/issues/568
- (("def test_bash") "def _test_bash"))
- ;; XXX: Socket connection test gets "Connection reset by peer".
- ;; Why does it not work? Delete for now.
- (delete-file "tests/test_socket.py")
- #t))
- (replace 'check (lambda _ (invoke "nosetests" "-v"))))))
- (native-inputs
- `(("python-nose" ,python-nose)
- ("python-pytest" ,python-pytest)
- ("man-db" ,man-db)
- ("which" ,which)
- ("bash-full" ,bash))) ;full Bash for 'test_replwrap.py'
+ (list
+ #:test-flags
+ #~(list "-k" (string-join
+ (list
+ ;; Disable failing test, see
+ ;; <https://github.com/pexpect/pexpect/issues/568>.
+ "not test_bash"
+ ;; Fails with attempt to find OpenSSL.
+ "test_large_stdout_stream"
+ ;; Tests fail while trying to find
+ ;; tmp-pexpect-xxxxxxxxxxxx directories.
+ "test_run_uses_env"
+ "test_run_uses_env_path"
+ "test_run_uses_env_path_over_path"
+ "test_spawn_uses_env"
+ ;; Fails with assertion error: assert 0 == 500
+ "test_before_across_chunks")
+ " and not "))
+ #:phases
+ #~(modify-phases %standard-phases
+ (add-before 'check 'prepare-tests
+ (lambda _
+ (substitute* (find-files "tests")
+ (("/bin/bash") (which "bash"))
+ (("/bin/echo") (which "echo"))
+ (("/bin/ls") (which "ls"))
+ (("/bin/which") (which "which"))
+ ;; Many tests try to use the /bin directory which is not
+ ;; present in the build environment. Use one that's non-empty
+ ;; and unlikely to change.
+ (("/bin'") "/dev'")))))))
+ (native-inputs
+ (list bash ;full Bash for 'test_replwrap.py'
+ man-db
+ python-pytest
+ python-setuptools
+ python-wheel
+ which))
(propagated-inputs
(list python-ptyprocess))
(home-page "https://pexpect.readthedocs.org/")
(synopsis "Controlling interactive console applications")
(description
"Pexpect is a pure Python module for spawning child applications;
-controlling them; and responding to expected patterns in their output.
-Pexpect works like Don Libes’ Expect. Pexpect allows your script to spawn a
-child application and control it as if a human were typing commands.")
+controlling them; and responding to expected patterns in their output. Pexpect
+works like Don Libes’ Expect. Pexpect allows your script to spawn a child
+application and control it as if a human were typing commands.")
(license license:isc)))
(define-public python-sexpdata
- 279/361: gnu: python-pysolr: Update to 3.10.0., (continued)
- 279/361: gnu: python-pysolr: Update to 3.10.0., guix-commits, 2024/11/21
- 281/361: gnu: beets: Use G-expressions., guix-commits, 2024/11/21
- 284/361: gnu: beets: Update to 2.0.0., guix-commits, 2024/11/21
- 286/361: gnu: Add python-poetry-plugin-export., guix-commits, 2024/11/21
- 285/361: gnu: Add python-sphinx-design., guix-commits, 2024/11/21
- 287/361: gnu: Add python-pypa-installer., guix-commits, 2024/11/21
- 289/361: gnu: Remove python-poetry-core-1.0., guix-commits, 2024/11/21
- 288/361: gnu: poetry: Fix build., guix-commits, 2024/11/21
- 291/361: gnu: Add python-rgbxy., guix-commits, 2024/11/21
- 302/361: gnu: Remove python-pluggy-next., guix-commits, 2024/11/21
- 304/361: gnu: python-pexpect: Improve package style.,
guix-commits <=
- 312/361: gnu: python-pytest-cov: Update to 6.0.0., guix-commits, 2024/11/21
- 299/361: gnu: python-pytest: Update to 8.3.3., guix-commits, 2024/11/21
- 308/361: gnu: python-pytest-mock: Update to 3.14.0., guix-commits, 2024/11/21
- 313/361: gnu: python-pytest-xprocess: Update to 1.0.2., guix-commits, 2024/11/21
- 311/361: gnu: python-coverage: Update to 7.6.7., guix-commits, 2024/11/21
- 315/361: gnu: python-cffi: Update to 1.17.1., guix-commits, 2024/11/21
- 314/361: gnu: python-openpyxl: Update to 3.1.5., guix-commits, 2024/11/21
- 331/361: gnu: python-attrs: Update to 24.2.0., guix-commits, 2024/11/21
- 347/361: gnu: python-blinker: Update to 1.9.0., guix-commits, 2024/11/21
- 342/361: gnu: python-matplotlib: Disable more failing tests., guix-commits, 2024/11/21