You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

58 lines
1.4 KiB

  1. # Copyright 1999-2021 Gentoo Authors
  2. # Distributed under the terms of the GNU General Public License v2
  3. EAPI="7"
  4. PYTHON_COMPAT=( python3_{8..10} )
  5. inherit bash-completion-r1 distutils-r1
  6. DESCRIPTION="Universal Command Line Environment for AWS"
  7. HOMEPAGE="https://pypi.org/project/awscli/"
  8. #SRC_URI="mirror://pypi/${P:0:1}/${PN}/${P}.tar.gz"
  9. SRC_URI="https://github.com/aws/aws-cli/archive/${PV}.tar.gz -> ${P}.tar.gz"
  10. S="${WORKDIR}/aws-cli-${PV}"
  11. LICENSE="Apache-2.0"
  12. SLOT="0"
  13. KEYWORDS="~amd64 ~arm64 ~x86"
  14. # botocore is x.(y+1).z
  15. BOTOCORE_PV="$(ver_cut 1).$(( $(ver_cut 2) + 1)).$(ver_cut 3-)"
  16. RDEPEND="
  17. >=dev-python/botocore-${BOTOCORE_PV}[${PYTHON_USEDEP}]
  18. dev-python/colorama[${PYTHON_USEDEP}]
  19. dev-python/docutils[${PYTHON_USEDEP}]
  20. dev-python/rsa[${PYTHON_USEDEP}]
  21. >=dev-python/s3transfer-0.4.0[${PYTHON_USEDEP}]
  22. dev-python/pyyaml[${PYTHON_USEDEP}]
  23. "
  24. BDEPEND="
  25. test? (
  26. dev-python/mock[${PYTHON_USEDEP}]
  27. )
  28. "
  29. distutils_enable_tests --install nose
  30. PATCHES=(
  31. "${FILESDIR}"/awscli-1.19.47-py39.patch
  32. )
  33. python_test() {
  34. distutils_install_for_testing
  35. # integration tests require AWS credentials and Internet access
  36. nosetests -v tests/{functional,unit} ||
  37. die "Tests failed for ${EPYTHON}"
  38. }
  39. python_install_all() {
  40. newbashcomp bin/aws_bash_completer aws
  41. insinto /usr/share/zsh/site-functions
  42. newins bin/aws_zsh_completer.sh _aws
  43. distutils-r1_python_install_all
  44. rm "${ED}"/usr/bin/{aws.cmd,aws_bash_completer,aws_zsh_completer.sh} || die
  45. }