awslimitchecker: refactor
- override pytest
This commit is contained in:
parent
8748ff8ae8
commit
9e9aa732af
1 changed files with 26 additions and 23 deletions
|
@ -1,17 +1,30 @@
|
||||||
{ lib, python3Packages, fetchFromGitHub }:
|
{ lib
|
||||||
|
, fetchFromGitHub
|
||||||
|
, python3
|
||||||
|
}:
|
||||||
|
|
||||||
python3Packages.buildPythonApplication rec {
|
python3.pkgs.buildPythonApplication rec {
|
||||||
pname = "awslimitchecker";
|
pname = "awslimitchecker";
|
||||||
version = "12.0.0";
|
version = "12.0.0";
|
||||||
|
pyproject = true;
|
||||||
|
|
||||||
src = fetchFromGitHub {
|
src = fetchFromGitHub {
|
||||||
owner = "jantman";
|
owner = "jantman";
|
||||||
repo = "awslimitchecker";
|
repo = "awslimitchecker";
|
||||||
rev = version;
|
rev = "refs/tags/${version}";
|
||||||
sha256 = "1p6n4kziyl6sfq7vgga9v88ddwh3sgnfb1m1cx6q25n0wyl7phgv";
|
hash = "sha256-+8F7qOfAFoFNZ6GG5ezTA/LWENpJvbcPdtpQH/8k1tw=";
|
||||||
};
|
};
|
||||||
|
|
||||||
propagatedBuildInputs = with python3Packages; [
|
patches = [
|
||||||
|
# Fix the version lookup to use only the hardcoded version in the source package
|
||||||
|
./version.patch
|
||||||
|
];
|
||||||
|
|
||||||
|
build-system = with python3.pkgs; [
|
||||||
|
setuptools
|
||||||
|
];
|
||||||
|
|
||||||
|
dependencies = with python3.pkgs; [
|
||||||
boto3
|
boto3
|
||||||
botocore
|
botocore
|
||||||
pytz
|
pytz
|
||||||
|
@ -19,27 +32,15 @@ python3Packages.buildPythonApplication rec {
|
||||||
versionfinder
|
versionfinder
|
||||||
];
|
];
|
||||||
|
|
||||||
nativeCheckInputs = with python3Packages; [
|
nativeCheckInputs = with python3.pkgs; [
|
||||||
freezegun
|
freezegun
|
||||||
onetimepass
|
onetimepass
|
||||||
pytestCheckHook
|
|
||||||
pyotp
|
pyotp
|
||||||
|
mock
|
||||||
|
(pytestCheckHook.override { pytest = pytest_7; })
|
||||||
testfixtures
|
testfixtures
|
||||||
];
|
];
|
||||||
|
|
||||||
patches = [
|
|
||||||
# Fix the version lookup to use only the hardcoded version in the source package
|
|
||||||
./version.patch
|
|
||||||
];
|
|
||||||
|
|
||||||
pytestFlagsArray = [
|
|
||||||
"awslimitchecker/tests"
|
|
||||||
|
|
||||||
# Upstream did not adapt to pytest 8 yet.
|
|
||||||
"-W"
|
|
||||||
"ignore::pytest.PytestRemovedIn8Warning"
|
|
||||||
];
|
|
||||||
|
|
||||||
disabledTestPaths = [
|
disabledTestPaths = [
|
||||||
# AWS tests that use the network
|
# AWS tests that use the network
|
||||||
"awslimitchecker/tests/services"
|
"awslimitchecker/tests/services"
|
||||||
|
@ -50,14 +51,16 @@ python3Packages.buildPythonApplication rec {
|
||||||
"awslimitchecker/tests/test_version.py"
|
"awslimitchecker/tests/test_version.py"
|
||||||
];
|
];
|
||||||
|
|
||||||
pythonImportsCheck = [ "awslimitchecker.checker" ];
|
pythonImportsCheck = [
|
||||||
|
"awslimitchecker.checker"
|
||||||
|
];
|
||||||
|
|
||||||
meta = with lib; {
|
meta = with lib; {
|
||||||
|
description = "A script and python package to check your AWS service limits and usage via boto3";
|
||||||
homepage = "http://awslimitchecker.readthedocs.org";
|
homepage = "http://awslimitchecker.readthedocs.org";
|
||||||
changelog = "https://github.com/jantman/awslimitchecker/blob/${version}/CHANGES.rst";
|
changelog = "https://github.com/jantman/awslimitchecker/blob/${version}/CHANGES.rst";
|
||||||
description = "A script and python package to check your AWS service limits and usage via boto3";
|
|
||||||
mainProgram = "awslimitchecker";
|
|
||||||
license = licenses.agpl3Plus;
|
license = licenses.agpl3Plus;
|
||||||
maintainers = with maintainers; [ zakame ];
|
maintainers = with maintainers; [ zakame ];
|
||||||
|
mainProgram = "awslimitchecker";
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue