forked from mirrors/nixpkgs
python310Packages.python-utils: disable on older Python releases
- add optional-dependencies - add pythonImportsCheck
This commit is contained in:
parent
2eb47b274f
commit
97cba63343
|
@ -2,14 +2,18 @@
|
|||
, buildPythonPackage
|
||||
, fetchFromGitHub
|
||||
, loguru
|
||||
, pytestCheckHook
|
||||
, six
|
||||
, pytest-asyncio
|
||||
, pytest-mypy
|
||||
, pytestCheckHook
|
||||
, pythonOlder
|
||||
}:
|
||||
|
||||
buildPythonPackage rec {
|
||||
pname = "python-utils";
|
||||
version = "3.4.5";
|
||||
format = "setuptools";
|
||||
|
||||
disabled = pythonOlder "3.7";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "WoLpH";
|
||||
|
@ -18,20 +22,24 @@ buildPythonPackage rec {
|
|||
hash = "sha256-O/+jvdzzxUFaQdAfUM9p40fPPDNN+stTauCD993HH6Y=";
|
||||
};
|
||||
|
||||
# disable coverage and linting
|
||||
postPatch = ''
|
||||
sed -i '/--cov/d' pytest.ini
|
||||
sed -i '/--flake8/d' pytest.ini
|
||||
'';
|
||||
|
||||
propagatedBuildInputs = [
|
||||
loguru
|
||||
six
|
||||
];
|
||||
passthru.optional-dependencies = {
|
||||
loguru = [
|
||||
loguru
|
||||
];
|
||||
};
|
||||
|
||||
checkInputs = [
|
||||
pytest-asyncio
|
||||
pytest-mypy
|
||||
pytestCheckHook
|
||||
] ++ passthru.optional-dependencies.loguru;
|
||||
|
||||
pythonImportsCheck = [
|
||||
"python_utils"
|
||||
];
|
||||
|
||||
pytestFlagsArray = [
|
||||
|
@ -42,5 +50,6 @@ buildPythonPackage rec {
|
|||
description = "Module with some convenient utilities";
|
||||
homepage = "https://github.com/WoLpH/python-utils";
|
||||
license = licenses.bsd3;
|
||||
maintainers = with maintainers; [ ];
|
||||
};
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue