Merge pull request #303553 from fabaff/dsnap-broken

python312Packages.dsnap: disable tests, pacu: disable failing tests
This commit is contained in:
Fabian Affolter 2024-04-12 12:22:42 +02:00 committed by GitHub
commit fe485fd316
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 61 additions and 65 deletions

View File

@ -1,17 +1,16 @@
{ lib
, awscli
, fetchFromGitHub
, python3
{
lib,
awscli,
fetchFromGitHub,
python3,
}:
let
python = python3.override {
packageOverrides = self: super: {
sqlalchemy = super.sqlalchemy_1_4;
};
packageOverrides = self: super: { sqlalchemy = super.sqlalchemy_1_4; };
};
in python.pkgs.buildPythonApplication rec {
in
python.pkgs.buildPythonApplication rec {
pname = "pacu";
version = "1.5.2";
pyproject = true;
@ -27,34 +26,34 @@ in python.pkgs.buildPythonApplication rec {
"dsnap"
"sqlalchemy-utils"
"sqlalchemy"
"pycognito"
"urllib3"
];
nativeBuildInputs = with python.pkgs; [
poetry-core
pythonRelaxDepsHook
];
build-system = with python.pkgs; [ poetry-core ];
propagatedBuildInputs = [
awscli
] ++ (with python.pkgs; [
awscli
boto3
botocore
chalice
dsnap
jq
policyuniverse
pycognito
pyyaml
qrcode
requests
sqlalchemy
sqlalchemy-utils
toml
typing-extensions
urllib3
]);
nativeBuildInputs = with python.pkgs; [ pythonRelaxDepsHook ];
dependencies =
[ awscli ]
++ (with python.pkgs; [
awscli
boto3
botocore
chalice
dsnap
jq
policyuniverse
pycognito
pyyaml
qrcode
requests
sqlalchemy
sqlalchemy-utils
toml
typing-extensions
urllib3
]);
nativeCheckInputs = with python.pkgs; [
moto
@ -65,13 +64,12 @@ in python.pkgs.buildPythonApplication rec {
export HOME=$(mktemp -d)
'';
pythonImportsCheck = [
"pacu"
];
pythonImportsCheck = [ "pacu" ];
disabledTests = [
# sqlalchemy.exc.ArgumentError: Textual SQL expression
#"test_migrations"
# sAttributeError: module 'moto' has no attribute 'mock_s3'
"test_update"
"test_update_second_time"
];
meta = with lib; {

View File

@ -1,17 +1,18 @@
{ lib
, aws-sam-cli
, boto3
, buildPythonPackage
, cfn-lint
, fetchFromGitHub
, mock
, moto
, mypy-boto3-ebs
, poetry-core
, pytestCheckHook
, pythonOlder
, typer
, urllib3
{
lib,
aws-sam-cli,
boto3,
buildPythonPackage,
cfn-lint,
fetchFromGitHub,
mock,
moto,
mypy-boto3-ebs,
poetry-core,
pytestCheckHook,
pythonOlder,
typer,
urllib3,
}:
buildPythonPackage rec {
@ -31,22 +32,18 @@ buildPythonPackage rec {
postPatch = ''
# Is no direct dependency
substituteInPlace pyproject.toml \
--replace 'urllib3 = "^1.26.4"' 'urllib3 = "*"'
--replace-fail 'urllib3 = "^1.26.4"' 'urllib3 = "*"'
'';
nativeBuildInputs = [
poetry-core
];
build-system = [ poetry-core ];
propagatedBuildInputs = [
dependencies = [
boto3
urllib3
];
passthru.optional-dependencies = {
cli = [
typer
];
cli = [ typer ];
scannerd = [
aws-sam-cli
cfn-lint
@ -60,17 +57,18 @@ buildPythonPackage rec {
pytestCheckHook
] ++ lib.flatten (builtins.attrValues passthru.optional-dependencies);
pythonImportsCheck = [
"dsnap"
];
# https://github.com/RhinoSecurityLabs/dsnap/issues/26
# ImportError: cannot import name 'mock_iam' from 'moto'
doCheck = false;
pythonImportsCheck = [ "dsnap" ];
meta = with lib; {
description = "Utility for downloading and mounting EBS snapshots using the EBS Direct API's";
mainProgram = "dsnap";
homepage = "https://github.com/RhinoSecurityLabs/dsnap";
changelog = "https://github.com/RhinoSecurityLabs/dsnap/releases/tag/v${version}";
license = licenses.bsd3;
maintainers = with maintainers; [ fab ];
mainProgram = "dsnap";
};
}