pkgname=('python2-decorator' 'python3-decorator') pkgver=4.0.9 pkgrel=2 pkgdesc='Python Decorator module' arch=('any') url='http://pypi.python.org/pypi/decorator' license=('BSD') makedepends=('python2' 'python3' 'python2-setuptools' 'python3-setuptools') source=("http://pypi.python.org/packages/source/d/decorator/decorator-${pkgver}.tar.gz" 'LICENSE.txt') sha1sums=('a2af61818b01e3f8ca6e4b432886043487fab9be' 'c4c7f1ac4772ee0fca420a65533520af261ef8b3') build() { cp -r decorator-$pkgver decorator2-$pkgver cd "$srcdir/decorator-$pkgver" python3 setup.py build cd "$srcdir/decorator2-$pkgver" python2 setup.py build } package_python2-decorator() { depends=('python2') replaces=('python3-decorator<=3.3.2-1') cd "${srcdir}/decorator2-${pkgver}" python2 setup.py install --root="${pkgdir}" --optimize=1 install -D -m644 "${srcdir}/LICENSE.txt" \ "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE" } package_python3-decorator() { depends=('python3') cd "${srcdir}/decorator-${pkgver}" python3 setup.py install --root="${pkgdir}" --optimize=1 install -D -m644 "${srcdir}/LICENSE.txt" \ "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE" }