Merge pull request #134862 from NeQuissimus/awscli

This commit is contained in:
Sandro
2021-09-17 23:29:08 +02:00
committed by GitHub
8 changed files with 166 additions and 9 deletions
@@ -0,0 +1,50 @@
{ lib
, buildPythonPackage
, fetchPypi
, botocore
, jmespath
, s3transfer
, futures ? null
, docutils
, nose
, mock
, isPy3k
}:
buildPythonPackage rec {
pname = "boto3";
version = "1.17.97"; # N.B: if you change this, change botocore and awscli to a matching version
src = fetchPypi {
inherit pname version;
sha256 = "0ab5afc51461c30f27aebef944211d16f47697b98ff8d2e2f6e49e59584853bb";
};
propagatedBuildInputs = [ botocore jmespath s3transfer ] ++ lib.optionals (!isPy3k) [ futures ];
checkInputs = [ docutils nose mock ];
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
'';
# Network access
doCheck = false;
pythonImportsCheck = [ "boto3" ];
meta = {
homepage = "https://github.com/boto/boto3";
license = lib.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.
'';
};
}
@@ -13,11 +13,11 @@
buildPythonPackage rec {
pname = "boto3";
version = "1.17.106"; # N.B: if you change this, change botocore and awscli to a matching version
version = "1.18.31"; # N.B: if you change this, change botocore and awscli to a matching version
src = fetchPypi {
inherit pname version;
sha256 = "sha256-wHQDeLkTylP1/A26kemadSxaMK57WKDF5U4+KmjfJsU=";
sha256 = "sha256-WURdDh1VyMlnVpfqQcmKDYIImkvjB26mDjqHy+lNwUE=";
};
propagatedBuildInputs = [ botocore jmespath s3transfer ] ++ lib.optionals (!isPy3k) [ futures ];
@@ -0,0 +1,48 @@
{ lib
, buildPythonPackage
, fetchPypi
, python-dateutil
, jmespath
, docutils
, ordereddict
, simplejson
, mock
, nose
, urllib3
}:
buildPythonPackage rec {
pname = "botocore";
version = "1.20.97"; # N.B: if you change this, change boto3 and awscli to a matching version
src = fetchPypi {
inherit pname version;
sha256 = "f7e119cf3e0f4a36100f0e983583afa91a84fb27c479a1716820aee4f2e190ab";
};
propagatedBuildInputs = [
python-dateutil
jmespath
docutils
ordereddict
simplejson
urllib3
];
checkInputs = [ mock nose ];
checkPhase = ''
nosetests -v
'';
# Network access
doCheck = false;
pythonImportsCheck = [ "botocore" ];
meta = with lib; {
homepage = "https://github.com/boto/botocore";
license = licenses.asl20;
description = "A low-level interface to a growing number of Amazon Web Services";
};
}
@@ -13,11 +13,11 @@
buildPythonPackage rec {
pname = "botocore";
version = "1.20.106"; # N.B: if you change this, change boto3 and awscli to a matching version
version = "1.21.31"; # N.B: if you change this, change boto3 and awscli to a matching version
src = fetchPypi {
inherit pname version;
sha256 = "sha256-bVyYOAix0AQ39W0MCEEr2C2fgBL9t35VX5cneh/U1d8=";
sha256 = "sha256-WM0xXirglxrNs9fNqcnDa0HHMYH0GUOnRDgS1tPJrRg=";
};
propagatedBuildInputs = [
@@ -0,0 +1,52 @@
{ lib
, fetchPypi
, pythonOlder
, buildPythonPackage
, docutils
, mock
, nose
, coverage
, wheel
, unittest2
, botocore
, futures ? null
}:
buildPythonPackage rec {
pname = "s3transfer";
version = "0.4.2";
src = fetchPypi {
inherit pname version;
sha256 = "sha256-ywIvSxZVHt67sxo3fT8JYA262nNj2MXbeXbn9Hcy4bI=";
};
propagatedBuildInputs =
[
botocore
] ++ lib.optional (pythonOlder "3") futures;
buildInputs = [
docutils
mock
nose
coverage
wheel
unittest2
];
checkPhase = ''
pushd s3transfer/tests
nosetests -v unit/ functional/
popd
'';
# version on pypi has no tests/ dir
doCheck = false;
meta = with lib; {
homepage = "https://github.com/boto/s3transfer";
license = licenses.asl20;
description = "A library for managing Amazon S3 transfers";
};
}
@@ -14,15 +14,16 @@
buildPythonPackage rec {
pname = "s3transfer";
version = "0.4.2";
version = "0.5.0";
src = fetchPypi {
inherit pname version;
sha256 = "sha256-ywIvSxZVHt67sxo3fT8JYA262nNj2MXbeXbn9Hcy4bI=";
sha256 = "sha256-UO2CPh3FhorUDI3JIHL3V6oOZToZKEXJSjtnb0pi2kw=";
};
propagatedBuildInputs =
[ botocore
[
botocore
] ++ lib.optional (pythonOlder "3") futures;
buildInputs = [
+2 -2
View File
@@ -21,11 +21,11 @@ let
in
with py.pkgs; buildPythonApplication rec {
pname = "awscli";
version = "1.19.106"; # N.B: if you change this, change botocore and boto3 to a matching version too
version = "1.20.31"; # N.B: if you change this, change botocore and boto3 to a matching version too
src = fetchPypi {
inherit pname version;
sha256 = "sha256-6o24GUcT3efgK5+Wa7n4+EeA5qXmAGhybzed7ybdT9Q=";
sha256 = "sha256-qDKnxh4M+LOXYp1xCvW0S0IE5NnwvFpYelUCCjA18zQ=";
};
# https://github.com/aws/aws-cli/issues/4837
+6
View File
@@ -36,6 +36,10 @@ with self; with super; {
box2d = callPackage ../development/python-modules/box2d { };
boto3 = callPackage ../development/python-modules/boto3/1_17.nix {};
botocore = callPackage ../development/python-modules/botocore/1_20.nix {};
browsermob-proxy = callPackage ../development/python-modules/browsermob-proxy { };
cairocffi = callPackage ../development/python-modules/cairocffi/0_9.nix { };
@@ -544,6 +548,8 @@ with self; with super; {
rsa = callPackage ../development/python-modules/rsa/4_0.nix { };
s3transfer = callPackage ../development/python-modules/s3transfer/0_4.nix { };
sandboxlib = callPackage ../development/python-modules/sandboxlib { };
scandir = callPackage ../development/python-modules/scandir { };