aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMaxim Cournoyer <maxim.cournoyer@gmail.com>2020-04-03 11:16:02 -0400
committerMaxim Cournoyer <maxim.cournoyer@gmail.com>2020-04-03 11:25:16 -0400
commita9d58a801ef65c93d1f1253120646d50ce81de40 (patch)
tree6becbc1d1e01d9b10f7980792e32f24fb54fa5b6
parente063426031a18e3729e93730bcdf050cfe29f2f2 (diff)
downloadpatches-a9d58a801ef65c93d1f1253120646d50ce81de40.tar
patches-a9d58a801ef65c93d1f1253120646d50ce81de40.tar.gz
gnu: Add python-can.
* gnu/packages/python-xyz.scm (python-can): New variable.
-rw-r--r--gnu/packages/python-xyz.scm44
1 files changed, 44 insertions, 0 deletions
diff --git a/gnu/packages/python-xyz.scm b/gnu/packages/python-xyz.scm
index 2ab6c8ddac..75b74ecde7 100644
--- a/gnu/packages/python-xyz.scm
+++ b/gnu/packages/python-xyz.scm
@@ -1164,6 +1164,50 @@ metaclass-based @code{NamedTuple} implementation and a @code{NamedConstant}
class.")
(license license:bsd-3)))
+(define-public python-can
+ (package
+ (name "python-can")
+ (version "3.3.2")
+ (source
+ (origin
+ (method url-fetch)
+ (uri (pypi-uri "python-can" version))
+ (sha256
+ (base32
+ "0bkbxi45sckzir6s0j3h01pkfn4vkz3ymih2zjp7zw77wz0vbvsz"))))
+ (build-system python-build-system)
+ (arguments
+ `(#:phases (modify-phases %standard-phases
+ (add-after 'unpack 'fix-broken-tests
+ ;; 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\"") ""))
+ #t)))))
+ (propagated-inputs
+ `(("python-aenum" ,python-aenum)
+ ("python-wrapt" ,python-wrapt)))
+ (native-inputs
+ `(("python-codecov" ,python-codecov)
+ ("python-future" ,python-future)
+ ("python-hypothesis" ,python-hypothesis)
+ ("python-mock" ,python-mock)
+ ("python-pyserial" ,python-pyserial)
+ ("python-pytest" ,python-pytest)
+ ("python-pytest-cov" ,python-pytest-cov)
+ ("python-pytest-runner" ,python-pytest-runner)
+ ("python-pytest-timeout" ,python-pytest-timeout)))
+ (home-page "https://github.com/hardbyte/python-can")
+ (synopsis "Controller Area Network (CAN) interface module for Python")
+ (description "This package defines the @code{can} module, which provides
+controller area network (CAN) support for Python developers; providing common
+abstractions to different hardware devices, and a suite of utilities for
+sending and receiving messages on a CAN bus.")
+ (license license:gpl3+)))
+
(define-public python-capturer
(package
(name "python-capturer")