diff options
Diffstat (limited to 'dev-python/awscli')
| -rw-r--r-- | dev-python/awscli/Manifest | 1 | ||||
| -rw-r--r-- | dev-python/awscli/awscli-1.19.47-r1.ebuild (renamed from dev-python/awscli/awscli-1.19.47.ebuild) | 20 | ||||
| -rw-r--r-- | dev-python/awscli/awscli-1.19.78.ebuild | 58 | ||||
| -rw-r--r-- | dev-python/awscli/files/awscli-1.19.47-py39.patch | 60 | ||||
| -rw-r--r-- | dev-python/awscli/metadata.xml | 4 |
5 files changed, 133 insertions, 10 deletions
diff --git a/dev-python/awscli/Manifest b/dev-python/awscli/Manifest index 6f7ac9d5da80..2fdf876dcffd 100644 --- a/dev-python/awscli/Manifest +++ b/dev-python/awscli/Manifest @@ -1 +1,2 @@ DIST awscli-1.19.47.tar.gz 1990843 BLAKE2B c894aaf84d5fe7cb8998fcd682783a1f2e75dd9273a2aa22babe4d57175a1716aefccda50edb96a1203f010dbb2af29cd47d43b5d5f94adfdee1730ab98345af SHA512 7d51022e13609f5f5ab3155e3ac09670c7e49508d67eca8cb477e556e4b06b7643e86bdfe5fa8db59360f6d73e5774b433cb7093c25d6b688f98847b502872b7 +DIST awscli-1.19.78.tar.gz 2006020 BLAKE2B 6def90848e033413136865b0176c8d435fb70465f700a82673e9b20378be3792c8e3e59715466a93199358d698c9b58daaa88d6c2e921474460fdef0a214fdba SHA512 ff48f06158d401bf27e2f63c86ade91009dd9a48edf20156d3511ec2685a2dc93e8129a766eb0cc979e81121804dff9f18524e72f8ac1cffc43c4d3ed3595c83 diff --git a/dev-python/awscli/awscli-1.19.47.ebuild b/dev-python/awscli/awscli-1.19.47-r1.ebuild index 6c7bfd44926d..f70da63d88a5 100644 --- a/dev-python/awscli/awscli-1.19.47.ebuild +++ b/dev-python/awscli/awscli-1.19.47-r1.ebuild @@ -11,14 +11,11 @@ DESCRIPTION="Universal Command Line Environment for AWS" HOMEPAGE="https://pypi.org/project/awscli/" #SRC_URI="mirror://pypi/${P:0:1}/${PN}/${P}.tar.gz" SRC_URI="https://github.com/aws/aws-cli/archive/${PV}.tar.gz -> ${P}.tar.gz" +S="${WORKDIR}/aws-cli-${PV}" LICENSE="Apache-2.0" SLOT="0" KEYWORDS="amd64 ~arm64 x86" -IUSE="test" - -# requires network access -RESTRICT="test" RDEPEND=" =dev-python/botocore-1.20*[${PYTHON_USEDEP}] @@ -28,20 +25,23 @@ RDEPEND=" >=dev-python/s3transfer-0.3.0[${PYTHON_USEDEP}] dev-python/pyyaml[${PYTHON_USEDEP}] " -DEPEND="${RDEPEND}" - BDEPEND=" - dev-python/setuptools[${PYTHON_USEDEP}] test? ( dev-python/mock[${PYTHON_USEDEP}] - dev-python/nose[${PYTHON_USEDEP}] ) " -S="${WORKDIR}/aws-cli-${PV}" +distutils_enable_tests --install nose + +PATCHES=( + "${FILESDIR}"/awscli-1.19.47-py39.patch +) python_test() { - nosetests -vv || die + distutils_install_for_testing + # integration tests require AWS credentials and Internet access + nosetests -v tests/{functional,unit} || + die "Tests failed for ${EPYTHON}" } python_install_all() { diff --git a/dev-python/awscli/awscli-1.19.78.ebuild b/dev-python/awscli/awscli-1.19.78.ebuild new file mode 100644 index 000000000000..ec221770074d --- /dev/null +++ b/dev-python/awscli/awscli-1.19.78.ebuild @@ -0,0 +1,58 @@ +# Copyright 1999-2021 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI="7" + +PYTHON_COMPAT=( python3_{6,7,8,9,10} ) + +inherit bash-completion-r1 distutils-r1 + +DESCRIPTION="Universal Command Line Environment for AWS" +HOMEPAGE="https://pypi.org/project/awscli/" +#SRC_URI="mirror://pypi/${P:0:1}/${PN}/${P}.tar.gz" +SRC_URI="https://github.com/aws/aws-cli/archive/${PV}.tar.gz -> ${P}.tar.gz" +S="${WORKDIR}/aws-cli-${PV}" + +LICENSE="Apache-2.0" +SLOT="0" +KEYWORDS="~amd64 ~arm64 ~x86" + +# botocore is x.(y+1).z +BOTOCORE_PV="$(ver_cut 1).$(( $(ver_cut 2) + 1)).$(ver_cut 3-)" +RDEPEND=" + >=dev-python/botocore-${BOTOCORE_PV}[${PYTHON_USEDEP}] + dev-python/colorama[${PYTHON_USEDEP}] + dev-python/docutils[${PYTHON_USEDEP}] + dev-python/rsa[${PYTHON_USEDEP}] + >=dev-python/s3transfer-0.4.0[${PYTHON_USEDEP}] + dev-python/pyyaml[${PYTHON_USEDEP}] +" +BDEPEND=" + test? ( + dev-python/mock[${PYTHON_USEDEP}] + ) +" + +distutils_enable_tests --install nose + +PATCHES=( + "${FILESDIR}"/awscli-1.19.47-py39.patch +) + +python_test() { + distutils_install_for_testing + # integration tests require AWS credentials and Internet access + nosetests -v tests/{functional,unit} || + die "Tests failed for ${EPYTHON}" +} + +python_install_all() { + newbashcomp bin/aws_bash_completer aws + + insinto /usr/share/zsh/site-functions + newins bin/aws_zsh_completer.sh _aws + + distutils-r1_python_install_all + + rm "${ED}"/usr/bin/{aws.cmd,aws_bash_completer,aws_zsh_completer.sh} || die +} diff --git a/dev-python/awscli/files/awscli-1.19.47-py39.patch b/dev-python/awscli/files/awscli-1.19.47-py39.patch new file mode 100644 index 000000000000..4d1be8eab6d4 --- /dev/null +++ b/dev-python/awscli/files/awscli-1.19.47-py39.patch @@ -0,0 +1,60 @@ +From 85361123d2fa12eaedf912c046ffe39aebdd2bad Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Micha=C5=82=20G=C3=B3rny?= <mgorny@gentoo.org> +Date: Sat, 22 May 2021 19:42:14 +0200 +Subject: [PATCH] Replace use of deprecated base64.encodestring() + +Replace the uses of deprecated base64.encodestring() in favor +of botocore.compat.encodebytes(). This fixes incompatibility with +Python 3.9 where the former function has finally been removed. +--- + awscli/customizations/ec2/bundleinstance.py | 4 +++- + tests/functional/ec2/test_bundle_instance.py | 4 +++- + 2 files changed, 6 insertions(+), 2 deletions(-) + +diff --git a/awscli/customizations/ec2/bundleinstance.py b/awscli/customizations/ec2/bundleinstance.py +index f704ec301..775e75718 100644 +--- a/awscli/customizations/ec2/bundleinstance.py ++++ b/awscli/customizations/ec2/bundleinstance.py +@@ -17,6 +17,8 @@ import hmac + import base64 + import datetime + ++from botocore.compat import encodebytes ++ + from awscli.compat import six + + from awscli.arguments import CustomArgument +@@ -135,7 +137,7 @@ def _generate_signature(params): + policy = base64.b64encode(six.b(policy)).decode('utf-8') + new_hmac = hmac.new(sak.encode('utf-8'), digestmod=sha1) + new_hmac.update(six.b(policy)) +- ps = base64.encodestring(new_hmac.digest()).strip().decode('utf-8') ++ ps = encodebytes(new_hmac.digest()).strip().decode('utf-8') + params['UploadPolicySignature'] = ps + del params['_SAK'] + +diff --git a/tests/functional/ec2/test_bundle_instance.py b/tests/functional/ec2/test_bundle_instance.py +index 3eee363da..ca36d7cd5 100644 +--- a/tests/functional/ec2/test_bundle_instance.py ++++ b/tests/functional/ec2/test_bundle_instance.py +@@ -17,6 +17,8 @@ import datetime + import mock + from six.moves import cStringIO + ++from botocore.compat import encodebytes ++ + import awscli.customizations.ec2.bundleinstance + from awscli.compat import six + from awscli.testutils import BaseAWSCommandParamsTest +@@ -70,7 +72,7 @@ class TestBundleInstance(BaseAWSCommandParamsTest): + + def test_policy_provided(self): + policy = '{"notarealpolicy":true}' +- base64policy = base64.encodestring(six.b(policy)).strip().decode('utf-8') ++ base64policy = encodebytes(six.b(policy)).strip().decode('utf-8') + policy_signature = 'a5SmoLOxoM0MHpOdC25nE7KIafg=' + args = ' --instance-id i-12345678 --owner-akid AKIAIOSFODNN7EXAMPLE' + args += ' --owner-sak wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY' +-- +2.31.1 + diff --git a/dev-python/awscli/metadata.xml b/dev-python/awscli/metadata.xml index f771b9647f9b..f6e4c89d3b6d 100644 --- a/dev-python/awscli/metadata.xml +++ b/dev-python/awscli/metadata.xml @@ -9,6 +9,10 @@ <email>patrick@gentoo.org</email> <name>Patrick Lauer</name> </maintainer> + <maintainer type="project"> + <email>python@gentoo.org</email> + <name>Python</name> + </maintainer> <upstream> <remote-id type="pypi">awscli</remote-id> </upstream> |
