1{ lib
2, buildPythonPackage
3, fetchPypi
4, pythonOlder
5, isPy27
6, aenum
7, wrapt
8, typing
9, pyserial
10, nose
11, mock
12, hypothesis
13, future
14, pytest
15, pytest-timeout }:
16
17buildPythonPackage rec {
18 pname = "python-can";
19 version = "3.3.3";
20
21 src = fetchPypi {
22 inherit pname version;
23 sha256 = "ecd69cf6b2f0235345ebe607a15325cf1384c85b24ffbe1d68c3754357f87488";
24 };
25
26 propagatedBuildInputs = [ wrapt pyserial aenum ] ++ lib.optional (pythonOlder "3.5") typing;
27 checkInputs = [ nose mock pytest hypothesis future ];
28
29 # Add the scripts to PATH
30 checkPhase = ''
31 PATH=$out/bin:$PATH pytest -c /dev/null
32 '';
33
34 meta = with lib; {
35 homepage = "https://github.com/hardbyte/python-can";
36 description = "CAN support for Python";
37 license = licenses.lgpl3;
38 maintainers = with maintainers; [ sorki ];
39 };
40}