# Maintainer: Drew DeVault pkgname=py-six _pkgname=six pkgver=1.12.0 pkgrel=1 pkgdesc="Python 2 and 3 compatibility library" url="https://pypi.python.org/pypi/six" arch="noarch" license="MIT" _py2_deps="py-enum34" makedepends="python2-dev python3-dev py2-setuptools py3-setuptools $_py2_deps" subpackages="py3-$_pkgname:_py3 py2-$_pkgname:_py2" source="$pkgname-$pkgver.tar.gz::https://github.com/benjaminp/$_pkgname/archive/$pkgver.tar.gz" builddir="$srcdir/$_pkgname-$pkgver" # circular dependency with pytest #checkdepends="pytest py3-pytest" options="!check" build() { python2 setup.py build python3 setup.py build } check() { python2 -m pytest -rfsxX python3 -m pytest -rfsxX } package() { mkdir -p "$pkgdir" } _py() { local python="$1" pkgdesc="$pkgdesc (for $python)" depends="$depends $python" install_if="$pkgname=$pkgver-r$pkgrel $python" cd "$builddir" $python setup.py install --prefix=/usr --root="$subpkgdir" } _py2() { replaces="$pkgname" depends="$depends $_py2_deps" _py python2 } _py3() { _py python3 } sha512sums="67f218ec591411b4a460e4e2744083b7e128440a50d006433cd85a7485b3f4bbf37830bee4cfd3e24194e4873f9ad251a62900e2f5fce7429d647b3df14543c3 py-six-1.12.0.tar.gz"