blob: a68d73e1242c508585b9efb3f6fc82f2634dcc81 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
|
{ lib
, buildPythonPackage
, fetchFromGitHub
, future
, hypothesis
, parameterized
, msgpack
, pyserial
, pytest-timeout
, pytestCheckHook
, pythonOlder
, typing-extensions
, wrapt
}:
buildPythonPackage rec {
pname = "python-can";
version = "unstable-2022-01-11";
format = "setuptools";
disabled = pythonOlder "3.6";
src = fetchFromGitHub {
owner = "hardbyte";
repo = pname;
rev = "2e24af08326ecd69fba9f02fed7b9c26f233c92b";
hash = "sha256-ZP5qtbjDtBZ2uT9DOSvSnfHyTlirr0oCEXhiLO1ydz0=";
};
propagatedBuildInputs = [
msgpack
pyserial
typing-extensions
wrapt
];
checkInputs = [
future
hypothesis
parameterized
pytest-timeout
pytestCheckHook
];
postPatch = ''
substituteInPlace tox.ini \
--replace " --cov=can --cov-config=tox.ini --cov-report=xml --cov-report=term" ""
'';
disabledTestPaths = [
# We don't support all interfaces
"test/test_interface_canalystii.py"
];
disabledTests = [
# Tests require access socket
"BasicTestUdpMulticastBusIPv4"
"BasicTestUdpMulticastBusIPv6"
];
preCheck = ''
export PATH="$PATH:$out/bin";
'';
pythonImportsCheck = [
"can"
];
meta = with lib; {
description = "CAN support for Python";
homepage = "python-can.readthedocs.io";
license = licenses.lgpl3Only;
maintainers = with maintainers; [ fab sorki ];
};
}
|