mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-12-25 03:17:13 +00:00
ec1a445028
The `postPatch` phase is failing when no `.pyc` file is generated in `tests` by the build (`rm: missing operand` error). As per @jonringer's comment, the whole `postPatch` is not needed anymore.
46 lines
1 KiB
Nix
46 lines
1 KiB
Nix
{ stdenv
|
|
, python
|
|
, buildPythonPackage
|
|
, fetchPypi
|
|
, pytest
|
|
, python-utils
|
|
, sphinx
|
|
, flake8
|
|
, pytestpep8
|
|
, pytest-flakes
|
|
, pytestcov
|
|
, pytestcache
|
|
, pytestrunner
|
|
, freezegun
|
|
}:
|
|
|
|
buildPythonPackage rec {
|
|
pname = "progressbar2";
|
|
version = "3.47.0";
|
|
|
|
src = fetchPypi {
|
|
inherit pname version;
|
|
sha256 = "7538d02045a1fd3aa2b2834bfda463da8755bd3ff050edc6c5ddff3bc616215f";
|
|
};
|
|
|
|
propagatedBuildInputs = [ python-utils ];
|
|
nativeBuildInputs = [ pytestrunner ];
|
|
checkInputs = [
|
|
pytest sphinx flake8 pytestpep8 pytest-flakes pytestcov
|
|
pytestcache freezegun
|
|
];
|
|
# ignore tests on the nix wrapped setup.py and don't flake .eggs directory
|
|
checkPhase = ''
|
|
runHook preCheck
|
|
${python.interpreter} setup.py test --addopts "--ignore=.eggs"
|
|
runHook postCheck
|
|
'';
|
|
|
|
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 ];
|
|
};
|
|
}
|