2018-02-01 21:30:26 +00:00
|
|
|
{ lib
|
|
|
|
, buildPythonPackage
|
2019-09-07 12:54:16 +01:00
|
|
|
, fetchPypi
|
2019-03-01 17:01:51 +00:00
|
|
|
, pythonOlder
|
2019-09-07 12:54:16 +01:00
|
|
|
, isPy27
|
|
|
|
, aenum
|
2018-07-24 16:28:26 +01:00
|
|
|
, wrapt
|
2019-03-01 17:01:51 +00:00
|
|
|
, typing
|
2018-02-01 21:30:26 +00:00
|
|
|
, pyserial
|
|
|
|
, nose
|
2018-07-24 16:28:26 +01:00
|
|
|
, mock
|
2019-03-01 17:01:51 +00:00
|
|
|
, hypothesis
|
|
|
|
, future
|
2018-07-24 16:28:26 +01:00
|
|
|
, pytest
|
|
|
|
, pytest-timeout }:
|
2018-02-01 21:30:26 +00:00
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "python-can";
|
2019-10-16 10:43:04 +01:00
|
|
|
version = "3.3.2";
|
2018-02-01 21:30:26 +00:00
|
|
|
|
2019-09-07 12:54:16 +01:00
|
|
|
src = fetchPypi {
|
|
|
|
inherit pname version;
|
2019-10-16 10:43:04 +01:00
|
|
|
sha256 = "5fefb5c1e7e7f07faefc02c6eac79f9b58376f007048a04d8e7f325d48ec6b2e";
|
2018-02-01 21:30:26 +00:00
|
|
|
};
|
|
|
|
|
2019-09-07 12:54:16 +01:00
|
|
|
propagatedBuildInputs = [ wrapt pyserial aenum ] ++ lib.optional (pythonOlder "3.5") typing;
|
2020-02-20 14:00:08 +00:00
|
|
|
checkInputs = [ nose mock pytest hypothesis future ];
|
2019-09-07 12:54:16 +01:00
|
|
|
|
2019-03-01 17:01:51 +00:00
|
|
|
# Add the scripts to PATH
|
2018-07-24 16:28:26 +01:00
|
|
|
checkPhase = ''
|
2019-03-01 17:01:51 +00:00
|
|
|
PATH=$out/bin:$PATH pytest -c /dev/null
|
2018-07-24 16:28:26 +01:00
|
|
|
'';
|
2018-02-01 21:30:26 +00:00
|
|
|
|
|
|
|
meta = with lib; {
|
2020-04-01 02:11:51 +01:00
|
|
|
homepage = "https://github.com/hardbyte/python-can";
|
2018-02-01 21:30:26 +00:00
|
|
|
description = "CAN support for Python";
|
|
|
|
license = licenses.lgpl3;
|
|
|
|
maintainers = with maintainers; [ sorki ];
|
|
|
|
};
|
|
|
|
}
|