1{ lib, buildPythonPackage, fetchPypi, isPy3k
2, enum34, pyyaml, pytest
3}:
4
5buildPythonPackage rec {
6 version = "4.28.0";
7 pname = "mt-940";
8
9 src = fetchPypi {
10 inherit pname version;
11 hash = "sha256-ydTOaijDmA2ogIONzRMMoz+5jr99qxWM1zzGGzg7f2Q=";
12 };
13
14 propagatedBuildInputs = lib.optional (!isPy3k) enum34;
15
16 nativeCheckInputs = [ pyyaml pytest ];
17
18 # requires tests files that are not present
19 doCheck = false;
20 checkPhase = ''
21 py.test
22 '';
23
24 pythonImportsCheck = [ "mt940" ];
25
26 meta = with lib; {
27 description = "A library to parse MT940 files and returns smart Python collections for statistics and manipulation";
28 homepage = "https://github.com/WoLpH/mt940";
29 license = licenses.bsd3;
30 };
31}