git.iko.soy/typeable/nixpkgs
on master help sign in
Merge pull request #154996 from fabaff/fix-can

python3Packages.can: 3.3.4 -> unstable-2022-01-11

commitfd5df0ef5b644c80f2ff0c972d15f05316dc6b71 authorFabian Affolter <fabian@affolter-engineering.ch> dateSat 15 Jan 2022, 09:20 (5 years ago) parent2298c6a85c0199
1 file changed+58−22
pkgs/development/python-modules/can/default.nix+58−22
pkgs/development/python-modules/can/default.nix+58−22
@@ -1,39 +1,75 @@
11{ lib
22, buildPythonPackage
3−, fetchPypi
3+, fetchFromGitHub
4+, future
5+, hypothesis
6+, parameterized
7+, msgpack
8+, pyserial
9+, pytest-timeout
10+, pytestCheckHook
411, pythonOlder
5−, aenum
12+, typing-extensions
613, wrapt
7−, typing ? null
8−, pyserial
9−, nose
10−, mock
11−, hypothesis
12−, future
13−, pytest
14− }:
14+}:
1515
1616buildPythonPackage rec {
1717 pname = "python-can";
18− version = "3.3.4";
18+ version = "unstable-2022-01-11";
19+ format = "setuptools";
20+
21+ disabled = pythonOlder "3.6";
1922
20− src = fetchPypi {
21− inherit pname version;
22− sha256 = "2d3c223b7adc4dd46ce258d4a33b7e0dbb6c339e002faa40ee4a69d5fdce9449";
23+ src = fetchFromGitHub {
24+ owner = "hardbyte";
25+ repo = pname;
26+ rev = "2e24af08326ecd69fba9f02fed7b9c26f233c92b";
27+ hash = "sha256-ZP5qtbjDtBZ2uT9DOSvSnfHyTlirr0oCEXhiLO1ydz0=";
2328 };
2429
25− propagatedBuildInputs = [ wrapt pyserial aenum ] ++ lib.optional (pythonOlder "3.5") typing;
26− checkInputs = [ nose mock pytest hypothesis future ];
30+ propagatedBuildInputs = [
31+ msgpack
32+ pyserial
33+ typing-extensions
34+ wrapt
35+ ];
2736
28− # Add the scripts to PATH
29− checkPhase = ''
30− PATH=$out/bin:$PATH pytest -c /dev/null
37+ checkInputs = [
38+ future
39+ hypothesis
40+ parameterized
41+ pytest-timeout
42+ pytestCheckHook
43+ ];
44+
45+ postPatch = ''
46+ substituteInPlace tox.ini \
47+ --replace " --cov=can --cov-config=tox.ini --cov-report=xml --cov-report=term" ""
48+ '';
49+
50+ disabledTestPaths = [
51+ # We don't support all interfaces
52+ "test/test_interface_canalystii.py"
53+ ];
54+
55+ disabledTests = [
56+ # Tests require access socket
57+ "BasicTestUdpMulticastBusIPv4"
58+ "BasicTestUdpMulticastBusIPv6"
59+ ];
60+
61+ preCheck = ''
62+ export PATH="$PATH:$out/bin";
3163 '';
3264
65+ pythonImportsCheck = [
66+ "can"
67+ ];
68+
3369 meta = with lib; {
34− homepage = "https://github.com/hardbyte/python-can";
3570 description = "CAN support for Python";
36− license = licenses.lgpl3;
37− maintainers = with maintainers; [ sorki ];
71+ homepage = "python-can.readthedocs.io";
72+ license = licenses.lgpl3Only;
73+ maintainers = with maintainers; [ fab sorki ];
3874 };
3975}