pythonPackages.can: 3.1.0 -> 3.3.1

This commit is contained in:
Jaakko Luttinen 2019-09-07 14:54:16 +03:00 committed by Frederik Rietdijk
parent a00a398bff
commit 766f0d0a60

View File

@ -1,7 +1,9 @@
{ lib { lib
, buildPythonPackage , buildPythonPackage
, fetchFromGitHub , fetchPypi
, pythonOlder , pythonOlder
, isPy27
, aenum
, wrapt , wrapt
, typing , typing
, pyserial , pyserial
@ -14,21 +16,21 @@
buildPythonPackage rec { buildPythonPackage rec {
pname = "python-can"; pname = "python-can";
version = "3.1.0"; version = "3.3.1";
# PyPI tarball is missing some tests and is missing __init__.py in test src = fetchPypi {
# directory causing the tests to fail. See: inherit pname version;
# https://github.com/hardbyte/python-can/issues/518 sha256 = "1giv9s6w90lalxsijgnxzynygkckcfyaxnxsldbwv0784vwy1jcd";
src = fetchFromGitHub {
repo = pname;
owner = "hardbyte";
rev = "v${version}";
sha256 = "01lfsh7drm4qvv909x9i0vnhskdh27mcb5xa86sv9m3zfpq8cjis";
}; };
propagatedBuildInputs = [ wrapt pyserial ] ++ lib.optional (pythonOlder "3.5") typing; propagatedBuildInputs = [ wrapt pyserial aenum ] ++ lib.optional (pythonOlder "3.5") typing;
checkInputs = [ nose mock pytest pytest-timeout hypothesis future ]; checkInputs = [ nose mock pytest pytest-timeout hypothesis future ];
# Tests won't work with hypothesis 4.7.3 under Python 2. So skip the tests in
# that case. This clause can be removed once hypothesis has been upgraded in
# nixpkgs.
doCheck = !(isPy27 && (hypothesis.version == "4.7.3"));
# Add the scripts to PATH # Add the scripts to PATH
checkPhase = '' checkPhase = ''
PATH=$out/bin:$PATH pytest -c /dev/null PATH=$out/bin:$PATH pytest -c /dev/null