# Maintainer: Breno Leitao pkgname=py-packaging _pkgname=packaging pkgver=19.1 pkgrel=0 pkgdesc="Core utilities for Python packages" url="https://pypi.python.org/pypi/packaging" arch="noarch" license="Apache-2.0 AND BSD-2-Clause" depends="py-parsing py-six" subpackages="py2-${pkgname#py-}:_py2 py3-${pkgname#py-}:_py3" makedepends="py2-setuptools py3-setuptools" source="https://files.pythonhosted.org/packages/source/p/$_pkgname/$_pkgname-$pkgver.tar.gz" builddir="$srcdir/$_pkgname-$pkgver" build() { cd "$builddir" python2 setup.py build python3 setup.py build } package() { mkdir -p "$pkgdir" } _py2() { replaces="$pkgname" depends="${depends//py-/py2-}" _py python2 } _py3() { depends="${depends//py-/py3-}" _py python3 } _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" } sha512sums="1dec7f49c325801eb85b11432f8a316d228bb1881a04ac546f5556d60f5fa33f8085d0e91bbd5abfeb30bfcb05ec0532ed75a977dc996e256b4dc8c27c10e79b packaging-19.1.tar.gz"