3
0
Fork 0
forked from mirrors/nixpkgs

python310Packages.python-utils: disable on older Python releases

- add optional-dependencies
- add pythonImportsCheck
This commit is contained in:
Fabian Affolter 2022-10-30 19:28:11 +01:00 committed by GitHub
parent 2eb47b274f
commit 97cba63343
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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; [ ];
};
}