gnu: python-can: Simplify package style.
* gnu/package/python-xyz.scm (python-can): Simplify package style. [build-system]: Use pyproject-build-system. [argument]: Use Gexp. Remove redundant modify-phases procedure. Add {test-flags}. Signed-off-by: Efraim Flashner <efraim@flashner.co.il>
This commit is contained in:
parent
269fa79398
commit
15083a2fc3
1 changed files with 14 additions and 30 deletions
|
@ -2696,40 +2696,24 @@ class.")
|
||||||
(sha256
|
(sha256
|
||||||
(base32
|
(base32
|
||||||
"1w5sdzxivpd3pw4pypwnjlksvfimdb93qnlddbrh5f13flhsgg8g"))))
|
"1w5sdzxivpd3pw4pypwnjlksvfimdb93qnlddbrh5f13flhsgg8g"))))
|
||||||
(build-system python-build-system)
|
(build-system pyproject-build-system)
|
||||||
(arguments
|
(arguments
|
||||||
`(#:phases (modify-phases %standard-phases
|
(list
|
||||||
(add-after 'unpack 'relax-version-requirements
|
#:test-flags
|
||||||
(lambda _
|
#~(list
|
||||||
(substitute* "setup.py"
|
;; TODO: Check if it could be packed:
|
||||||
(("mock~=2\\.0") "mock")
|
;; https://github.com/projectgus/python-canalystii
|
||||||
(("coverage<5") "coverage")
|
;;
|
||||||
(("pytest~=4\\.6") "pytest")
|
;; Disable tests which require specific CAN drivers we have no
|
||||||
(("pytest-timeout~=1\\.3") "pytest-timeout")
|
;; package for in Guix.
|
||||||
(("pytest-cov.*") "pytest-cov\n")
|
"--ignore" "test/test_interface_canalystii.py"
|
||||||
(("hypothesis~=4\\.56") "hypothesis"))))
|
;; These tests fail with "OSError: [Errno 19] No such device".
|
||||||
(add-after 'unpack 'fix-broken-tests
|
"-k" "not BasicTestUdpMulticastBusIPv")))
|
||||||
;; The tests try to run two scripts it expects should be
|
|
||||||
;; in PATH, but they aren't at this time (see:
|
|
||||||
;; https://github.com/hardbyte/python-can/issues/805).
|
|
||||||
(lambda _
|
|
||||||
(substitute* "test/test_scripts.py"
|
|
||||||
(("\"can_logger\\.py --help\"") "")
|
|
||||||
(("\"can_player\\.py --help\"") ""))))
|
|
||||||
(replace 'check
|
|
||||||
(lambda* (#:key tests? #:allow-other-keys)
|
|
||||||
(when tests?
|
|
||||||
(invoke "pytest" "-vv" "test"
|
|
||||||
;; Disable tests which require specific CAN
|
|
||||||
;; drivers we have no package for in Guix.
|
|
||||||
"--ignore" "test/test_interface_canalystii.py"
|
|
||||||
;; These tests fail with "OSError: [Errno 19]
|
|
||||||
;; No such device".
|
|
||||||
"-k" "not BasicTestUdpMulticastBusIPv")))))))
|
|
||||||
(propagated-inputs
|
(propagated-inputs
|
||||||
(list python-msgpack python-typing-extensions python-wrapt))
|
(list python-msgpack python-typing-extensions python-wrapt))
|
||||||
(native-inputs
|
(native-inputs
|
||||||
(list python-codecov
|
(list ;; python-canalystii ; Not packed yet
|
||||||
|
python-codecov
|
||||||
python-coverage
|
python-coverage
|
||||||
python-future
|
python-future
|
||||||
python-hypothesis
|
python-hypothesis
|
||||||
|
|
Reference in a new issue