1{ buildPythonPackage, stdenv, pytestrunner, pyyaml, pytest, enum34
2, pytestpep8, pytestflakes,fetchFromGitHub, isPy3k, lib, glibcLocales
3}:
4
5buildPythonPackage rec {
6 version = "4.10.0";
7 pname = "mt940";
8
9 src = fetchFromGitHub {
10 owner = "WoLpH";
11 repo = pname;
12 rev = "v${version}";
13 sha256 = "1dsf2di8rr0iw2vaz6dppalby3y7i8x2bl0qjqvaiqacjxxvwj65";
14 };
15
16 patches = [
17 ./no-coverage.patch
18 ];
19
20 propagatedBuildInputs = [ pyyaml pytestrunner ]
21 ++ lib.optional (!isPy3k) enum34;
22
23 LC_ALL="en_US.UTF-8";
24
25 checkInputs = [ pytestpep8 pytestflakes pytest glibcLocales ];
26 checkPhase = ''
27 py.test
28 '';
29
30 meta = with stdenv.lib; {
31 description = "A library to parse MT940 files and returns smart Python collections for statistics and manipulation";
32 homepage = https://pythonhosted.org/mt-940/;
33 license = licenses.bsd3;
34 };
35}