pythonPackages.progressbar2: Get tests running.
This commit is contained in:
parent
19b3b16384
commit
f4508a0adf
|
@ -1,23 +1,45 @@
|
||||||
{ stdenv
|
{ stdenv
|
||||||
|
, python
|
||||||
, buildPythonPackage
|
, buildPythonPackage
|
||||||
, fetchPypi
|
, fetchFromGitHub
|
||||||
|
, isPy3k
|
||||||
, pytest
|
, pytest
|
||||||
, python-utils
|
, python-utils
|
||||||
|
, sphinx
|
||||||
|
, coverage
|
||||||
|
, execnet
|
||||||
|
, flake8
|
||||||
|
, pytestpep8
|
||||||
|
, pytestflakes
|
||||||
|
, pytestcov
|
||||||
|
, pytestcache
|
||||||
|
, pep8
|
||||||
}:
|
}:
|
||||||
|
|
||||||
buildPythonPackage (rec {
|
buildPythonPackage rec {
|
||||||
name = "${pname}-${version}";
|
|
||||||
pname = "progressbar2";
|
pname = "progressbar2";
|
||||||
version = "3.12.0";
|
version = "3.12.0";
|
||||||
|
|
||||||
src = fetchPypi {
|
# Use source from GitHub, PyPI is missing tests
|
||||||
inherit pname version;
|
# https://github.com/WoLpH/python-progressbar/issues/151
|
||||||
sha256 = "16r21cpjvv0spf4mymgpy7hx6977iy11k44n2w9kipwg4lhwh02k";
|
src = fetchFromGitHub {
|
||||||
|
owner = "WoLpH";
|
||||||
|
repo = "python-progressbar";
|
||||||
|
rev = "v${version}";
|
||||||
|
sha256 = "1gk45sh8cd0kkyvzcvx95z6nlblmyx0x189mjfv3vfa43cr1mb0f";
|
||||||
};
|
};
|
||||||
|
|
||||||
buildInputs = [ pytest ];
|
|
||||||
propagatedBuildInputs = [ python-utils ];
|
propagatedBuildInputs = [ python-utils ];
|
||||||
doCheck = false;
|
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
|
||||||
|
${python.interpreter} setup.py test --addopts "--ignore=nix_run_setup.py --ignore=.eggs"
|
||||||
|
runHook postCheck
|
||||||
|
'';
|
||||||
|
|
||||||
meta = with stdenv.lib; {
|
meta = with stdenv.lib; {
|
||||||
homepage = https://progressbar-2.readthedocs.io/en/latest/;
|
homepage = https://progressbar-2.readthedocs.io/en/latest/;
|
||||||
|
@ -25,4 +47,4 @@ buildPythonPackage (rec {
|
||||||
license = licenses.bsd3;
|
license = licenses.bsd3;
|
||||||
maintainers = with maintainers; [ ashgillman ];
|
maintainers = with maintainers; [ ashgillman ];
|
||||||
};
|
};
|
||||||
})
|
}
|
||||||
|
|
Loading…
Reference in a new issue