mirror of
https://gitlab.alpinelinux.org/alpine/aports.git
synced 2025-07-23 19:25:25 +03:00
131 lines
3.6 KiB
Text
131 lines
3.6 KiB
Text
# Maintainer: Valery Kartel <valery.kartel@gmail.com>
|
|
# Contributor: Valery Kartel <valery.kartel@gmail.com>
|
|
pkgname=aws-cli
|
|
pkgver=2.10.4
|
|
pkgrel=0
|
|
pkgdesc="Universal Command Line Interface for Amazon Web Services (v2)"
|
|
url="https://github.com/aws/aws-cli"
|
|
# s390x: py3-awscrt doesn't support big-endian
|
|
# ppc64le: py3-awscrt
|
|
arch="noarch !ppc64le !s390x"
|
|
license="Apache-2.0"
|
|
depends="
|
|
py3-awscrt
|
|
py3-certifi
|
|
py3-cryptography
|
|
py3-dateutil
|
|
py3-distro
|
|
py3-colorama
|
|
py3-docutils
|
|
py3-jmespath
|
|
py3-urllib3
|
|
py3-prompt_toolkit<3.0.37
|
|
py3-ruamel.yaml
|
|
python3
|
|
"
|
|
makedepends="
|
|
python3-dev
|
|
py3-gpep517
|
|
py3-flit-core
|
|
"
|
|
checkdepends="
|
|
py3-jsonschema
|
|
py3-mock
|
|
py3-pytest
|
|
py3-pytest-mock
|
|
py3-pytest-xdist
|
|
"
|
|
subpackages="
|
|
$pkgname-doc
|
|
$pkgname-zsh-completion:zshcomp
|
|
$pkgname-bash-completion:bashcomp
|
|
"
|
|
source="$pkgname-$pkgver.tar.gz::https://github.com/aws/aws-cli/archive/$pkgver.tar.gz
|
|
fix-env.patch
|
|
prompt-toolkit-3.0.29.patch
|
|
tmpfile-index.patch
|
|
"
|
|
|
|
provides="aws-cli-v2=$pkgver-r$pkgrel"
|
|
replaces="aws-cli-v2"
|
|
|
|
case "$CARCH" in
|
|
x86*)
|
|
;;
|
|
*)
|
|
# save ourselves some time and run tests only on the above
|
|
options="$options !check"
|
|
;;
|
|
esac
|
|
|
|
build() {
|
|
gpep517 build-wheel \
|
|
--wheel-dir dist \
|
|
--output-fd 3 3>&1 >&2
|
|
}
|
|
|
|
check() {
|
|
export AWS_SECRET_ACCESS_KEY=fake_key
|
|
export AWS_ACCESS_KEY_ID=fake_id
|
|
|
|
# each core takes like 2gb, so be a little conservative
|
|
local cores
|
|
cores="$(nproc)"
|
|
cores="$((cores / 2))"
|
|
|
|
python3 -m venv --clear --without-pip --system-site-packages testenv
|
|
testenv/bin/python3 -m installer dist/*.whl
|
|
testenv/bin/python3 -m pytest tests \
|
|
-n "$cores" \
|
|
--dist loadfile \
|
|
--deselect=tests/functional/autocomplete/test_main.py::test_smoke_test_completer \
|
|
--ignore=tests/backends \
|
|
--ignore=tests/integration \
|
|
--ignore=tests/functional/botocore/leak \
|
|
--ignore=tests/unit/customizations/wizard \
|
|
--ignore=tests/functional/eks \
|
|
--ignore=tests/functional/botocore/test_credentials.py
|
|
}
|
|
|
|
package() {
|
|
python3 -m installer -d "$pkgdir" \
|
|
dist/*.whl
|
|
rm "$pkgdir"/usr/bin/aws.cmd
|
|
}
|
|
|
|
bashcomp() {
|
|
pkgdesc="$pkgdesc (bash completions)"
|
|
install_if="$pkgname=$pkgver-r$pkgrel bash-completion"
|
|
mkdir -p "$subpkgdir"/usr/share/bash-completion/completions
|
|
mv "$pkgdir"/usr/bin/aws_bash_completer \
|
|
"$subpkgdir"/usr/share/bash-completion/completions
|
|
}
|
|
|
|
zshcomp() {
|
|
pkgdesc="$pkgdesc (zsh completions)"
|
|
install_if="$pkgname=$pkgver-r$pkgrel zsh"
|
|
mkdir -p "$subpkgdir"/usr/share/zsh/site-functions
|
|
mv "$pkgdir"/usr/bin/aws_zsh_completer.sh \
|
|
"$subpkgdir"/usr/share/zsh/site-functions
|
|
}
|
|
|
|
doc() {
|
|
default_doc
|
|
|
|
local pyver="$(python3 -c 'import sys; print(f"{sys.version_info.major}.{sys.version_info.minor}")')"
|
|
|
|
amove usr/lib/python3*/site-packages/awscli/topics
|
|
amove usr/lib/python3*/site-packages/awscli/examples
|
|
|
|
mkdir -p "$pkgdir"/usr/lib/python$pyver/site-packages/awscli/examples
|
|
# move back top-level so just "aws help" works
|
|
mv "$subpkgdir"/usr/lib/python$pyver/site-packages/awscli/examples/global_options.rst \
|
|
"$pkgdir"/usr/lib/python$pyver/site-packages/awscli/examples/
|
|
}
|
|
|
|
sha512sums="
|
|
d14f396a867d33b504c97d0e545b2f1986008ea3f377d9a8133f9e799d2be25e9ab9b3221f122dcae03472166f84e7e80b72178287006b4514a1e9f1e1c2fe48 aws-cli-2.10.4.tar.gz
|
|
850b4ca6e09f96cba8968d2d7a3b60bd5206d7c4c257ba927b576336a992796b51263506cdd100314604ec7ad493a26326bf059ccd7f96772ad9326aa68ee41e fix-env.patch
|
|
e458352f5ddace2b0f46626b52d16a9b1ea0dbb064eaa8b340076a465e681cf4e38f22e77ba9caa8553e17044b70a7e2ea6630667aa9b848c016767953534c16 prompt-toolkit-3.0.29.patch
|
|
ecfad03dafbdc8cdc73f41a432f0acb53ce3636f58a8b3d0cfcef06617f24ee8588e0648ee7290148bcfc8a3007d00b865899d473a6653d970a55be63760551f tmpfile-index.patch
|
|
"
|