python3Packages.can: 3.3.4 -> unstable-2022-01-11
This commit is contained in:
parent
e3ebce5280
commit
85c0199ce6
1 changed files with 59 additions and 23 deletions
|
@ -1,39 +1,75 @@
|
||||||
{ lib
|
{ lib
|
||||||
, buildPythonPackage
|
, buildPythonPackage
|
||||||
, fetchPypi
|
, fetchFromGitHub
|
||||||
, pythonOlder
|
|
||||||
, aenum
|
|
||||||
, wrapt
|
|
||||||
, typing ? null
|
|
||||||
, pyserial
|
|
||||||
, nose
|
|
||||||
, mock
|
|
||||||
, hypothesis
|
|
||||||
, future
|
, future
|
||||||
, pytest
|
, hypothesis
|
||||||
}:
|
, parameterized
|
||||||
|
, msgpack
|
||||||
|
, pyserial
|
||||||
|
, pytest-timeout
|
||||||
|
, pytestCheckHook
|
||||||
|
, pythonOlder
|
||||||
|
, typing-extensions
|
||||||
|
, wrapt
|
||||||
|
}:
|
||||||
|
|
||||||
buildPythonPackage rec {
|
buildPythonPackage rec {
|
||||||
pname = "python-can";
|
pname = "python-can";
|
||||||
version = "3.3.4";
|
version = "unstable-2022-01-11";
|
||||||
|
format = "setuptools";
|
||||||
|
|
||||||
src = fetchPypi {
|
disabled = pythonOlder "3.6";
|
||||||
inherit pname version;
|
|
||||||
sha256 = "2d3c223b7adc4dd46ce258d4a33b7e0dbb6c339e002faa40ee4a69d5fdce9449";
|
src = fetchFromGitHub {
|
||||||
|
owner = "hardbyte";
|
||||||
|
repo = pname;
|
||||||
|
rev = "2e24af08326ecd69fba9f02fed7b9c26f233c92b";
|
||||||
|
hash = "sha256-ZP5qtbjDtBZ2uT9DOSvSnfHyTlirr0oCEXhiLO1ydz0=";
|
||||||
};
|
};
|
||||||
|
|
||||||
propagatedBuildInputs = [ wrapt pyserial aenum ] ++ lib.optional (pythonOlder "3.5") typing;
|
propagatedBuildInputs = [
|
||||||
checkInputs = [ nose mock pytest hypothesis future ];
|
msgpack
|
||||||
|
pyserial
|
||||||
|
typing-extensions
|
||||||
|
wrapt
|
||||||
|
];
|
||||||
|
|
||||||
# Add the scripts to PATH
|
checkInputs = [
|
||||||
checkPhase = ''
|
future
|
||||||
PATH=$out/bin:$PATH pytest -c /dev/null
|
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; {
|
meta = with lib; {
|
||||||
homepage = "https://github.com/hardbyte/python-can";
|
|
||||||
description = "CAN support for Python";
|
description = "CAN support for Python";
|
||||||
license = licenses.lgpl3;
|
homepage = "python-can.readthedocs.io";
|
||||||
maintainers = with maintainers; [ sorki ];
|
license = licenses.lgpl3Only;
|
||||||
|
maintainers = with maintainers; [ fab sorki ];
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue