1{ stdenv
2, python
3, buildPythonPackage
4, fetchFromGitHub
5, isPy3k
6, pytest
7, python-utils
8, sphinx
9, coverage
10, execnet
11, flake8
12, pytestpep8
13, pytestflakes
14, pytestcov
15, pytestcache
16, pep8
17, pytestrunner
18}:
19
20buildPythonPackage rec {
21 pname = "progressbar2";
22 version = "3.12.0";
23
24 # Use source from GitHub, PyPI is missing tests
25 # https://github.com/WoLpH/python-progressbar/issues/151
26 src = fetchFromGitHub {
27 owner = "WoLpH";
28 repo = "python-progressbar";
29 rev = "v${version}";
30 sha256 = "1gk45sh8cd0kkyvzcvx95z6nlblmyx0x189mjfv3vfa43cr1mb0f";
31 };
32
33 propagatedBuildInputs = [ python-utils ];
34 nativeBuildInputs = [ pytestrunner ];
35 checkInputs = [
36 pytest sphinx coverage execnet flake8 pytestpep8 pytestflakes pytestcov
37 pytestcache pep8
38 ];
39 # ignore tests on the nix wrapped setup.py and don't flake .eggs directory
40 checkPhase = ''
41 runHook preCheck
42 ${python.interpreter} setup.py test --addopts "--ignore=.eggs"
43 runHook postCheck
44 '';
45
46 meta = with stdenv.lib; {
47 homepage = https://progressbar-2.readthedocs.io/en/latest/;
48 description = "Text progressbar library for python";
49 license = licenses.bsd3;
50 maintainers = with maintainers; [ ashgillman ];
51 };
52}