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
|
2019-01-22 14:53:25 +00:00
|
|
|
, fetchPypi
|
2018-01-16 08:46:30 +00:00
|
|
|
, pytest
|
|
|
|
, python-utils
|
2018-01-17 02:58:27 +00:00
|
|
|
, sphinx
|
|
|
|
, flake8
|
|
|
|
, pytestpep8
|
2019-02-16 08:02:30 +00:00
|
|
|
, pytest-flakes
|
2018-01-17 02:58:27 +00:00
|
|
|
, pytestcov
|
|
|
|
, pytestcache
|
2018-01-17 10:46:27 +00:00
|
|
|
, pytestrunner
|
2019-01-22 14:53:25 +00:00
|
|
|
, freezegun
|
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";
|
2019-10-24 07:47:42 +01:00
|
|
|
version = "3.47.0";
|
2018-01-16 08:46:30 +00:00
|
|
|
|
2019-01-22 14:53:25 +00:00
|
|
|
src = fetchPypi {
|
|
|
|
inherit pname version;
|
2019-10-24 07:47:42 +01:00
|
|
|
sha256 = "7538d02045a1fd3aa2b2834bfda463da8755bd3ff050edc6c5ddff3bc616215f";
|
2018-01-16 08:46:30 +00:00
|
|
|
};
|
|
|
|
|
2019-01-22 14:53:25 +00:00
|
|
|
postPatch = ''
|
|
|
|
rm -r tests/__pycache__
|
|
|
|
rm tests/*.pyc
|
|
|
|
'';
|
|
|
|
|
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 = [
|
2019-02-16 08:02:30 +00:00
|
|
|
pytest sphinx flake8 pytestpep8 pytest-flakes pytestcov
|
2019-01-22 14:53:25 +00:00
|
|
|
pytestcache freezegun
|
2018-01-17 02:58:27 +00:00
|
|
|
];
|
|
|
|
# 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
|
|
|
}
|