# Maintainer: Breno Leitao pkgname=py-packaging _pkgname=packaging pkgver=19.0 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 || return 1 python3 setup.py build || return 1 } 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="aa55b6fbca764e7de2992e294b7be9dc90b25f88b64ba0cd2d1d93042402d4360b4c2cdc134a94b083da0c0bc83de8fa7185c0856bcc96fa25828c10a793fba7 packaging-19.0.tar.gz"