From a9d58a801ef65c93d1f1253120646d50ce81de40 Mon Sep 17 00:00:00 2001 From: Maxim Cournoyer Date: Fri, 3 Apr 2020 11:16:02 -0400 Subject: gnu: Add python-can. * gnu/packages/python-xyz.scm (python-can): New variable. --- gnu/packages/python-xyz.scm | 44 ++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 44 insertions(+) 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") -- cgit v1.2.3