about summary refs log tree commit diff
path: root/nixpkgs/pkgs/development/python-modules/can/default.nix
diff options
context:
space:
mode:
authorAlyssa Ross <hi@alyssa.is>2019-03-11 00:43:18 +0000
committerAlyssa Ross <hi@alyssa.is>2019-03-11 00:43:18 +0000
commita6dea5a6f496ea38f56e3c3b4c5d628361cc029f (patch)
tree8300ad67b0135e6816ab38a6ac6f8fdaeccda2f0 /nixpkgs/pkgs/development/python-modules/can/default.nix
parent8779e0045c9f218caeb1dd1bcdc87e2715ed5be5 (diff)
parent5d3fd3674a66c5b1ada63e2eace140519849c967 (diff)
downloadnixlib-a6dea5a6f496ea38f56e3c3b4c5d628361cc029f.tar
nixlib-a6dea5a6f496ea38f56e3c3b4c5d628361cc029f.tar.gz
nixlib-a6dea5a6f496ea38f56e3c3b4c5d628361cc029f.tar.bz2
nixlib-a6dea5a6f496ea38f56e3c3b4c5d628361cc029f.tar.lz
nixlib-a6dea5a6f496ea38f56e3c3b4c5d628361cc029f.tar.xz
nixlib-a6dea5a6f496ea38f56e3c3b4c5d628361cc029f.tar.zst
nixlib-a6dea5a6f496ea38f56e3c3b4c5d628361cc029f.zip
Merge commit '5d3fd3674a66c5b1ada63e2eace140519849c967'
Diffstat (limited to 'nixpkgs/pkgs/development/python-modules/can/default.nix')
-rw-r--r--nixpkgs/pkgs/development/python-modules/can/default.nix28
1 files changed, 18 insertions, 10 deletions
diff --git a/nixpkgs/pkgs/development/python-modules/can/default.nix b/nixpkgs/pkgs/development/python-modules/can/default.nix
index dadd55ab0406..8e6c90441211 100644
--- a/nixpkgs/pkgs/development/python-modules/can/default.nix
+++ b/nixpkgs/pkgs/development/python-modules/can/default.nix
@@ -1,29 +1,37 @@
 { lib
 , buildPythonPackage
-, fetchPypi
+, fetchFromGitHub
+, pythonOlder
 , wrapt
+, typing
 , pyserial
 , nose
 , mock
+, hypothesis
+, future
 , pytest
 , pytest-timeout }:
 
 buildPythonPackage rec {
   pname = "python-can";
-  version = "3.0.0";
+  version = "3.1.0";
 
-  src = fetchPypi {
-    inherit pname version;
-    sha256 = "0d2ddb3b663af51b11a4c7fb7a577c63302a831986239f82bb6af65efc065b07";
+  # PyPI tarball is missing some tests and is missing __init__.py in test
+  # directory causing the tests to fail. See:
+  # https://github.com/hardbyte/python-can/issues/518
+  src = fetchFromGitHub {
+    repo = pname;
+    owner = "hardbyte";
+    rev = "v${version}";
+    sha256 = "01lfsh7drm4qvv909x9i0vnhskdh27mcb5xa86sv9m3zfpq8cjis";
   };
 
-  propagatedBuildInputs = [ wrapt pyserial ];
-  checkInputs = [ nose mock pytest pytest-timeout ];
+  propagatedBuildInputs = [ wrapt pyserial ] ++ lib.optional (pythonOlder "3.5") typing;
+  checkInputs = [ nose mock pytest pytest-timeout hypothesis future ];
 
+  # Add the scripts to PATH
   checkPhase = ''
-    pytest -k "not test_writer_and_reader \
-           and not test_reader \
-           and not test_socketcan_on_ci_server"
+    PATH=$out/bin:$PATH pytest -c /dev/null
   '';
 
   meta = with lib; {