nixpkgs/pkgs/development/python-modules/can/default.nix

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

81 lines
1.5 KiB
Nix
Raw Normal View History

2018-02-01 22:30:26 +01:00
{ lib
, buildPythonPackage
, fetchFromGitHub
, future
, hypothesis
2022-04-23 23:04:12 +02:00
, packaging
, parameterized
, msgpack
, pyserial
, pytest-timeout
, pytestCheckHook
2019-03-01 18:01:51 +01:00
, pythonOlder
, typing-extensions
2018-07-24 17:28:26 +02:00
, wrapt
}:
2018-02-01 22:30:26 +01:00
buildPythonPackage rec {
pname = "python-can";
version = "4.0.0";
format = "setuptools";
disabled = pythonOlder "3.6";
2018-02-01 22:30:26 +01:00
src = fetchFromGitHub {
owner = "hardbyte";
repo = pname;
rev = version;
hash = "sha256-/z7zBfVbO7x4UtzWOXolH2YrtYWgsvRLObWwz8sqOEc=";
2018-02-01 22:30:26 +01:00
};
propagatedBuildInputs = [
msgpack
2022-04-23 23:04:12 +02:00
packaging
pyserial
typing-extensions
wrapt
];
2019-09-07 13:54:16 +02:00
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"
# pytest.approx is not supported in a boolean context (since pytest7)
"test_pack_unpack"
"test_receive"
];
preCheck = ''
export PATH="$PATH:$out/bin";
2018-07-24 17:28:26 +02:00
'';
2018-02-01 22:30:26 +01:00
pythonImportsCheck = [
"can"
];
2018-02-01 22:30:26 +01:00
meta = with lib; {
description = "CAN support for Python";
homepage = "https://python-can.readthedocs.io";
license = licenses.lgpl3Only;
maintainers = with maintainers; [ fab sorki ];
2018-02-01 22:30:26 +01:00
};
}