depot/third_party/nixpkgs/pkgs/development/python-modules/can/default.nix
Default email ce641f4048 Project import generated by Copybara.
GitOrigin-RevId: bc5d68306b40b8522ffb69ba6cff91898c2fbbff
2021-12-06 17:07:01 +01:00

39 lines
806 B
Nix

{ lib
, buildPythonPackage
, fetchPypi
, pythonOlder
, aenum
, wrapt
, typing ? null
, pyserial
, nose
, mock
, hypothesis
, future
, pytest
}:
buildPythonPackage rec {
pname = "python-can";
version = "3.3.4";
src = fetchPypi {
inherit pname version;
sha256 = "2d3c223b7adc4dd46ce258d4a33b7e0dbb6c339e002faa40ee4a69d5fdce9449";
};
propagatedBuildInputs = [ wrapt pyserial aenum ] ++ lib.optional (pythonOlder "3.5") typing;
checkInputs = [ nose mock pytest hypothesis future ];
# Add the scripts to PATH
checkPhase = ''
PATH=$out/bin:$PATH pytest -c /dev/null
'';
meta = with lib; {
homepage = "https://github.com/hardbyte/python-can";
description = "CAN support for Python";
license = licenses.lgpl3;
maintainers = with maintainers; [ sorki ];
};
}