# Maintainer: Felix Yan # Contributor: Kaiting Chen # Contributor: Aaron Schaefer pkgbase=python-boto pkgname=(python-boto-git python2-boto-git) pkgver=2.49.0.r56.g91ba037e pkgrel=1 pkgdesc='A Python interface to Amazon Web Services (AWS) - git version' arch=('any') url='https://github.com/boto/boto' license=('MIT') makedepends=('python-setuptools' 'python2-setuptools' 'git') checkdepends=('python-nose' 'python2-nose' 'python-mock' 'python2-mock' 'python-requests' 'python2-requests' 'python-httpretty' 'python2-httpretty') source=("$pkgbase::git+https://github.com/boto/boto.git" boto-python-3.8.patch) sha512sums=('SKIP' '3e32db201adb637d3b6041f9e7be65889f1306042cbed36e4884207cbf772dc8f7691be9a505ec79f111b99c8313e0d42436c1f9a2dfa095de6cc77a7fe4bc6d') pkgver() { cd $pkgbase git describe --long | sed 's/\([^-]*-g\)/r\1/;s/-/./g' } prepare() { (cd $pkgbase patch -p1 -i ../boto-python-3.8.patch # Fix escaping with python 3.8 ) cp -a $pkgbase{,-py2} cd $pkgbase-py2 # python2 fix find . -name '*.py' -type f -print0 | xargs -0 \ sed -i 's_#!/usr/bin/env python_#!/usr/bin/env python2_' } check() { cd "$srcdir"/$pkgbase python tests/test.py default cd "$srcdir"/$pkgbase-py2 python2 tests/test.py default } package_python-boto-git() { depends=('python') cd $pkgbase python setup.py install -O1 --root="$pkgdir" install -D -m644 LICENSE "$pkgdir"/usr/share/licenses/$pkgname/LICENSE # Remove (somewhat deprecated) tools that conflicts with the python 2 version. rm -r "$pkgdir"/usr/bin } package_python2-boto-git() { depends=('python2') conflicts=('python-boto<2.32.1-1') replaces=('python-boto<2.32.1-1') cd $pkgbase-py2 python2 setup.py install -O1 --root="$pkgdir" install -D -m644 LICENSE "$pkgdir"/usr/share/licenses/$pkgname/LICENSE }