Merge pull request #205384 from anthonyroussel/awscli

This commit is contained in:
Sandro
2022-12-28 21:45:01 +01:00
committed by GitHub
5 changed files with 61 additions and 50 deletions
@@ -1,50 +1,57 @@
{ lib
, buildPythonPackage
, fetchPypi
, fetchFromGitHub
, botocore
, jmespath
, s3transfer
, futures ? null
, docutils
, nose
, mock
, isPy3k
, setuptools
, pytestCheckHook
}:
buildPythonPackage rec {
pname = "boto3";
version = "1.24.75"; # N.B: if you change this, change botocore and awscli to a matching version
version = "1.26.38"; # N.B: if you change this, change botocore and awscli to a matching version
format = "pyproject";
src = fetchPypi {
inherit pname version;
sha256 = "sha256-e/oiQt+bH6c+F/TX959rIlYPVdXaLifleOWF725LFKc=";
src = fetchFromGitHub {
owner = "boto";
repo = pname;
rev = version;
hash = "sha256-/QkR6gL0XkXofnFDcKa7J0ZbZbgT0IKnqtq2wcilbEs=";
};
propagatedBuildInputs = [ botocore jmespath s3transfer ] ++ lib.optionals (!isPy3k) [ futures ];
checkInputs = [ docutils nose mock ];
propagatedBuildInputs = [
botocore
jmespath
s3transfer
setuptools
];
checkPhase = ''
runHook preCheck
# This method is not in mock. It might have appeared in some versions.
sed -i 's/action.assert_called_once()/self.assertEqual(action.call_count, 1)/' \
tests/unit/resources/test_factory.py
nosetests -d tests/unit --verbose
runHook postCheck
'';
doCheck = true;
# Network access
doCheck = false;
checkInputs = [
pytestCheckHook
];
pythonImportsCheck = [ "boto3" ];
pythonImportsCheck = [
"boto3"
];
meta = {
disabledTestPaths = [
# Integration tests require networking
"tests/integration"
];
meta = with lib; {
homepage = "https://github.com/boto/boto3";
license = lib.licenses.asl20;
changelog = "https://github.com/boto/boto3/blob/${version}/CHANGELOG.rst";
license = licenses.asl20;
description = "AWS SDK for Python";
longDescription = ''
Boto3 is the Amazon Web Services (AWS) Software Development Kit (SDK) for
Python, which allows Python developers to write software that makes use of
services like Amazon S3 and Amazon EC2.
'';
maintainers = with maintainers; [ anthonyroussel ];
};
}
@@ -4,43 +4,51 @@
, python-dateutil
, jmespath
, docutils
, simplejson
, mock
, nose
, urllib3
, pytestCheckHook
, jsonschema
}:
buildPythonPackage rec {
pname = "botocore";
version = "1.27.75"; # N.B: if you change this, change boto3 and awscli to a matching version
version = "1.29.38"; # N.B: if you change this, change boto3 and awscli to a matching version
src = fetchPypi {
inherit pname version;
sha256 = "sha256-+LHaK0HojFjbUdsMbv9spWQliUjOSlrH6WrDWkabDU8=";
hash = "sha256-K5jH2oZozcAitNila1BoZFTQoQwRUYcC/eQYgdIGGLY=";
};
propagatedBuildInputs = [
python-dateutil
jmespath
docutils
simplejson
urllib3
];
checkInputs = [ mock nose ];
checkInputs = [
pytestCheckHook
jsonschema
];
checkPhase = ''
nosetests -v
'';
doCheck = true;
# Network access
doCheck = false;
disabledTestPaths = [
# Integration tests require networking
"tests/integration"
pythonImportsCheck = [ "botocore" ];
# Disable slow tests (only run unit tests)
"tests/functional"
];
pythonImportsCheck = [
"botocore"
];
meta = with lib; {
homepage = "https://github.com/boto/botocore";
changelog = "https://github.com/boto/botocore/blob/${version}/CHANGELOG.rst";
license = licenses.asl20;
description = "A low-level interface to a growing number of Amazon Web Services";
maintainers = with maintainers; [ anthonyroussel ];
};
}
@@ -20,7 +20,6 @@
, openapi-spec-validator
, python-dateutil
, python-jose
, pytz
, pyyaml
, requests
, responses
@@ -37,21 +36,16 @@
buildPythonPackage rec {
pname = "moto";
version = "4.0.3";
version = "4.0.12";
format = "setuptools";
disabled = pythonOlder "3.6";
src = fetchPypi {
inherit pname version;
sha256 = "sha256-iutWdX5oavPkpj+Qr7yXPLIxrarYfFzonmiTbBCbC+k=";
hash = "sha256-MPjzFljxjNsV62JsjLOgdSDw2MIZMib7yzMmrhL7okY=";
};
postPatch = ''
substituteInPlace setup.py \
--replace "werkzeug>=0.5,<2.2.0" "werkzeug>=0.5"
'';
propagatedBuildInputs = [
aws-xray-sdk
boto3
@@ -68,7 +62,6 @@ buildPythonPackage rec {
openapi-spec-validator
python-dateutil
python-jose
pytz
pyyaml
requests
responses
@@ -139,6 +132,8 @@ buildPythonPackage rec {
"tests/test_awslambda/test_lambda_eventsourcemapping.py"
"tests/test_awslambda/test_lambda_invoke.py"
"tests/test_batch/test_batch_jobs.py"
"tests/test_kinesis/test_kinesis.py"
"tests/test_kinesis/test_kinesis_stream_consumers.py"
];
disabledTests = [
+3 -2
View File
@@ -28,11 +28,11 @@ let
in
with py.pkgs; buildPythonApplication rec {
pname = "awscli";
version = "1.25.76"; # N.B: if you change this, change botocore and boto3 to a matching version too
version = "1.27.38"; # N.B: if you change this, change botocore and boto3 to a matching version too
src = fetchPypi {
inherit pname version;
hash = "sha256-PSr0zZEGXFxcFSN7QQ5Ux0Z4aCwwm9na+2hIv/gR6+s=";
hash = "sha256-SjeFBWwfd+9sXcZL9NdqFyuBIQtql3KB3lnygeVVHU0=";
};
# https://github.com/aws/aws-cli/issues/4837
@@ -82,6 +82,7 @@ with py.pkgs; buildPythonApplication rec {
meta = with lib; {
homepage = "https://aws.amazon.com/cli/";
changelog = "https://github.com/aws/aws-cli/blob/${version}/CHANGELOG.rst";
description = "Unified tool to manage your AWS services";
license = licenses.asl20;
mainProgram = "aws";
@@ -49,7 +49,7 @@ with localPython.pkgs; buildPythonApplication rec {
substituteInPlace setup.py \
--replace "six>=1.11.0,<1.15.0" "six==1.16.0" \
--replace "requests>=2.20.1,<=2.26" "requests==2.28.1" \
--replace "botocore>1.23.41,<1.24.0" "botocore>1.23.41,<1.27.76" \
--replace "botocore>1.23.41,<1.24.0" "botocore>1.23.41,<2" \
--replace "pathspec==0.9.0" "pathspec>=0.10.0,<0.11.0" \
--replace "colorama>=0.2.5,<0.4.4" "colorama>=0.2.5,<=0.4.6" \
--replace "termcolor == 1.1.0" "termcolor>=2.0.0,<2.1.0"