2018-01-16 08:46:30 +00:00
|
|
|
{ stdenv
|
2018-01-17 02:58:27 +00:00
|
|
|
, python
|
2018-01-16 08:46:30 +00:00
|
|
|
, buildPythonPackage
|
2018-01-17 02:58:27 +00:00
|
|
|
, fetchFromGitHub
|
|
|
|
, isPy3k
|
2018-01-16 08:46:30 +00:00
|
|
|
, pytest
|
|
|
|
, python-utils
|
2018-01-17 02:58:27 +00:00
|
|
|
, sphinx
|
|
|
|
, coverage
|
|
|
|
, execnet
|
|
|
|
, flake8
|
|
|
|
, pytestpep8
|
|
|
|
, pytestflakes
|
|
|
|
, pytestcov
|
|
|
|
, pytestcache
|
|
|
|
, pep8
|
2018-01-17 10:46:27 +00:00
|
|
|
, pytestrunner
|
2018-01-16 08:46:30 +00:00
|
|
|
}:
|
|
|
|
|
2018-01-17 02:58:27 +00:00
|
|
|
buildPythonPackage rec {
|
2018-01-16 08:46:30 +00:00
|
|
|
pname = "progressbar2";
|
|
|
|
version = "3.12.0";
|
|
|
|
|
2018-01-17 02:58:27 +00:00
|
|
|
# Use source from GitHub, PyPI is missing tests
|
|
|
|
# https://github.com/WoLpH/python-progressbar/issues/151
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "WoLpH";
|
|
|
|
repo = "python-progressbar";
|
|
|
|
rev = "v${version}";
|
|
|
|
sha256 = "1gk45sh8cd0kkyvzcvx95z6nlblmyx0x189mjfv3vfa43cr1mb0f";
|
2018-01-16 08:46:30 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
propagatedBuildInputs = [ python-utils ];
|
2018-01-17 10:46:27 +00:00
|
|
|
nativeBuildInputs = [ pytestrunner ];
|
2018-01-17 02:58:27 +00:00
|
|
|
checkInputs = [
|
|
|
|
pytest sphinx coverage execnet flake8 pytestpep8 pytestflakes pytestcov
|
|
|
|
pytestcache pep8
|
|
|
|
];
|
|
|
|
# ignore tests on the nix wrapped setup.py and don't flake .eggs directory
|
|
|
|
checkPhase = ''
|
|
|
|
runHook preCheck
|
2018-01-20 12:31:14 +00:00
|
|
|
${python.interpreter} setup.py test --addopts "--ignore=.eggs"
|
2018-01-17 02:58:27 +00:00
|
|
|
runHook postCheck
|
|
|
|
'';
|
2018-01-16 08:46:30 +00:00
|
|
|
|
|
|
|
meta = with stdenv.lib; {
|
|
|
|
homepage = https://progressbar-2.readthedocs.io/en/latest/;
|
|
|
|
description = "Text progressbar library for python";
|
|
|
|
license = licenses.bsd3;
|
|
|
|
maintainers = with maintainers; [ ashgillman ];
|
|
|
|
};
|
2018-01-17 02:58:27 +00:00
|
|
|
}
|