From 26fd86fa571ca6f39c2225976289a02fd462a5a5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Robert=20Sch=C3=BCtz?= Date: Wed, 3 Apr 2019 15:23:53 +0200 Subject: [PATCH] python.pkgs.canmatrix: 0.6 -> 0.7 --- .../python-modules/canmatrix/default.nix | 46 ++++++++++++------- 1 file changed, 30 insertions(+), 16 deletions(-) diff --git a/pkgs/development/python-modules/canmatrix/default.nix b/pkgs/development/python-modules/canmatrix/default.nix index 3e07188986d..a6c3f485d74 100644 --- a/pkgs/development/python-modules/canmatrix/default.nix +++ b/pkgs/development/python-modules/canmatrix/default.nix @@ -1,39 +1,53 @@ { lib , buildPythonPackage , fetchFromGitHub -, python +, pythonOlder +, attrs +, bitstruct +, future +, pathlib2 +, typing , lxml , xlwt , xlrd , XlsxWriter , pyyaml -, future }: +, pytest +}: buildPythonPackage rec { pname = "canmatrix"; - version = "0.6"; + version = "0.7"; # uses fetchFromGitHub as PyPi release misses test/ dir src = fetchFromGitHub { owner = "ebroecker"; repo = pname; rev = version; - sha256 = "1lb0krhchja2jqfsh5lsfgmqcchs1pd38akvc407jfmll96f4yqz"; + sha256 = "0q8qb282nfgirl8r2i9c8whm3hvr14ig2r42ssgnv2hya971cwjq"; }; - checkPhase = '' - cd test - ${python.interpreter} ./test.py - ''; + propagatedBuildInputs = [ + # required + attrs + bitstruct + future + pathlib2 + # optional + lxml + xlwt + xlrd + XlsxWriter + pyyaml + ] ++ lib.optional (pythonOlder "3.5") typing; - propagatedBuildInputs = - [ lxml - xlwt - xlrd - XlsxWriter - pyyaml - future - ]; + checkInputs = [ + pytest + ]; + + checkPhase = '' + pytest -s src/canmatrix + ''; meta = with lib; { homepage = https://github.com/ebroecker/canmatrix;