python310Packages.progressbar2: use pytestCheckHook
- add pythonImportsCheck - disable on older Python releases
This commit is contained in:
parent
c2e1495fd7
commit
170c46ce2b
1 changed files with 24 additions and 6 deletions
|
@ -1,26 +1,44 @@
|
||||||
{ lib
|
{ lib
|
||||||
, python
|
|
||||||
, buildPythonPackage
|
, buildPythonPackage
|
||||||
, fetchPypi
|
, fetchPypi
|
||||||
|
, freezegun
|
||||||
|
, pytestCheckHook
|
||||||
, python-utils
|
, python-utils
|
||||||
|
, pythonOlder
|
||||||
}:
|
}:
|
||||||
|
|
||||||
buildPythonPackage rec {
|
buildPythonPackage rec {
|
||||||
pname = "progressbar2";
|
pname = "progressbar2";
|
||||||
version = "4.2.0";
|
version = "4.2.0";
|
||||||
|
format = "setuptools";
|
||||||
|
|
||||||
|
disabled = pythonOlder "3.7";
|
||||||
|
|
||||||
src = fetchPypi {
|
src = fetchPypi {
|
||||||
inherit pname version;
|
inherit pname version;
|
||||||
sha256 = "sha256-E5OSL8tkWYlErUV1afvrSzrBie9Qta25zvMoTofjlM4=";
|
hash = "sha256-E5OSL8tkWYlErUV1afvrSzrBie9Qta25zvMoTofjlM4=";
|
||||||
};
|
};
|
||||||
|
|
||||||
propagatedBuildInputs = [ python-utils ];
|
postPatch = ''
|
||||||
|
sed -i "/-cov/d" pytest.ini
|
||||||
|
'';
|
||||||
|
|
||||||
pythonImportsCheck = [ "progressbar" ];
|
propagatedBuildInputs = [
|
||||||
|
python-utils
|
||||||
|
];
|
||||||
|
|
||||||
|
checkInputs = [
|
||||||
|
freezegun
|
||||||
|
pytestCheckHook
|
||||||
|
];
|
||||||
|
|
||||||
|
pythonImportsCheck = [
|
||||||
|
"progressbar"
|
||||||
|
];
|
||||||
|
|
||||||
meta = with lib; {
|
meta = with lib; {
|
||||||
homepage = "https://progressbar-2.readthedocs.io/en/latest/";
|
description = "Text progressbar library";
|
||||||
description = "Text progressbar library for python";
|
homepage = "https://progressbar-2.readthedocs.io/";
|
||||||
license = licenses.bsd3;
|
license = licenses.bsd3;
|
||||||
maintainers = with maintainers; [ ashgillman turion ];
|
maintainers = with maintainers; [ ashgillman turion ];
|
||||||
};
|
};
|
||||||
|
|
Loading…
Reference in a new issue